{"openapi":"3.1.0","paths":{"/api/v1/contexts/{type}/{id}/api-keys":{"post":{"description":"A payment key (`kind: payment`, the default) calls the payment API only, optionally limited to `applicationIds`. An admin key (`kind: admin`) calls only its `endpoints`, each of which the caller must hold itself, and never the payment API.","summary":"Create a new API key","tags":["apiKeys"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"path","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"path","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"path","schema":{"type":"boolean"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"scopes":{"type":"array","items":{"type":"string"}},"expiresIn":{"type":"string","enum":["1h","24h","7d","30d","never"]},"kind":{"default":"payment","type":"string","enum":["payment","admin"]},"endpoints":{"maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"applicationIds":{"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["name"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"mode":{"type":"string","enum":["live","test"]},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"createdBy":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"}},"webhookSecret":{"type":["string","null"]},"kind":{"type":"string","enum":["payment","admin"]},"endpoints":{"maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"applicationIds":{"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"applications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"slugId":{"type":["string","null"]}},"required":["id","name","slugId"],"additionalProperties":false}},"accessSetAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","context","mode","name","createdAt","expiresAt","createdBy","webhookSecret","kind"],"additionalProperties":false},"key":{"type":"string"}},"required":["apiKey","key"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"get":{"summary":"List all API keys for a context","tags":["apiKeys"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"path","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"path","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"path","schema":{"type":"boolean"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"mode":{"type":"string","enum":["live","test"]},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"createdBy":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"}},"webhookSecret":{"type":["string","null"]},"kind":{"type":"string","enum":["payment","admin"]},"endpoints":{"maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"applicationIds":{"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"applications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"slugId":{"type":["string","null"]}},"required":["id","name","slugId"],"additionalProperties":false}},"accessSetAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","context","mode","name","createdAt","expiresAt","createdBy","webhookSecret","kind"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/contexts/{type}/{id}/api-keys/access-options":{"get":{"description":"The endpoints the caller may give a payment key and an admin key, and the applications a payment key can be limited to.","summary":"What the caller may give an API key in a context","tags":["apiKeys"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"path","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"path","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"path","schema":{"type":"boolean"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"paymentEndpoints":{"type":"array","items":{"type":"string"}},"adminEndpoints":{"type":"array","items":{"type":"string"}},"applications":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"slugId":{"type":["string","null"]},"customerName":{"type":"string"}},"required":["id","name","slugId"],"additionalProperties":false}},{"type":"null"}]}},"required":["paymentEndpoints","adminEndpoints","applications"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/contexts/{type}/{id}/api-keys/{apiKeyId}/access":{"put":{"description":"A field left out keeps its value. Every endpoint added must be one the caller holds, and so must every endpoint of a key whose life is extended; removing an endpoint or shortening the life only narrows the key. `applicationIds` limit a payment key only. A key's kind never changes.","summary":"Change what an API key may call, or when it expires","tags":["apiKeys"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"apiKeyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"path","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"path","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"path","schema":{"type":"boolean"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"endpoints":{"maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"applicationIds":{"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"expiresIn":{"type":"string","enum":["1h","24h","7d","30d","never"]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"mode":{"type":"string","enum":["live","test"]},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"createdBy":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"}},"webhookSecret":{"type":["string","null"]},"kind":{"type":"string","enum":["payment","admin"]},"endpoints":{"maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"applicationIds":{"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"applications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"slugId":{"type":["string","null"]}},"required":["id","name","slugId"],"additionalProperties":false}},"accessSetAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","context","mode","name","createdAt","expiresAt","createdBy","webhookSecret","kind"],"additionalProperties":false}},"required":["apiKey"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/contexts/{type}/{id}/api-keys/{apiKeyId}":{"delete":{"summary":"Revoke an API key","tags":["apiKeys"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"apiKeyId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"path","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"path","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"path","schema":{"type":"boolean"}}],"responses":{"204":{"description":"204","content":{"application/json":{"schema":{}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/organizations/{organizationId}/customers/{customerId}/applications":{"get":{"summary":"Get all applications for a customer","tags":["applications"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","organizationId","customerId","name","slugId","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"},"total":{"type":"number"}},"required":["page","pageSize","hasMore"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"post":{"summary":"Create a new application","tags":["applications"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"slugId":{"type":"string","minLength":1}},"required":["customerId","name","slugId"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","organizationId","customerId","name","slugId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/organizations/{organizationId}/customers/{customerId}/applications/{id}":{"get":{"summary":"Get an application by ID","tags":["applications"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","organizationId","customerId","name","slugId","createdAt","updatedAt"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"patch":{"summary":"Update an application","tags":["applications"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"slugId":{"type":"string","minLength":1}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","organizationId","customerId","name","slugId","createdAt","updatedAt"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete an application","tags":["applications"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","organizationId","customerId","name","slugId","createdAt","updatedAt"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/customers":{"get":{"summary":"Search customers by name, legal name, emails, contact, etc","tags":["customers"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"customerId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"page","in":"query","schema":{"default":1,"type":"number","minimum":1}},{"name":"limit","in":"query","schema":{"default":100,"type":"number","minimum":1}},{"name":"dateRange","in":"query","style":"deepObject","schema":{"type":"object","properties":{"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}}}},{"name":"refresh","in":"query","schema":{"type":"boolean"}},{"name":"status","in":"query","schema":{"type":"string","enum":["ONBOARDING","ACTIVE","DORMANT","SUSPENDED","INACTIVE","ARCHIVED"]}},{"name":"excludeArchived","in":"query","description":"When true, archived customers are excluded from results. Ignored if status is provided.","schema":{"type":"boolean"}},{"name":"customerName","in":"query","schema":{"type":"string"}},{"name":"sortBy","in":"query","schema":{"type":"string","enum":["customernumber","name"]}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["status","kind","legalEntityType","name","legalName","email","financeEmail","contact","contactEmail","phone","regNo","erpId","crmId","address1","address2","zipCode","city","state","countryCode","vat.number","vat.type"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},{"type":"string","const":""}]},"legalName":{"type":"string","minLength":1},"url":{"anyOf":[{"type":["string","null"]},{"type":"string","const":""}]},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"description":"VAT number and type; a company's only, dropped for an individual","anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"description":"Address 1","type":["string","null"]},"address2":{"description":"Address 2","type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"anyOf":[{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},{"type":"string","const":""}]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]},"erpId":{"type":["string","null"]},"crmId":{"type":["string","null"]},"relatedCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"status":{"default":"ACTIVE","description":"Customer status","type":"string","enum":["ONBOARDING","ACTIVE","DORMANT","SUSPENDED","INACTIVE","ARCHIVED"]},"kind":{"default":"STANDARD","description":"STANDARD processes payments; PROVIDER is a payment provider the organization works with","type":"string","enum":["STANDARD","PROVIDER"]},"legalEntityType":{"default":"COMPANY","description":"COMPANY or INDIVIDUAL. Shared by every customer of the same legal entity","type":"string","enum":["COMPANY","INDIVIDUAL"]},"individual":{"description":"The person, when legalEntityType is INDIVIDUAL; legalName is then their first and last name","anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","organizationId","legalName","status","kind","legalEntityType","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"},"total":{"type":"number"}},"required":["page","pageSize","hasMore"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/customers/{id}":{"get":{"summary":"Get a customer by ID","tags":["customers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},{"type":"string","const":""}]},"legalName":{"type":"string","minLength":1},"url":{"anyOf":[{"type":["string","null"]},{"type":"string","const":""}]},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"description":"VAT number and type; a company's only, dropped for an individual","anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"description":"Address 1","type":["string","null"]},"address2":{"description":"Address 2","type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"anyOf":[{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},{"type":"string","const":""}]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]},"erpId":{"type":["string","null"]},"crmId":{"type":["string","null"]},"relatedCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"status":{"default":"ACTIVE","description":"Customer status","type":"string","enum":["ONBOARDING","ACTIVE","DORMANT","SUSPENDED","INACTIVE","ARCHIVED"]},"kind":{"default":"STANDARD","description":"STANDARD processes payments; PROVIDER is a payment provider the organization works with","type":"string","enum":["STANDARD","PROVIDER"]},"legalEntityType":{"default":"COMPANY","description":"COMPANY or INDIVIDUAL. Shared by every customer of the same legal entity","type":"string","enum":["COMPANY","INDIVIDUAL"]},"individual":{"description":"The person, when legalEntityType is INDIVIDUAL; legalName is then their first and last name","anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","organizationId","legalName","status","kind","legalEntityType","createdAt","updatedAt"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/organizations/customers":{"post":{"summary":"Create a new customer","tags":["customers"],"parameters":[{"name":"organizationId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"anyOf":[{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},{"type":"string","const":""}]},"legalName":{"type":"string","minLength":1},"url":{"anyOf":[{"type":["string","null"]},{"type":"string","const":""}]},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"description":"VAT number and type; a company's only, dropped for an individual","anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}}},{"type":"null"}]},"address1":{"description":"Address 1","type":["string","null"]},"address2":{"description":"Address 2","type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"anyOf":[{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},{"type":"string","const":""}]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":"string","description":"Who to contact at the customer: one or more addresses, comma-separated"},"erpId":{"type":["string","null"]},"crmId":{"type":["string","null"]},"relatedCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"status":{"default":"ACTIVE","description":"Customer status","type":"string","enum":["ONBOARDING","ACTIVE","DORMANT","SUSPENDED","INACTIVE","ARCHIVED"]},"kind":{"default":"STANDARD","description":"STANDARD processes payments; PROVIDER is a payment provider the organization works with","type":"string","enum":["STANDARD","PROVIDER"]},"legalEntityType":{"default":"COMPANY","description":"COMPANY or INDIVIDUAL. Shared by every customer of the same legal entity","type":"string","enum":["COMPANY","INDIVIDUAL"]},"individual":{"description":"The person, when legalEntityType is INDIVIDUAL; legalName is then their first and last name","anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"]},{"type":"null"}]}},"required":["legalName","contactEmail"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},{"type":"string","const":""}]},"legalName":{"type":"string","minLength":1},"url":{"anyOf":[{"type":["string","null"]},{"type":"string","const":""}]},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"description":"VAT number and type; a company's only, dropped for an individual","anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"description":"Address 1","type":["string","null"]},"address2":{"description":"Address 2","type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"anyOf":[{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},{"type":"string","const":""}]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]},"erpId":{"type":["string","null"]},"crmId":{"type":["string","null"]},"relatedCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"status":{"default":"ACTIVE","description":"Customer status","type":"string","enum":["ONBOARDING","ACTIVE","DORMANT","SUSPENDED","INACTIVE","ARCHIVED"]},"kind":{"default":"STANDARD","description":"STANDARD processes payments; PROVIDER is a payment provider the organization works with","type":"string","enum":["STANDARD","PROVIDER"]},"legalEntityType":{"default":"COMPANY","description":"COMPANY or INDIVIDUAL. Shared by every customer of the same legal entity","type":"string","enum":["COMPANY","INDIVIDUAL"]},"individual":{"description":"The person, when legalEntityType is INDIVIDUAL; legalName is then their first and last name","anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","organizationId","legalName","status","kind","legalEntityType","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/organizations/customers/acceptance":{"get":{"summary":"The customers the organization takes on: merchants and/or payment providers, companies and/or individuals","tags":["customers"],"parameters":[{"name":"organizationId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"acceptedCustomerKinds":{"type":"array","items":{"type":"string","enum":["STANDARD","PROVIDER"]}},"acceptedLegalEntityTypes":{"type":"array","items":{"type":"string","enum":["COMPANY","INDIVIDUAL"]}}},"required":["acceptedCustomerKinds","acceptedLegalEntityTypes"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/organizations/customers/{id}":{"patch":{"description":"Company fields (legal entity type, the individual, legal name, registration and VAT number, address, website, phone, email) belong to the profile every customer of the same company or person shares: changing one here saves a new version of it.","summary":"Update a customer","tags":["customers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"anyOf":[{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},{"type":"string","const":""}]},"legalName":{"type":"string","minLength":1},"url":{"anyOf":[{"type":["string","null"]},{"type":"string","const":""}]},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"description":"VAT number and type; a company's only, dropped for an individual","anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}}},{"type":"null"}]},"address1":{"description":"Address 1","type":["string","null"]},"address2":{"description":"Address 2","type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"anyOf":[{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},{"type":"string","const":""}]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":"string","description":"Who to contact at the customer: one or more addresses, comma-separated"},"erpId":{"type":["string","null"]},"crmId":{"type":["string","null"]},"relatedCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"status":{"type":"string","enum":["ONBOARDING","ACTIVE","DORMANT","SUSPENDED","INACTIVE","ARCHIVED"],"description":"Customer status"},"legalEntityType":{"type":"string","enum":["COMPANY","INDIVIDUAL"],"description":"COMPANY or INDIVIDUAL. Shared by every customer of the same legal entity"},"individual":{"description":"The person, when legalEntityType is INDIVIDUAL; legalName is then their first and last name","anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"]},{"type":"null"}]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},{"type":"string","const":""}]},"legalName":{"type":"string","minLength":1},"url":{"anyOf":[{"type":["string","null"]},{"type":"string","const":""}]},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"description":"VAT number and type; a company's only, dropped for an individual","anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"description":"Address 1","type":["string","null"]},"address2":{"description":"Address 2","type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"anyOf":[{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},{"type":"string","const":""}]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]},"erpId":{"type":["string","null"]},"crmId":{"type":["string","null"]},"relatedCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"status":{"default":"ACTIVE","description":"Customer status","type":"string","enum":["ONBOARDING","ACTIVE","DORMANT","SUSPENDED","INACTIVE","ARCHIVED"]},"kind":{"default":"STANDARD","description":"STANDARD processes payments; PROVIDER is a payment provider the organization works with","type":"string","enum":["STANDARD","PROVIDER"]},"legalEntityType":{"default":"COMPANY","description":"COMPANY or INDIVIDUAL. Shared by every customer of the same legal entity","type":"string","enum":["COMPANY","INDIVIDUAL"]},"individual":{"description":"The person, when legalEntityType is INDIVIDUAL; legalName is then their first and last name","anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","organizationId","legalName","status","kind","legalEntityType","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string","enum":["NOT_CONTROLLER","VERSION_CONFLICT"]}},"required":["message","code"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a customer","tags":["customers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},{"type":"string","const":""}]},"legalName":{"type":"string","minLength":1},"url":{"anyOf":[{"type":["string","null"]},{"type":"string","const":""}]},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"description":"VAT number and type; a company's only, dropped for an individual","anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"description":"Address 1","type":["string","null"]},"address2":{"description":"Address 2","type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"anyOf":[{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},{"type":"string","const":""}]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]},"erpId":{"type":["string","null"]},"crmId":{"type":["string","null"]},"relatedCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"status":{"default":"ACTIVE","description":"Customer status","type":"string","enum":["ONBOARDING","ACTIVE","DORMANT","SUSPENDED","INACTIVE","ARCHIVED"]},"kind":{"default":"STANDARD","description":"STANDARD processes payments; PROVIDER is a payment provider the organization works with","type":"string","enum":["STANDARD","PROVIDER"]},"legalEntityType":{"default":"COMPANY","description":"COMPANY or INDIVIDUAL. Shared by every customer of the same legal entity","type":"string","enum":["COMPANY","INDIVIDUAL"]},"individual":{"description":"The person, when legalEntityType is INDIVIDUAL; legalName is then their first and last name","anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","organizationId","legalName","status","kind","legalEntityType","createdAt","updatedAt"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/customers/{id}/act-as":{"post":{"description":"Checks that the caller may work in this customer with their organization roles and returns the context to select for it. Users only.","summary":"Act on behalf of a customer","tags":["customers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"providerDataVisible":{"type":"boolean"},"customerKind":{"type":"string","enum":["STANDARD","PROVIDER"]},"liveAllowed":{"type":"boolean"},"modeAccess":{"type":"string","enum":["both","test","live"]}},"required":["context","name"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/customers/{id}/legal-entity":{"get":{"summary":"Get the company profile shared by every customer of this company","tags":["customers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"origin":{"type":"string","enum":["MIGRATED","OPERATOR","ERP_SYNC","PROVISIONED","SELF_SERVICE","ORGANIZATION"]},"company":{"type":"object","properties":{"legalEntityType":{"anyOf":[{"type":"string","enum":["COMPANY","INDIVIDUAL"]},{"type":"null"}]},"individual":{"anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"],"additionalProperties":false},{"type":"null"}]},"legalName":{"type":"string","minLength":1},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"type":["string","null"]},"type":{"anyOf":[{"type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"legalForm":{"description":"Legal form, e.g. Aktiebolag, GmbH, Ltd","type":["string","null"]},"incorporationDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"url":{"type":["string","null"]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"people":{"type":"array","items":{"type":"object","properties":{"personKey":{"type":"string"},"roles":{"minItems":1,"type":"array","items":{"type":"string","enum":["DIRECTOR","UBO","SIGNATORY","SHAREHOLDER"]}},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"residenceCountry":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]},"controlType":{"anyOf":[{"type":"string","enum":["OWNERSHIP","VOTING","OTHER_CONTROL","SENIOR_MANAGER"]},{"type":"null"}]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["personKey","roles","firstName","lastName"],"additionalProperties":false}},"owners":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"regNo":{"type":["string","null"]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["REGISTRY_EXTRACT","ARTICLES","SHAREHOLDER_REGISTER","UBO_DECLARATION","OTHER"]},"fileName":{"type":"string"},"fileType":{"type":"string"},"fileSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"uploadedAt":{"type":"string"},"addedInVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"byYourOrganization":{"type":"boolean"},"uploadedByName":{"type":["string","null"]}},"required":["id","kind","fileName","fileType","fileSize","uploadedAt","addedInVersion","byYourOrganization","uploadedByName"],"additionalProperties":false}},"documentStorage":{"type":"boolean"},"updatedAt":{"type":"string"},"isController":{"type":"boolean"},"sharedWithYou":{"anyOf":[{"type":"object","properties":{"consentedAt":{"type":"string"}},"required":["consentedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["id","version","origin","company","people","owners","documents","documentStorage","updatedAt","isController","sharedWithYou"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"put":{"description":"Replaces company details, people and corporate owners. The change is seen by every customer of the same company.","summary":"Save a new version of the shared company profile","tags":["customers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"company":{"type":"object","properties":{"legalEntityType":{"anyOf":[{"type":"string","enum":["COMPANY","INDIVIDUAL"]},{"type":"null"}]},"individual":{"anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"]},{"type":"null"}]},"legalName":{"type":"string","minLength":1},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"type":["string","null"]},"type":{"anyOf":[{"type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]},{"type":"null"}]}}},{"type":"null"}]},"legalForm":{"description":"Legal form, e.g. Aktiebolag, GmbH, Ltd","type":["string","null"]},"incorporationDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"url":{"type":["string","null"]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["legalName"]},"people":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"personKey":{"type":"string","minLength":1,"maxLength":64},"roles":{"minItems":1,"type":"array","items":{"type":"string","enum":["DIRECTOR","UBO","SIGNATORY","SHAREHOLDER"]}},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"residenceCountry":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]},"controlType":{"anyOf":[{"type":"string","enum":["OWNERSHIP","VOTING","OTHER_CONTROL","SENIOR_MANAGER"]},{"type":"null"}]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["roles","firstName","lastName"]}},"owners":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"regNo":{"type":["string","null"]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]}},"required":["name"]}}},"required":["expectedVersion","company","people","owners"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"origin":{"type":"string","enum":["MIGRATED","OPERATOR","ERP_SYNC","PROVISIONED","SELF_SERVICE","ORGANIZATION"]},"company":{"type":"object","properties":{"legalEntityType":{"anyOf":[{"type":"string","enum":["COMPANY","INDIVIDUAL"]},{"type":"null"}]},"individual":{"anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"],"additionalProperties":false},{"type":"null"}]},"legalName":{"type":"string","minLength":1},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"type":["string","null"]},"type":{"anyOf":[{"type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"legalForm":{"description":"Legal form, e.g. Aktiebolag, GmbH, Ltd","type":["string","null"]},"incorporationDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"url":{"type":["string","null"]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"people":{"type":"array","items":{"type":"object","properties":{"personKey":{"type":"string"},"roles":{"minItems":1,"type":"array","items":{"type":"string","enum":["DIRECTOR","UBO","SIGNATORY","SHAREHOLDER"]}},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"residenceCountry":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]},"controlType":{"anyOf":[{"type":"string","enum":["OWNERSHIP","VOTING","OTHER_CONTROL","SENIOR_MANAGER"]},{"type":"null"}]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["personKey","roles","firstName","lastName"],"additionalProperties":false}},"owners":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"regNo":{"type":["string","null"]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["REGISTRY_EXTRACT","ARTICLES","SHAREHOLDER_REGISTER","UBO_DECLARATION","OTHER"]},"fileName":{"type":"string"},"fileType":{"type":"string"},"fileSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"uploadedAt":{"type":"string"},"addedInVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"byYourOrganization":{"type":"boolean"},"uploadedByName":{"type":["string","null"]}},"required":["id","kind","fileName","fileType","fileSize","uploadedAt","addedInVersion","byYourOrganization","uploadedByName"],"additionalProperties":false}},"documentStorage":{"type":"boolean"},"updatedAt":{"type":"string"},"isController":{"type":"boolean"},"sharedWithYou":{"anyOf":[{"type":"object","properties":{"consentedAt":{"type":"string"}},"required":["consentedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["id","version","origin","company","people","owners","documents","documentStorage","updatedAt","isController","sharedWithYou"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string","enum":["NOT_CONTROLLER","VERSION_CONFLICT"]}},"required":["message","code"],"additionalProperties":false}}}}}}},"/api/v1/customers/{id}/legal-entity/versions":{"get":{"summary":"List the versions of the shared company profile, newest first","tags":["customers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changeReason":{"type":"string","enum":["MIGRATED","CREATED","DETAILS_CHANGE","ADDRESS_CHANGE","DIRECTOR_CHANGE","UBO_CHANGE","PEOPLE_CHANGE","OWNERSHIP_CHANGE","DOCUMENTS_CHANGE","MERGED"]},"changedFields":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"byYourOrganization":{"type":"boolean"},"createdByName":{"type":["string","null"]}},"required":["version","changeReason","changedFields","createdAt","byYourOrganization","createdByName"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/customers/{id}/legal-entity/shares":{"get":{"summary":"The providers this customer keeps up to date with its company profile","tags":["customers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationName":{"type":"string"},"accountName":{"type":["string","null"]},"applicationId":{"type":["string","null"]},"consentedAt":{"type":"string"},"revokedAt":{"type":["string","null"]}},"required":["id","organizationName","accountName","applicationId","consentedAt","revokedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/customers/{id}/legal-entity/shares/{shareId}/revoke":{"post":{"description":"The provider keeps the profile as it is now, as its own record; later changes no longer reach it.","summary":"Stop keeping a provider up to date","tags":["customers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"shareId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationName":{"type":"string"},"accountName":{"type":["string","null"]},"applicationId":{"type":["string","null"]},"consentedAt":{"type":"string"},"revokedAt":{"type":["string","null"]}},"required":["id","organizationName","accountName","applicationId","consentedAt","revokedAt"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/customers/{id}/legal-entity/documents":{"post":{"summary":"Add a company document, as a new version of the shared profile","tags":["customers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"kind":{"type":"string","enum":["REGISTRY_EXTRACT","ARTICLES","SHAREHOLDER_REGISTER","UBO_DECLARATION","OTHER"]},"fileName":{"type":"string","minLength":1,"maxLength":200},"fileType":{"type":"string","enum":["application/pdf","image/png","image/jpeg","image/jpg"]},"contentBase64":{"type":"string","minLength":1,"maxLength":13981018}},"required":["expectedVersion","kind","fileName","fileType","contentBase64"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"origin":{"type":"string","enum":["MIGRATED","OPERATOR","ERP_SYNC","PROVISIONED","SELF_SERVICE","ORGANIZATION"]},"company":{"type":"object","properties":{"legalEntityType":{"anyOf":[{"type":"string","enum":["COMPANY","INDIVIDUAL"]},{"type":"null"}]},"individual":{"anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"],"additionalProperties":false},{"type":"null"}]},"legalName":{"type":"string","minLength":1},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"type":["string","null"]},"type":{"anyOf":[{"type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"legalForm":{"description":"Legal form, e.g. Aktiebolag, GmbH, Ltd","type":["string","null"]},"incorporationDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"url":{"type":["string","null"]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"people":{"type":"array","items":{"type":"object","properties":{"personKey":{"type":"string"},"roles":{"minItems":1,"type":"array","items":{"type":"string","enum":["DIRECTOR","UBO","SIGNATORY","SHAREHOLDER"]}},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"residenceCountry":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]},"controlType":{"anyOf":[{"type":"string","enum":["OWNERSHIP","VOTING","OTHER_CONTROL","SENIOR_MANAGER"]},{"type":"null"}]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["personKey","roles","firstName","lastName"],"additionalProperties":false}},"owners":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"regNo":{"type":["string","null"]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["REGISTRY_EXTRACT","ARTICLES","SHAREHOLDER_REGISTER","UBO_DECLARATION","OTHER"]},"fileName":{"type":"string"},"fileType":{"type":"string"},"fileSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"uploadedAt":{"type":"string"},"addedInVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"byYourOrganization":{"type":"boolean"},"uploadedByName":{"type":["string","null"]}},"required":["id","kind","fileName","fileType","fileSize","uploadedAt","addedInVersion","byYourOrganization","uploadedByName"],"additionalProperties":false}},"documentStorage":{"type":"boolean"},"updatedAt":{"type":"string"},"isController":{"type":"boolean"},"sharedWithYou":{"anyOf":[{"type":"object","properties":{"consentedAt":{"type":"string"}},"required":["consentedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["id","version","origin","company","people","owners","documents","documentStorage","updatedAt","isController","sharedWithYou"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string","enum":["NOT_CONTROLLER","VERSION_CONFLICT"]}},"required":["message","code"],"additionalProperties":false}}}},"503":{"description":"503","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/customers/{id}/legal-entity/documents/{documentId}/remove":{"post":{"summary":"Remove a company document, as a new version; earlier versions keep it","tags":["customers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["expectedVersion"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"origin":{"type":"string","enum":["MIGRATED","OPERATOR","ERP_SYNC","PROVISIONED","SELF_SERVICE","ORGANIZATION"]},"company":{"type":"object","properties":{"legalEntityType":{"anyOf":[{"type":"string","enum":["COMPANY","INDIVIDUAL"]},{"type":"null"}]},"individual":{"anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"],"additionalProperties":false},{"type":"null"}]},"legalName":{"type":"string","minLength":1},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"type":["string","null"]},"type":{"anyOf":[{"type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"legalForm":{"description":"Legal form, e.g. Aktiebolag, GmbH, Ltd","type":["string","null"]},"incorporationDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"url":{"type":["string","null"]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"people":{"type":"array","items":{"type":"object","properties":{"personKey":{"type":"string"},"roles":{"minItems":1,"type":"array","items":{"type":"string","enum":["DIRECTOR","UBO","SIGNATORY","SHAREHOLDER"]}},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"residenceCountry":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]},"controlType":{"anyOf":[{"type":"string","enum":["OWNERSHIP","VOTING","OTHER_CONTROL","SENIOR_MANAGER"]},{"type":"null"}]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["personKey","roles","firstName","lastName"],"additionalProperties":false}},"owners":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"regNo":{"type":["string","null"]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["REGISTRY_EXTRACT","ARTICLES","SHAREHOLDER_REGISTER","UBO_DECLARATION","OTHER"]},"fileName":{"type":"string"},"fileType":{"type":"string"},"fileSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"uploadedAt":{"type":"string"},"addedInVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"byYourOrganization":{"type":"boolean"},"uploadedByName":{"type":["string","null"]}},"required":["id","kind","fileName","fileType","fileSize","uploadedAt","addedInVersion","byYourOrganization","uploadedByName"],"additionalProperties":false}},"documentStorage":{"type":"boolean"},"updatedAt":{"type":"string"},"isController":{"type":"boolean"},"sharedWithYou":{"anyOf":[{"type":"object","properties":{"consentedAt":{"type":"string"}},"required":["consentedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["id","version","origin","company","people","owners","documents","documentStorage","updatedAt","isController","sharedWithYou"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string","enum":["NOT_CONTROLLER","VERSION_CONFLICT"]}},"required":["message","code"],"additionalProperties":false}}}}}}},"/api/v1/customers/{id}/legal-entity/documents/{documentId}/download":{"get":{"summary":"Download a company document — one of any version of the customer's company profile","tags":["customers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"503":{"description":"503","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/customers/{id}/legal-entity/versions/{version}":{"get":{"summary":"Get one version of the shared company profile","tags":["customers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changeReason":{"type":"string","enum":["MIGRATED","CREATED","DETAILS_CHANGE","ADDRESS_CHANGE","DIRECTOR_CHANGE","UBO_CHANGE","PEOPLE_CHANGE","OWNERSHIP_CHANGE","DOCUMENTS_CHANGE","MERGED"]},"changedFields":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"byYourOrganization":{"type":"boolean"},"createdByName":{"type":["string","null"]},"company":{"type":"object","properties":{"legalEntityType":{"anyOf":[{"type":"string","enum":["COMPANY","INDIVIDUAL"]},{"type":"null"}]},"individual":{"anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"],"additionalProperties":false},{"type":"null"}]},"legalName":{"type":"string","minLength":1},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"type":["string","null"]},"type":{"anyOf":[{"type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"legalForm":{"description":"Legal form, e.g. Aktiebolag, GmbH, Ltd","type":["string","null"]},"incorporationDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"url":{"type":["string","null"]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"people":{"type":"array","items":{"type":"object","properties":{"personKey":{"type":"string"},"roles":{"minItems":1,"type":"array","items":{"type":"string","enum":["DIRECTOR","UBO","SIGNATORY","SHAREHOLDER"]}},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"residenceCountry":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]},"controlType":{"anyOf":[{"type":"string","enum":["OWNERSHIP","VOTING","OTHER_CONTROL","SENIOR_MANAGER"]},{"type":"null"}]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["personKey","roles","firstName","lastName"],"additionalProperties":false}},"owners":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"regNo":{"type":["string","null"]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["REGISTRY_EXTRACT","ARTICLES","SHAREHOLDER_REGISTER","UBO_DECLARATION","OTHER"]},"fileName":{"type":"string"},"fileType":{"type":"string"},"fileSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"uploadedAt":{"type":"string"},"addedInVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"byYourOrganization":{"type":"boolean"},"uploadedByName":{"type":["string","null"]}},"required":["id","kind","fileName","fileType","fileSize","uploadedAt","addedInVersion","byYourOrganization","uploadedByName"],"additionalProperties":false}}},"required":["version","changeReason","changedFields","createdAt","byYourOrganization","createdByName","company","people","owners","documents"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/kyb-reviews":{"get":{"summary":"Reviews of this organization's customers, newest first","tags":["kybReviews"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"customerId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"page","in":"query","schema":{"default":1,"type":"number","minimum":1}},{"name":"limit","in":"query","schema":{"default":100,"type":"number","minimum":1}},{"name":"dateRange","in":"query","style":"deepObject","schema":{"type":"object","properties":{"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}}}},{"name":"refresh","in":"query","schema":{"type":"boolean"}},{"name":"open","in":"query","schema":{"type":"boolean"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["status","trigger","changeReason","riskRating","customerName","dueAt","createdAt"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"customerId":{"type":"string"},"customerName":{"type":"string"},"status":{"type":"string","enum":["REVIEW_REQUIRED","IN_REVIEW","INFO_REQUESTED","APPROVED","REJECTED","SUPERSEDED"]},"trigger":{"type":"string","enum":["ENTITY_CHANGE","SCHEDULED","MANUAL","ONBOARDING"]},"changeReason":{"anyOf":[{"type":"string","enum":["MIGRATED","CREATED","DETAILS_CHANGE","ADDRESS_CHANGE","DIRECTOR_CHANGE","UBO_CHANGE","PEOPLE_CHANGE","OWNERSHIP_CHANGE","DOCUMENTS_CHANGE","MERGED"]},{"type":"null"}]},"entityVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"riskRating":{"anyOf":[{"type":"string","enum":["LOW","MEDIUM","HIGH"]},{"type":"null"}]},"dueAt":{"type":["string","null"]},"assignedToName":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","customerId","customerName","status","trigger","changeReason","entityVersion","riskRating","dueAt","assignedToName","decidedAt","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"},"total":{"type":"number"}},"required":["page","pageSize","hasMore"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"post":{"summary":"Open a review of a customer by hand","tags":["kybReviews"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"note":{"type":"string","maxLength":2000}},"required":["customerId"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"customerId":{"type":"string"},"customerName":{"type":"string"},"status":{"type":"string","enum":["REVIEW_REQUIRED","IN_REVIEW","INFO_REQUESTED","APPROVED","REJECTED","SUPERSEDED"]},"trigger":{"type":"string","enum":["ENTITY_CHANGE","SCHEDULED","MANUAL","ONBOARDING"]},"changeReason":{"anyOf":[{"type":"string","enum":["MIGRATED","CREATED","DETAILS_CHANGE","ADDRESS_CHANGE","DIRECTOR_CHANGE","UBO_CHANGE","PEOPLE_CHANGE","OWNERSHIP_CHANGE","DOCUMENTS_CHANGE","MERGED"]},{"type":"null"}]},"entityVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"riskRating":{"anyOf":[{"type":"string","enum":["LOW","MEDIUM","HIGH"]},{"type":"null"}]},"dueAt":{"type":["string","null"]},"assignedToName":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","customerId","customerName","status","trigger","changeReason","entityVersion","riskRating","dueAt","assignedToName","decidedAt","createdAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/kyb-reviews/pending-count":{"get":{"summary":"How many reviews are open, and how many of them are overdue — the nav badge","tags":["kybReviews"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"},"overdue":{"type":"number"}},"required":["count","overdue"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/kyb-reviews/summary":{"get":{"summary":"A customer's effective review, its next review date and its open review","tags":["kybReviews"],"parameters":[{"name":"customerId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"effective":{"anyOf":[{"type":"object","properties":{"reviewId":{"type":"string"},"riskRating":{"anyOf":[{"type":"string","enum":["LOW","MEDIUM","HIGH"]},{"type":"null"}]},"entityVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"decidedAt":{"type":["string","null"]}},"required":["reviewId","riskRating","entityVersion","decidedAt"],"additionalProperties":false},{"type":"null"}]},"nextReviewAt":{"type":["string","null"]},"open":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"customerId":{"type":"string"},"customerName":{"type":"string"},"status":{"type":"string","enum":["REVIEW_REQUIRED","IN_REVIEW","INFO_REQUESTED","APPROVED","REJECTED","SUPERSEDED"]},"trigger":{"type":"string","enum":["ENTITY_CHANGE","SCHEDULED","MANUAL","ONBOARDING"]},"changeReason":{"anyOf":[{"type":"string","enum":["MIGRATED","CREATED","DETAILS_CHANGE","ADDRESS_CHANGE","DIRECTOR_CHANGE","UBO_CHANGE","PEOPLE_CHANGE","OWNERSHIP_CHANGE","DOCUMENTS_CHANGE","MERGED"]},{"type":"null"}]},"entityVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"riskRating":{"anyOf":[{"type":"string","enum":["LOW","MEDIUM","HIGH"]},{"type":"null"}]},"dueAt":{"type":["string","null"]},"assignedToName":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","customerId","customerName","status","trigger","changeReason","entityVersion","riskRating","dueAt","assignedToName","decidedAt","createdAt"],"additionalProperties":false},{"type":"null"}]}},"required":["customerId","effective","nextReviewAt","open"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/kyb-reviews/{id}":{"get":{"summary":"One review, with the version under review and the one to compare it with","tags":["kybReviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"customerId":{"type":"string"},"customerName":{"type":"string"},"status":{"type":"string","enum":["REVIEW_REQUIRED","IN_REVIEW","INFO_REQUESTED","APPROVED","REJECTED","SUPERSEDED"]},"trigger":{"type":"string","enum":["ENTITY_CHANGE","SCHEDULED","MANUAL","ONBOARDING"]},"changeReason":{"anyOf":[{"type":"string","enum":["MIGRATED","CREATED","DETAILS_CHANGE","ADDRESS_CHANGE","DIRECTOR_CHANGE","UBO_CHANGE","PEOPLE_CHANGE","OWNERSHIP_CHANGE","DOCUMENTS_CHANGE","MERGED"]},{"type":"null"}]},"entityVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"riskRating":{"anyOf":[{"type":"string","enum":["LOW","MEDIUM","HIGH"]},{"type":"null"}]},"dueAt":{"type":["string","null"]},"assignedToName":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"note":{"type":["string","null"]},"screeningNotes":{"type":["string","null"]},"decidedByName":{"type":["string","null"]},"previousReviewId":{"type":["string","null"]},"previousRiskRating":{"anyOf":[{"type":"string","enum":["LOW","MEDIUM","HIGH"]},{"type":"null"}]},"version":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changeReason":{"type":"string","enum":["MIGRATED","CREATED","DETAILS_CHANGE","ADDRESS_CHANGE","DIRECTOR_CHANGE","UBO_CHANGE","PEOPLE_CHANGE","OWNERSHIP_CHANGE","DOCUMENTS_CHANGE","MERGED"]},"changedFields":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"byYourOrganization":{"type":"boolean"},"createdByName":{"type":["string","null"]},"company":{"type":"object","properties":{"legalEntityType":{"anyOf":[{"type":"string","enum":["COMPANY","INDIVIDUAL"]},{"type":"null"}]},"individual":{"anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"],"additionalProperties":false},{"type":"null"}]},"legalName":{"type":"string","minLength":1},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"type":["string","null"]},"type":{"anyOf":[{"type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"legalForm":{"description":"Legal form, e.g. Aktiebolag, GmbH, Ltd","type":["string","null"]},"incorporationDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"url":{"type":["string","null"]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"people":{"type":"array","items":{"type":"object","properties":{"personKey":{"type":"string"},"roles":{"minItems":1,"type":"array","items":{"type":"string","enum":["DIRECTOR","UBO","SIGNATORY","SHAREHOLDER"]}},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"residenceCountry":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]},"controlType":{"anyOf":[{"type":"string","enum":["OWNERSHIP","VOTING","OTHER_CONTROL","SENIOR_MANAGER"]},{"type":"null"}]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["personKey","roles","firstName","lastName"],"additionalProperties":false}},"owners":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"regNo":{"type":["string","null"]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["REGISTRY_EXTRACT","ARTICLES","SHAREHOLDER_REGISTER","UBO_DECLARATION","OTHER"]},"fileName":{"type":"string"},"fileType":{"type":"string"},"fileSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"uploadedAt":{"type":"string"},"addedInVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"byYourOrganization":{"type":"boolean"},"uploadedByName":{"type":["string","null"]}},"required":["id","kind","fileName","fileType","fileSize","uploadedAt","addedInVersion","byYourOrganization","uploadedByName"],"additionalProperties":false}}},"required":["version","changeReason","changedFields","createdAt","byYourOrganization","createdByName","company","people","owners","documents"],"additionalProperties":false},"baseline":{"anyOf":[{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changeReason":{"type":"string","enum":["MIGRATED","CREATED","DETAILS_CHANGE","ADDRESS_CHANGE","DIRECTOR_CHANGE","UBO_CHANGE","PEOPLE_CHANGE","OWNERSHIP_CHANGE","DOCUMENTS_CHANGE","MERGED"]},"changedFields":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"byYourOrganization":{"type":"boolean"},"createdByName":{"type":["string","null"]},"company":{"type":"object","properties":{"legalEntityType":{"anyOf":[{"type":"string","enum":["COMPANY","INDIVIDUAL"]},{"type":"null"}]},"individual":{"anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"],"additionalProperties":false},{"type":"null"}]},"legalName":{"type":"string","minLength":1},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"type":["string","null"]},"type":{"anyOf":[{"type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"legalForm":{"description":"Legal form, e.g. Aktiebolag, GmbH, Ltd","type":["string","null"]},"incorporationDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"url":{"type":["string","null"]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"people":{"type":"array","items":{"type":"object","properties":{"personKey":{"type":"string"},"roles":{"minItems":1,"type":"array","items":{"type":"string","enum":["DIRECTOR","UBO","SIGNATORY","SHAREHOLDER"]}},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"residenceCountry":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]},"controlType":{"anyOf":[{"type":"string","enum":["OWNERSHIP","VOTING","OTHER_CONTROL","SENIOR_MANAGER"]},{"type":"null"}]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["personKey","roles","firstName","lastName"],"additionalProperties":false}},"owners":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"regNo":{"type":["string","null"]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["REGISTRY_EXTRACT","ARTICLES","SHAREHOLDER_REGISTER","UBO_DECLARATION","OTHER"]},"fileName":{"type":"string"},"fileType":{"type":"string"},"fileSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"uploadedAt":{"type":"string"},"addedInVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"byYourOrganization":{"type":"boolean"},"uploadedByName":{"type":["string","null"]}},"required":["id","kind","fileName","fileType","fileSize","uploadedAt","addedInVersion","byYourOrganization","uploadedByName"],"additionalProperties":false}}},"required":["version","changeReason","changedFields","createdAt","byYourOrganization","createdByName","company","people","owners","documents"],"additionalProperties":false},{"type":"null"}]},"baselineKind":{"type":"string","enum":["LAST_APPROVED","PREVIOUS_VERSION","NONE"]},"isLatestVersion":{"type":"boolean"},"onboarding":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["DRAFT","SUBMITTED","INFO_REQUESTED","APPROVED","REJECTED"]},"founderEmail":{"type":["string","null"]},"noUboDeclared":{"type":"boolean"},"agreementTitle":{"type":["string","null"]},"agreementVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"acceptedName":{"type":["string","null"]},"acceptedAt":{"type":["string","null"]}},"required":["status","founderEmail","noUboDeclared","agreementTitle","agreementVersion","acceptedName","acceptedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["id","customerId","customerName","status","trigger","changeReason","entityVersion","riskRating","dueAt","assignedToName","decidedAt","createdAt","note","screeningNotes","decidedByName","previousReviewId","previousRiskRating","version","baseline","baselineKind","isLatestVersion"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/kyb-reviews/{id}/claim":{"post":{"summary":"Take an open review: it is IN_REVIEW and assigned to you","tags":["kybReviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"customerId":{"type":"string"},"customerName":{"type":"string"},"status":{"type":"string","enum":["REVIEW_REQUIRED","IN_REVIEW","INFO_REQUESTED","APPROVED","REJECTED","SUPERSEDED"]},"trigger":{"type":"string","enum":["ENTITY_CHANGE","SCHEDULED","MANUAL","ONBOARDING"]},"changeReason":{"anyOf":[{"type":"string","enum":["MIGRATED","CREATED","DETAILS_CHANGE","ADDRESS_CHANGE","DIRECTOR_CHANGE","UBO_CHANGE","PEOPLE_CHANGE","OWNERSHIP_CHANGE","DOCUMENTS_CHANGE","MERGED"]},{"type":"null"}]},"entityVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"riskRating":{"anyOf":[{"type":"string","enum":["LOW","MEDIUM","HIGH"]},{"type":"null"}]},"dueAt":{"type":["string","null"]},"assignedToName":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","customerId","customerName","status","trigger","changeReason","entityVersion","riskRating","dueAt","assignedToName","decidedAt","createdAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/kyb-reviews/{id}/decision":{"post":{"summary":"Approve (with a risk rating), reject, or ask the customer for information","tags":["kybReviews"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["APPROVED","REJECTED","INFO_REQUESTED"]},"riskRating":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"screeningNotes":{"type":"string","maxLength":10000},"note":{"type":"string","maxLength":5000}},"required":["outcome"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"customerId":{"type":"string"},"customerName":{"type":"string"},"status":{"type":"string","enum":["REVIEW_REQUIRED","IN_REVIEW","INFO_REQUESTED","APPROVED","REJECTED","SUPERSEDED"]},"trigger":{"type":"string","enum":["ENTITY_CHANGE","SCHEDULED","MANUAL","ONBOARDING"]},"changeReason":{"anyOf":[{"type":"string","enum":["MIGRATED","CREATED","DETAILS_CHANGE","ADDRESS_CHANGE","DIRECTOR_CHANGE","UBO_CHANGE","PEOPLE_CHANGE","OWNERSHIP_CHANGE","DOCUMENTS_CHANGE","MERGED"]},{"type":"null"}]},"entityVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"riskRating":{"anyOf":[{"type":"string","enum":["LOW","MEDIUM","HIGH"]},{"type":"null"}]},"dueAt":{"type":["string","null"]},"assignedToName":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","customerId","customerName","status","trigger","changeReason","entityVersion","riskRating","dueAt","assignedToName","decidedAt","createdAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/onboarding-program":{"get":{"summary":"This organization's signup links, one per kind of customer: on/off, code, agreement","tags":["onboardingAdmin"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"links":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["STANDARD","PROVIDER"]},"enabled":{"type":"boolean"},"signupCode":{"type":"string"},"agreement":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"body":{"type":"string"},"publishedAt":{"type":"string"}},"required":["id","version","title","body","publishedAt"],"additionalProperties":false},{"type":"null"}]},"agreements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"body":{"type":"string"},"publishedAt":{"type":"string"}},"required":["id","version","title","body","publishedAt"],"additionalProperties":false}}},"required":["kind","enabled","signupCode","agreement","agreements"],"additionalProperties":false}}},"required":["links"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"put":{"summary":"Switch self-signup for one kind of customer on or off","tags":["onboardingAdmin"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["STANDARD","PROVIDER"]},"enabled":{"type":"boolean"}},"required":["kind","enabled"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"links":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["STANDARD","PROVIDER"]},"enabled":{"type":"boolean"},"signupCode":{"type":"string"},"agreement":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"body":{"type":"string"},"publishedAt":{"type":"string"}},"required":["id","version","title","body","publishedAt"],"additionalProperties":false},{"type":"null"}]},"agreements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"body":{"type":"string"},"publishedAt":{"type":"string"}},"required":["id","version","title","body","publishedAt"],"additionalProperties":false}}},"required":["kind","enabled","signupCode","agreement","agreements"],"additionalProperties":false}}},"required":["links"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/onboarding-program/rotate-code":{"post":{"summary":"Retire one kind's signup link and issue a new one","tags":["onboardingAdmin"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["STANDARD","PROVIDER"]}},"required":["kind"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"links":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["STANDARD","PROVIDER"]},"enabled":{"type":"boolean"},"signupCode":{"type":"string"},"agreement":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"body":{"type":"string"},"publishedAt":{"type":"string"}},"required":["id","version","title","body","publishedAt"],"additionalProperties":false},{"type":"null"}]},"agreements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"body":{"type":"string"},"publishedAt":{"type":"string"}},"required":["id","version","title","body","publishedAt"],"additionalProperties":false}}},"required":["kind","enabled","signupCode","agreement","agreements"],"additionalProperties":false}}},"required":["links"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/onboarding-program/agreements":{"post":{"summary":"Publish a new version of one kind's customer agreement","tags":["onboardingAdmin"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["STANDARD","PROVIDER"]},"title":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":20,"maxLength":100000}},"required":["kind","title","body"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"links":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["STANDARD","PROVIDER"]},"enabled":{"type":"boolean"},"signupCode":{"type":"string"},"agreement":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"body":{"type":"string"},"publishedAt":{"type":"string"}},"required":["id","version","title","body","publishedAt"],"additionalProperties":false},{"type":"null"}]},"agreements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"body":{"type":"string"},"publishedAt":{"type":"string"}},"required":["id","version","title","body","publishedAt"],"additionalProperties":false}}},"required":["kind","enabled","signupCode","agreement","agreements"],"additionalProperties":false}}},"required":["links"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/onboarding-program/applications":{"get":{"summary":"Applications through this organization's signup link, newest first","tags":["onboardingAdmin"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"customerId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"page","in":"query","schema":{"default":1,"type":"number","minimum":1}},{"name":"limit","in":"query","schema":{"default":100,"type":"number","minimum":1}},{"name":"dateRange","in":"query","style":"deepObject","schema":{"type":"object","properties":{"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}}}},{"name":"refresh","in":"query","schema":{"type":"boolean"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["status","kind","legalEntityType","legalName","founderEmail","createdAt","submittedAt"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"customerId":{"type":"string"},"legalName":{"type":"string"},"kind":{"type":"string","enum":["STANDARD","PROVIDER"]},"legalEntityType":{"type":"string","enum":["COMPANY","INDIVIDUAL"]},"founderEmail":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","SUBMITTED","INFO_REQUESTED","APPROVED","REJECTED"]},"reviewId":{"type":["string","null"]},"submittedAt":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","customerId","legalName","kind","legalEntityType","founderEmail","status","reviewId","submittedAt","decidedAt","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"},"total":{"type":"number"}},"required":["page","pageSize","hasMore"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/dashboards":{"get":{"description":"Returns a paginated list of dashboards the user can access based on their current context and permissions","summary":"List dashboards accessible in current context","tags":["dashboards"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"customerId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"page","in":"query","schema":{"default":1,"type":"number","minimum":1}},{"name":"limit","in":"query","schema":{"default":100,"type":"number","minimum":1}},{"name":"dateRange","in":"query","style":"deepObject","schema":{"type":"object","properties":{"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}}}},{"name":"refresh","in":"query","schema":{"type":"boolean"}},{"name":"sortBy","in":"query","schema":{"type":"string","enum":["customernumber","name"]}},{"name":"visibility","in":"query","schema":{"type":"string","enum":["private","internal","public"]}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"default":"organization","type":"string","enum":["organization","partner","customer","user"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"visibility":{"default":"internal","type":"string","enum":["private","internal","public"]},"name":{"type":"string","minLength":1},"description":{"type":"string"},"layoutType":{"default":"grid","type":"string","enum":["grid","flex","fixed"]},"isHomePage":{"default":false,"type":"boolean"},"globalFilters":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"date_range"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"default":{"type":"object","properties":{"preset":{"type":"string"},"custom":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"additionalProperties":false},"timezone":{"type":"string"}},"additionalProperties":false}},"required":["id","type","label","enabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"text"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"placeholder":{"type":"string"},"default":{"type":"string"}},"required":["id","type","label","enabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"select"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"default":{"type":"string"}},"required":["id","type","label","enabled","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"multi_select"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"default":{"type":"array","items":{"type":"string"}}},"required":["id","type","label","enabled","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"number_range"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"default":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"}},"additionalProperties":false}},"required":["id","type","label","enabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"search_filter"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"placeholder":{"type":"string"},"default":{"type":"string"},"negate":{"type":"boolean"}},"required":["id","type","label","enabled"],"additionalProperties":false}]}},"widgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"dashboardId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"widgetType":{"type":"string","enum":["counter","piechart","table","timeseries","note","funnel"]},"title":{"type":"string"},"description":{"type":"string"},"query":{"type":"string"},"dataset":{"type":"string"},"positionX":{"type":"integer","minimum":0,"maximum":9007199254740991},"positionY":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":1,"maximum":9007199254740991},"height":{"type":"integer","minimum":1,"maximum":9007199254740991},"config":{"anyOf":[{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"chartType":{"type":"string","enum":["line","area","bar"]},"xAxis":{"type":"object","properties":{"dataKey":{"type":"string"},"label":{"type":"string"}},"required":["dataKey"],"additionalProperties":false},"yAxis":{"type":"object","properties":{"label":{"type":"string"},"min":{"type":"number"},"max":{"type":"number"}},"additionalProperties":false}},"required":["chartType","xAxis","yAxis"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"format":{"type":"string","enum":["number","currency","percentage"]},"prefix":{"type":"string"},"suffix":{"type":"string"},"decimals":{"type":"number"},"size":{"type":"string","enum":["small","medium","large","xlarge"]},"currency":{"type":"string"},"locale":{"type":"string"},"accentColor":{"type":"string"},"icon":{"type":"string"},"comparison":{"type":"object","properties":{"enabled":{"type":"boolean"},"type":{"type":"string","enum":["percentage","absolute"]},"period":{"type":"string","enum":["previous","year_ago"]},"invertColors":{"type":"boolean"}},"required":["enabled","type","period"],"additionalProperties":false}},"required":["format"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"donut":{"type":"boolean"},"labelKey":{"type":"string"},"valueKey":{"type":"string"},"showPercentage":{"type":"boolean"},"legendPosition":{"type":"string","enum":["top","bottom","left","right"]},"legendValues":{"type":"string","enum":["none","value","percentage","both"]},"maxSize":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["labelKey","valueKey"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"stepField":{"type":"string","minLength":1},"countField":{"type":"string"},"steps":{"minItems":2,"type":"array","items":{"type":"object","properties":{"value":{"type":["number","string"]},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"groupBy":{"type":"string"},"cumulative":{"type":"boolean"}},"required":["stepField","steps"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"header":{"type":"string"},"width":{"type":"number"},"format":{"type":"string","enum":["text","number","currency","date","boolean"]}},"required":["key","header"],"additionalProperties":false}},"pagination":{"type":"boolean"},"pageSize":{"type":"number"}},"required":["columns"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"content":{}},"required":["content"],"additionalProperties":false},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"filterMapping":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"enabled":{"type":"boolean"},"mapTo":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["enabled"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["dashboardId","widgetType","title","query","dataset","positionX","positionY","width","height","config"],"additionalProperties":false}},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"dashboardId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"sequenceNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["dashboardId","name","sequenceNumber"],"additionalProperties":false}},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["contextType","contextId","visibility","name","layoutType","isHomePage"],"additionalProperties":false}},"meta":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"},"total":{"type":"number"}},"required":["page","pageSize","hasMore"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"post":{"description":"Creates a new dashboard in the current context or specified context","summary":"Create a new dashboard","tags":["dashboards"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"visibility":{"default":"internal","type":"string","enum":["private","internal","public"]},"name":{"type":"string","minLength":1},"description":{"type":"string"},"layoutType":{"default":"grid","type":"string","enum":["grid","flex","fixed"]},"isHomePage":{"default":false,"type":"boolean"},"globalFilters":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"date_range"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"default":{"type":"object","properties":{"preset":{"type":"string"},"custom":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}}},"timezone":{"type":"string"}}}},"required":["id","type","label"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"text"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"placeholder":{"type":"string"},"default":{"type":"string"}},"required":["id","type","label"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"select"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"]}},"default":{"type":"string"}},"required":["id","type","label","options"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"multi_select"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"]}},"default":{"type":"array","items":{"type":"string"}}},"required":["id","type","label","options"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"number_range"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"default":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"}}}},"required":["id","type","label"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"search_filter"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"placeholder":{"type":"string"},"default":{"type":"string"},"negate":{"type":"boolean"}},"required":["id","type","label"]}]}},"widgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"dashboardId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"widgetType":{"type":"string","enum":["counter","piechart","table","timeseries","note","funnel"]},"title":{"type":"string"},"description":{"type":"string"},"query":{"type":"string"},"dataset":{"type":"string"},"positionX":{"type":"integer","minimum":0,"maximum":9007199254740991},"positionY":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":1,"maximum":9007199254740991},"height":{"type":"integer","minimum":1,"maximum":9007199254740991},"config":{"anyOf":[{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"chartType":{"type":"string","enum":["line","area","bar"]},"xAxis":{"type":"object","properties":{"dataKey":{"type":"string"},"label":{"type":"string"}},"required":["dataKey"]},"yAxis":{"type":"object","properties":{"label":{"type":"string"},"min":{"type":"number"},"max":{"type":"number"}}}},"required":["chartType","xAxis","yAxis"]},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"format":{"type":"string","enum":["number","currency","percentage"]},"prefix":{"type":"string"},"suffix":{"type":"string"},"decimals":{"type":"number"},"size":{"type":"string","enum":["small","medium","large","xlarge"]},"currency":{"type":"string"},"locale":{"type":"string"},"accentColor":{"type":"string"},"icon":{"type":"string"},"comparison":{"type":"object","properties":{"enabled":{"type":"boolean"},"type":{"type":"string","enum":["percentage","absolute"]},"period":{"type":"string","enum":["previous","year_ago"]},"invertColors":{"type":"boolean"}},"required":["enabled","type","period"]}},"required":["format"]},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"donut":{"type":"boolean"},"labelKey":{"type":"string"},"valueKey":{"type":"string"},"showPercentage":{"type":"boolean"},"legendPosition":{"type":"string","enum":["top","bottom","left","right"]},"legendValues":{"type":"string","enum":["none","value","percentage","both"]},"maxSize":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["labelKey","valueKey"]},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"stepField":{"type":"string","minLength":1},"countField":{"type":"string"},"steps":{"minItems":2,"type":"array","items":{"type":"object","properties":{"value":{"type":["number","string"]},"label":{"type":"string"}},"required":["value","label"]}},"groupBy":{"type":"string"},"cumulative":{"type":"boolean"}},"required":["stepField","steps"]},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"header":{"type":"string"},"width":{"type":"number"},"format":{"type":"string","enum":["text","number","currency","date","boolean"]}},"required":["key","header"]}},"pagination":{"type":"boolean"},"pageSize":{"type":"number"}},"required":["columns"]},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"content":{"default":"","type":"string"}}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"filterMapping":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"enabled":{"type":"boolean"},"mapTo":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["enabled"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["dashboardId","widgetType","title","query","dataset","positionX","positionY","width","height","config"]}},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"dashboardId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"sequenceNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["dashboardId","name","sequenceNumber"]}},"createdBy":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer","user"]},"contextId":{"type":"string"}},"required":["name"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"default":"organization","type":"string","enum":["organization","partner","customer","user"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"visibility":{"default":"internal","type":"string","enum":["private","internal","public"]},"name":{"type":"string","minLength":1},"description":{"type":"string"},"layoutType":{"default":"grid","type":"string","enum":["grid","flex","fixed"]},"isHomePage":{"default":false,"type":"boolean"},"globalFilters":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"date_range"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"default":{"type":"object","properties":{"preset":{"type":"string"},"custom":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"additionalProperties":false},"timezone":{"type":"string"}},"additionalProperties":false}},"required":["id","type","label","enabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"text"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"placeholder":{"type":"string"},"default":{"type":"string"}},"required":["id","type","label","enabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"select"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"default":{"type":"string"}},"required":["id","type","label","enabled","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"multi_select"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"default":{"type":"array","items":{"type":"string"}}},"required":["id","type","label","enabled","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"number_range"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"default":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"}},"additionalProperties":false}},"required":["id","type","label","enabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"search_filter"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"placeholder":{"type":"string"},"default":{"type":"string"},"negate":{"type":"boolean"}},"required":["id","type","label","enabled"],"additionalProperties":false}]}},"widgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"dashboardId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"widgetType":{"type":"string","enum":["counter","piechart","table","timeseries","note","funnel"]},"title":{"type":"string"},"description":{"type":"string"},"query":{"type":"string"},"dataset":{"type":"string"},"positionX":{"type":"integer","minimum":0,"maximum":9007199254740991},"positionY":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":1,"maximum":9007199254740991},"height":{"type":"integer","minimum":1,"maximum":9007199254740991},"config":{"anyOf":[{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"chartType":{"type":"string","enum":["line","area","bar"]},"xAxis":{"type":"object","properties":{"dataKey":{"type":"string"},"label":{"type":"string"}},"required":["dataKey"],"additionalProperties":false},"yAxis":{"type":"object","properties":{"label":{"type":"string"},"min":{"type":"number"},"max":{"type":"number"}},"additionalProperties":false}},"required":["chartType","xAxis","yAxis"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"format":{"type":"string","enum":["number","currency","percentage"]},"prefix":{"type":"string"},"suffix":{"type":"string"},"decimals":{"type":"number"},"size":{"type":"string","enum":["small","medium","large","xlarge"]},"currency":{"type":"string"},"locale":{"type":"string"},"accentColor":{"type":"string"},"icon":{"type":"string"},"comparison":{"type":"object","properties":{"enabled":{"type":"boolean"},"type":{"type":"string","enum":["percentage","absolute"]},"period":{"type":"string","enum":["previous","year_ago"]},"invertColors":{"type":"boolean"}},"required":["enabled","type","period"],"additionalProperties":false}},"required":["format"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"donut":{"type":"boolean"},"labelKey":{"type":"string"},"valueKey":{"type":"string"},"showPercentage":{"type":"boolean"},"legendPosition":{"type":"string","enum":["top","bottom","left","right"]},"legendValues":{"type":"string","enum":["none","value","percentage","both"]},"maxSize":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["labelKey","valueKey"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"stepField":{"type":"string","minLength":1},"countField":{"type":"string"},"steps":{"minItems":2,"type":"array","items":{"type":"object","properties":{"value":{"type":["number","string"]},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"groupBy":{"type":"string"},"cumulative":{"type":"boolean"}},"required":["stepField","steps"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"header":{"type":"string"},"width":{"type":"number"},"format":{"type":"string","enum":["text","number","currency","date","boolean"]}},"required":["key","header"],"additionalProperties":false}},"pagination":{"type":"boolean"},"pageSize":{"type":"number"}},"required":["columns"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"content":{}},"required":["content"],"additionalProperties":false},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"filterMapping":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"enabled":{"type":"boolean"},"mapTo":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["enabled"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["dashboardId","widgetType","title","query","dataset","positionX","positionY","width","height","config"],"additionalProperties":false}},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"dashboardId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"sequenceNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["dashboardId","name","sequenceNumber"],"additionalProperties":false}},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["contextType","contextId","visibility","name","layoutType","isHomePage"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/dashboards/home":{"get":{"description":"Returns the home page dashboard for the current user's context. Priority: private > internal > public.","summary":"Get the home page dashboard","tags":["dashboards"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"default":"organization","type":"string","enum":["organization","partner","customer","user"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"visibility":{"default":"internal","type":"string","enum":["private","internal","public"]},"name":{"type":"string","minLength":1},"description":{"type":"string"},"layoutType":{"default":"grid","type":"string","enum":["grid","flex","fixed"]},"isHomePage":{"default":false,"type":"boolean"},"globalFilters":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"date_range"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"default":{"type":"object","properties":{"preset":{"type":"string"},"custom":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"additionalProperties":false},"timezone":{"type":"string"}},"additionalProperties":false}},"required":["id","type","label","enabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"text"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"placeholder":{"type":"string"},"default":{"type":"string"}},"required":["id","type","label","enabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"select"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"default":{"type":"string"}},"required":["id","type","label","enabled","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"multi_select"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"default":{"type":"array","items":{"type":"string"}}},"required":["id","type","label","enabled","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"number_range"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"default":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"}},"additionalProperties":false}},"required":["id","type","label","enabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"search_filter"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"placeholder":{"type":"string"},"default":{"type":"string"},"negate":{"type":"boolean"}},"required":["id","type","label","enabled"],"additionalProperties":false}]}},"widgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"dashboardId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"widgetType":{"type":"string","enum":["counter","piechart","table","timeseries","note","funnel"]},"title":{"type":"string"},"description":{"type":"string"},"query":{"type":"string"},"dataset":{"type":"string"},"positionX":{"type":"integer","minimum":0,"maximum":9007199254740991},"positionY":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":1,"maximum":9007199254740991},"height":{"type":"integer","minimum":1,"maximum":9007199254740991},"config":{"anyOf":[{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"chartType":{"type":"string","enum":["line","area","bar"]},"xAxis":{"type":"object","properties":{"dataKey":{"type":"string"},"label":{"type":"string"}},"required":["dataKey"],"additionalProperties":false},"yAxis":{"type":"object","properties":{"label":{"type":"string"},"min":{"type":"number"},"max":{"type":"number"}},"additionalProperties":false}},"required":["chartType","xAxis","yAxis"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"format":{"type":"string","enum":["number","currency","percentage"]},"prefix":{"type":"string"},"suffix":{"type":"string"},"decimals":{"type":"number"},"size":{"type":"string","enum":["small","medium","large","xlarge"]},"currency":{"type":"string"},"locale":{"type":"string"},"accentColor":{"type":"string"},"icon":{"type":"string"},"comparison":{"type":"object","properties":{"enabled":{"type":"boolean"},"type":{"type":"string","enum":["percentage","absolute"]},"period":{"type":"string","enum":["previous","year_ago"]},"invertColors":{"type":"boolean"}},"required":["enabled","type","period"],"additionalProperties":false}},"required":["format"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"donut":{"type":"boolean"},"labelKey":{"type":"string"},"valueKey":{"type":"string"},"showPercentage":{"type":"boolean"},"legendPosition":{"type":"string","enum":["top","bottom","left","right"]},"legendValues":{"type":"string","enum":["none","value","percentage","both"]},"maxSize":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["labelKey","valueKey"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"stepField":{"type":"string","minLength":1},"countField":{"type":"string"},"steps":{"minItems":2,"type":"array","items":{"type":"object","properties":{"value":{"type":["number","string"]},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"groupBy":{"type":"string"},"cumulative":{"type":"boolean"}},"required":["stepField","steps"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"header":{"type":"string"},"width":{"type":"number"},"format":{"type":"string","enum":["text","number","currency","date","boolean"]}},"required":["key","header"],"additionalProperties":false}},"pagination":{"type":"boolean"},"pageSize":{"type":"number"}},"required":["columns"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"content":{}},"required":["content"],"additionalProperties":false},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"filterMapping":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"enabled":{"type":"boolean"},"mapTo":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["enabled"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["dashboardId","widgetType","title","query","dataset","positionX","positionY","width","height","config"],"additionalProperties":false}},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"dashboardId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"sequenceNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["dashboardId","name","sequenceNumber"],"additionalProperties":false}},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["contextType","contextId","visibility","name","layoutType","isHomePage"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/dashboards/{dashboardId}":{"get":{"description":"Returns a single dashboard by its ID if the user has access to it","summary":"Get a dashboard by ID","tags":["dashboards"],"parameters":[{"name":"dashboardId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"default":"organization","type":"string","enum":["organization","partner","customer","user"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"visibility":{"default":"internal","type":"string","enum":["private","internal","public"]},"name":{"type":"string","minLength":1},"description":{"type":"string"},"layoutType":{"default":"grid","type":"string","enum":["grid","flex","fixed"]},"isHomePage":{"default":false,"type":"boolean"},"globalFilters":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"date_range"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"default":{"type":"object","properties":{"preset":{"type":"string"},"custom":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"additionalProperties":false},"timezone":{"type":"string"}},"additionalProperties":false}},"required":["id","type","label","enabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"text"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"placeholder":{"type":"string"},"default":{"type":"string"}},"required":["id","type","label","enabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"select"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"default":{"type":"string"}},"required":["id","type","label","enabled","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"multi_select"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"default":{"type":"array","items":{"type":"string"}}},"required":["id","type","label","enabled","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"number_range"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"default":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"}},"additionalProperties":false}},"required":["id","type","label","enabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"search_filter"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"placeholder":{"type":"string"},"default":{"type":"string"},"negate":{"type":"boolean"}},"required":["id","type","label","enabled"],"additionalProperties":false}]}},"widgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"dashboardId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"widgetType":{"type":"string","enum":["counter","piechart","table","timeseries","note","funnel"]},"title":{"type":"string"},"description":{"type":"string"},"query":{"type":"string"},"dataset":{"type":"string"},"positionX":{"type":"integer","minimum":0,"maximum":9007199254740991},"positionY":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":1,"maximum":9007199254740991},"height":{"type":"integer","minimum":1,"maximum":9007199254740991},"config":{"anyOf":[{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"chartType":{"type":"string","enum":["line","area","bar"]},"xAxis":{"type":"object","properties":{"dataKey":{"type":"string"},"label":{"type":"string"}},"required":["dataKey"],"additionalProperties":false},"yAxis":{"type":"object","properties":{"label":{"type":"string"},"min":{"type":"number"},"max":{"type":"number"}},"additionalProperties":false}},"required":["chartType","xAxis","yAxis"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"format":{"type":"string","enum":["number","currency","percentage"]},"prefix":{"type":"string"},"suffix":{"type":"string"},"decimals":{"type":"number"},"size":{"type":"string","enum":["small","medium","large","xlarge"]},"currency":{"type":"string"},"locale":{"type":"string"},"accentColor":{"type":"string"},"icon":{"type":"string"},"comparison":{"type":"object","properties":{"enabled":{"type":"boolean"},"type":{"type":"string","enum":["percentage","absolute"]},"period":{"type":"string","enum":["previous","year_ago"]},"invertColors":{"type":"boolean"}},"required":["enabled","type","period"],"additionalProperties":false}},"required":["format"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"donut":{"type":"boolean"},"labelKey":{"type":"string"},"valueKey":{"type":"string"},"showPercentage":{"type":"boolean"},"legendPosition":{"type":"string","enum":["top","bottom","left","right"]},"legendValues":{"type":"string","enum":["none","value","percentage","both"]},"maxSize":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["labelKey","valueKey"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"stepField":{"type":"string","minLength":1},"countField":{"type":"string"},"steps":{"minItems":2,"type":"array","items":{"type":"object","properties":{"value":{"type":["number","string"]},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"groupBy":{"type":"string"},"cumulative":{"type":"boolean"}},"required":["stepField","steps"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"header":{"type":"string"},"width":{"type":"number"},"format":{"type":"string","enum":["text","number","currency","date","boolean"]}},"required":["key","header"],"additionalProperties":false}},"pagination":{"type":"boolean"},"pageSize":{"type":"number"}},"required":["columns"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"content":{}},"required":["content"],"additionalProperties":false},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"filterMapping":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"enabled":{"type":"boolean"},"mapTo":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["enabled"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["dashboardId","widgetType","title","query","dataset","positionX","positionY","width","height","config"],"additionalProperties":false}},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"dashboardId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"sequenceNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["dashboardId","name","sequenceNumber"],"additionalProperties":false}},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["contextType","contextId","visibility","name","layoutType","isHomePage"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"put":{"description":"Updates an existing dashboard if the user has permission","summary":"Update a dashboard","tags":["dashboards"],"parameters":[{"name":"dashboardId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"visibility":{"type":"string","enum":["private","internal","public"]},"name":{"type":"string","minLength":1},"description":{"type":"string"},"layoutType":{"type":"string","enum":["grid","flex","fixed"]},"isHomePage":{"type":"boolean"},"globalFilters":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"date_range"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"default":{"type":"object","properties":{"preset":{"type":"string"},"custom":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}}},"timezone":{"type":"string"}}}},"required":["id","type","label"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"text"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"placeholder":{"type":"string"},"default":{"type":"string"}},"required":["id","type","label"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"select"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"]}},"default":{"type":"string"}},"required":["id","type","label","options"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"multi_select"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"]}},"default":{"type":"array","items":{"type":"string"}}},"required":["id","type","label","options"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"number_range"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"default":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"}}}},"required":["id","type","label"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"search_filter"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"placeholder":{"type":"string"},"default":{"type":"string"},"negate":{"type":"boolean"}},"required":["id","type","label"]}]}},"widgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"dashboardId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"widgetType":{"type":"string","enum":["counter","piechart","table","timeseries","note","funnel"]},"title":{"type":"string"},"description":{"type":"string"},"query":{"type":"string"},"dataset":{"type":"string"},"positionX":{"type":"integer","minimum":0,"maximum":9007199254740991},"positionY":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":1,"maximum":9007199254740991},"height":{"type":"integer","minimum":1,"maximum":9007199254740991},"config":{"anyOf":[{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"chartType":{"type":"string","enum":["line","area","bar"]},"xAxis":{"type":"object","properties":{"dataKey":{"type":"string"},"label":{"type":"string"}},"required":["dataKey"]},"yAxis":{"type":"object","properties":{"label":{"type":"string"},"min":{"type":"number"},"max":{"type":"number"}}}},"required":["chartType","xAxis","yAxis"]},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"format":{"type":"string","enum":["number","currency","percentage"]},"prefix":{"type":"string"},"suffix":{"type":"string"},"decimals":{"type":"number"},"size":{"type":"string","enum":["small","medium","large","xlarge"]},"currency":{"type":"string"},"locale":{"type":"string"},"accentColor":{"type":"string"},"icon":{"type":"string"},"comparison":{"type":"object","properties":{"enabled":{"type":"boolean"},"type":{"type":"string","enum":["percentage","absolute"]},"period":{"type":"string","enum":["previous","year_ago"]},"invertColors":{"type":"boolean"}},"required":["enabled","type","period"]}},"required":["format"]},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"donut":{"type":"boolean"},"labelKey":{"type":"string"},"valueKey":{"type":"string"},"showPercentage":{"type":"boolean"},"legendPosition":{"type":"string","enum":["top","bottom","left","right"]},"legendValues":{"type":"string","enum":["none","value","percentage","both"]},"maxSize":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["labelKey","valueKey"]},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"stepField":{"type":"string","minLength":1},"countField":{"type":"string"},"steps":{"minItems":2,"type":"array","items":{"type":"object","properties":{"value":{"type":["number","string"]},"label":{"type":"string"}},"required":["value","label"]}},"groupBy":{"type":"string"},"cumulative":{"type":"boolean"}},"required":["stepField","steps"]},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"header":{"type":"string"},"width":{"type":"number"},"format":{"type":"string","enum":["text","number","currency","date","boolean"]}},"required":["key","header"]}},"pagination":{"type":"boolean"},"pageSize":{"type":"number"}},"required":["columns"]},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"content":{"default":"","type":"string"}}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"filterMapping":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"enabled":{"type":"boolean"},"mapTo":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["enabled"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["dashboardId","widgetType","title","query","dataset","positionX","positionY","width","height","config"]}},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"dashboardId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"sequenceNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["dashboardId","name","sequenceNumber"]}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"default":"organization","type":"string","enum":["organization","partner","customer","user"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"visibility":{"default":"internal","type":"string","enum":["private","internal","public"]},"name":{"type":"string","minLength":1},"description":{"type":"string"},"layoutType":{"default":"grid","type":"string","enum":["grid","flex","fixed"]},"isHomePage":{"default":false,"type":"boolean"},"globalFilters":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"date_range"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"default":{"type":"object","properties":{"preset":{"type":"string"},"custom":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"additionalProperties":false},"timezone":{"type":"string"}},"additionalProperties":false}},"required":["id","type","label","enabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"text"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"placeholder":{"type":"string"},"default":{"type":"string"}},"required":["id","type","label","enabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"select"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"default":{"type":"string"}},"required":["id","type","label","enabled","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"multi_select"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"default":{"type":"array","items":{"type":"string"}}},"required":["id","type","label","enabled","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"number_range"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"default":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"}},"additionalProperties":false}},"required":["id","type","label","enabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"search_filter"},"label":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"placeholder":{"type":"string"},"default":{"type":"string"},"negate":{"type":"boolean"}},"required":["id","type","label","enabled"],"additionalProperties":false}]}},"widgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"dashboardId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"widgetType":{"type":"string","enum":["counter","piechart","table","timeseries","note","funnel"]},"title":{"type":"string"},"description":{"type":"string"},"query":{"type":"string"},"dataset":{"type":"string"},"positionX":{"type":"integer","minimum":0,"maximum":9007199254740991},"positionY":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":1,"maximum":9007199254740991},"height":{"type":"integer","minimum":1,"maximum":9007199254740991},"config":{"anyOf":[{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"chartType":{"type":"string","enum":["line","area","bar"]},"xAxis":{"type":"object","properties":{"dataKey":{"type":"string"},"label":{"type":"string"}},"required":["dataKey"],"additionalProperties":false},"yAxis":{"type":"object","properties":{"label":{"type":"string"},"min":{"type":"number"},"max":{"type":"number"}},"additionalProperties":false}},"required":["chartType","xAxis","yAxis"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"format":{"type":"string","enum":["number","currency","percentage"]},"prefix":{"type":"string"},"suffix":{"type":"string"},"decimals":{"type":"number"},"size":{"type":"string","enum":["small","medium","large","xlarge"]},"currency":{"type":"string"},"locale":{"type":"string"},"accentColor":{"type":"string"},"icon":{"type":"string"},"comparison":{"type":"object","properties":{"enabled":{"type":"boolean"},"type":{"type":"string","enum":["percentage","absolute"]},"period":{"type":"string","enum":["previous","year_ago"]},"invertColors":{"type":"boolean"}},"required":["enabled","type","period"],"additionalProperties":false}},"required":["format"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"donut":{"type":"boolean"},"labelKey":{"type":"string"},"valueKey":{"type":"string"},"showPercentage":{"type":"boolean"},"legendPosition":{"type":"string","enum":["top","bottom","left","right"]},"legendValues":{"type":"string","enum":["none","value","percentage","both"]},"maxSize":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["labelKey","valueKey"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"stepField":{"type":"string","minLength":1},"countField":{"type":"string"},"steps":{"minItems":2,"type":"array","items":{"type":"object","properties":{"value":{"type":["number","string"]},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"groupBy":{"type":"string"},"cumulative":{"type":"boolean"}},"required":["stepField","steps"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"header":{"type":"string"},"width":{"type":"number"},"format":{"type":"string","enum":["text","number","currency","date","boolean"]}},"required":["key","header"],"additionalProperties":false}},"pagination":{"type":"boolean"},"pageSize":{"type":"number"}},"required":["columns"],"additionalProperties":false},{"type":"object","properties":{"legend":{"type":"boolean"},"tooltip":{"type":"boolean"},"colors":{"type":"array","items":{"type":"string"}},"borderStyle":{"type":"string","enum":["none","solid","dashed","dotted"]},"customCss":{"type":"string"},"aiConversationId":{"type":"string"},"content":{}},"required":["content"],"additionalProperties":false},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"filterMapping":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"enabled":{"type":"boolean"},"mapTo":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["enabled"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["dashboardId","widgetType","title","query","dataset","positionX","positionY","width","height","config"],"additionalProperties":false}},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"dashboardId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"sequenceNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["dashboardId","name","sequenceNumber"],"additionalProperties":false}},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["contextType","contextId","visibility","name","layoutType","isHomePage"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"delete":{"description":"Deletes a dashboard and all associated widgets if the user has permission","summary":"Delete a dashboard","tags":["dashboards"],"parameters":[{"name":"dashboardId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"204","content":{"application/json":{"schema":{}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/decision-tables":{"post":{"summary":"Create a new decision table","tags":["decisionTables"],"parameters":[{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"slugId":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9-]+$"},"description":{"type":"string"},"kind":{"default":"generic","type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"enabled":{"default":true,"type":"boolean"},"priority":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field"]}},"hitPolicy":{"default":"first","type":"string","enum":["first","collect"]},"inputs":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}}}},"required":["id","label"]}},"outputs":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}}}},"required":["id","label"]}},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"]}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"]}}},"required":["name","slugId"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"name":{"type":"string"},"slugId":{"type":"string"},"description":{"type":["string","null"]},"kind":{"default":"generic","type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"enabled":{"default":true,"type":"boolean"},"priority":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field","op","values"],"additionalProperties":false}},"hitPolicy":{"type":"string","enum":["first","collect"]},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}},"serviceConnectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"managedByApplicationId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"createdBy":{"type":["string","null"]}},"required":["id","context","name","slugId","description","kind","enabled","priority","preConditions","hitPolicy","inputs","outputs","rules","createdAt","updatedAt","createdBy"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"get":{"summary":"List all decision tables","tags":["decisionTables"],"parameters":[{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"name":{"type":"string"},"slugId":{"type":"string"},"description":{"type":["string","null"]},"kind":{"default":"generic","type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"enabled":{"default":true,"type":"boolean"},"priority":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field","op","values"],"additionalProperties":false}},"hitPolicy":{"type":"string","enum":["first","collect"]},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}},"serviceConnectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"managedByApplicationId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"createdBy":{"type":["string","null"]}},"required":["id","context","name","slugId","description","kind","enabled","priority","preConditions","hitPolicy","inputs","outputs","rules","createdAt","updatedAt","createdBy"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/decision-tables/{decisionTableId}":{"get":{"summary":"Get a specific decision table by ID","tags":["decisionTables"],"parameters":[{"name":"decisionTableId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"name":{"type":"string"},"slugId":{"type":"string"},"description":{"type":["string","null"]},"kind":{"default":"generic","type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"enabled":{"default":true,"type":"boolean"},"priority":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field","op","values"],"additionalProperties":false}},"hitPolicy":{"type":"string","enum":["first","collect"]},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}},"serviceConnectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"managedByApplicationId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"createdBy":{"type":["string","null"]}},"required":["id","context","name","slugId","description","kind","enabled","priority","preConditions","hitPolicy","inputs","outputs","rules","createdAt","updatedAt","createdBy"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a decision table","tags":["decisionTables"],"parameters":[{"name":"decisionTableId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"204":{"description":"204","content":{"application/json":{"schema":{}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/decision-tables/by-slug/{slugId}":{"get":{"summary":"Get a specific decision table by slug ID","tags":["decisionTables"],"parameters":[{"name":"slugId","in":"path","required":true,"schema":{"type":"string"}},{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"name":{"type":"string"},"slugId":{"type":"string"},"description":{"type":["string","null"]},"kind":{"default":"generic","type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"enabled":{"default":true,"type":"boolean"},"priority":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field","op","values"],"additionalProperties":false}},"hitPolicy":{"type":"string","enum":["first","collect"]},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}},"serviceConnectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"managedByApplicationId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"createdBy":{"type":["string","null"]}},"required":["id","context","name","slugId","description","kind","enabled","priority","preConditions","hitPolicy","inputs","outputs","rules","createdAt","updatedAt","createdBy"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"put":{"summary":"Upsert (create or update) a decision table by slug ID","tags":["decisionTables"],"parameters":[{"name":"slugId","in":"path","required":true,"schema":{"type":"string"}},{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"hitPolicy":{"type":"string","enum":["first","collect"]},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}}}},"required":["id","label"]}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}}}},"required":["id","label"]}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"]}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"]}}},"required":["name","hitPolicy","inputs","outputs","rules"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"name":{"type":"string"},"slugId":{"type":"string"},"description":{"type":["string","null"]},"kind":{"default":"generic","type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"enabled":{"default":true,"type":"boolean"},"priority":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field","op","values"],"additionalProperties":false}},"hitPolicy":{"type":"string","enum":["first","collect"]},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}},"serviceConnectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"managedByApplicationId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"createdBy":{"type":["string","null"]}},"required":["id","context","name","slugId","description","kind","enabled","priority","preConditions","hitPolicy","inputs","outputs","rules","createdAt","updatedAt","createdBy"],"additionalProperties":false}}}},"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"name":{"type":"string"},"slugId":{"type":"string"},"description":{"type":["string","null"]},"kind":{"default":"generic","type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"enabled":{"default":true,"type":"boolean"},"priority":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field","op","values"],"additionalProperties":false}},"hitPolicy":{"type":"string","enum":["first","collect"]},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}},"serviceConnectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"managedByApplicationId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"createdBy":{"type":["string","null"]}},"required":["id","context","name","slugId","description","kind","enabled","priority","preConditions","hitPolicy","inputs","outputs","rules","createdAt","updatedAt","createdBy"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/decision-tables/{decisionTableId}/metadata":{"patch":{"summary":"Update decision table metadata (name, description, hit policy, slugId)","tags":["decisionTables"],"parameters":[{"name":"decisionTableId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"slugId":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9-]+$"},"description":{"type":["string","null"]},"hitPolicy":{"type":"string","enum":["first","collect"]},"kind":{"type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"enabled":{"type":"boolean"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preConditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field"]}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"name":{"type":"string"},"slugId":{"type":"string"},"description":{"type":["string","null"]},"kind":{"default":"generic","type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"enabled":{"default":true,"type":"boolean"},"priority":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field","op","values"],"additionalProperties":false}},"hitPolicy":{"type":"string","enum":["first","collect"]},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}},"serviceConnectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"managedByApplicationId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"createdBy":{"type":["string","null"]}},"required":["id","context","name","slugId","description","kind","enabled","priority","preConditions","hitPolicy","inputs","outputs","rules","createdAt","updatedAt","createdBy"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/decision-tables/{decisionTableId}/schema":{"put":{"summary":"Update decision table schema (columns) - replaces all columns, and the rules when given","tags":["decisionTables"],"parameters":[{"name":"decisionTableId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}}}},"required":["id","label"]}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}}}},"required":["id","label"]}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"]}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"]}}},"required":["inputs","outputs"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"name":{"type":"string"},"slugId":{"type":"string"},"description":{"type":["string","null"]},"kind":{"default":"generic","type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"enabled":{"default":true,"type":"boolean"},"priority":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field","op","values"],"additionalProperties":false}},"hitPolicy":{"type":"string","enum":["first","collect"]},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}},"serviceConnectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"managedByApplicationId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"createdBy":{"type":["string","null"]}},"required":["id","context","name","slugId","description","kind","enabled","priority","preConditions","hitPolicy","inputs","outputs","rules","createdAt","updatedAt","createdBy"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/decision-tables/{decisionTableId}/rules":{"put":{"summary":"Update decision table rules - replaces all rules","tags":["decisionTables"],"parameters":[{"name":"decisionTableId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"]}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"]}}},"required":["rules"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"name":{"type":"string"},"slugId":{"type":"string"},"description":{"type":["string","null"]},"kind":{"default":"generic","type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"enabled":{"default":true,"type":"boolean"},"priority":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field","op","values"],"additionalProperties":false}},"hitPolicy":{"type":"string","enum":["first","collect"]},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}},"serviceConnectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"managedByApplicationId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"createdBy":{"type":["string","null"]}},"required":["id","context","name","slugId","description","kind","enabled","priority","preConditions","hitPolicy","inputs","outputs","rules","createdAt","updatedAt","createdBy"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/decision-tables/{decisionTableId}/mode-copy":{"get":{"summary":"Read a decision table for a copy to the other mode","tags":["decisionTables"],"parameters":[{"name":"decisionTableId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"versionId","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"tables":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"slugId":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9-]+$"},"description":{"type":"string"},"kind":{"default":"generic","type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"enabled":{"default":true,"type":"boolean"},"priority":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field","op","values"],"additionalProperties":false}},"hitPolicy":{"default":"first","type":"string","enum":["first","collect"]},"inputs":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"outputs":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}}},"required":["name","slugId","kind","enabled","priority","preConditions","hitPolicy","inputs","outputs","rules"],"additionalProperties":false}},"references":{"type":"object","properties":{"plansCopied":{"type":"array","items":{"type":"string"}},"plansNotCopied":{"type":"array","items":{"type":"string"}},"perModeFields":{"type":"array","items":{"type":"string"}}},"required":["plansCopied","plansNotCopied","perModeFields"],"additionalProperties":false}},"required":["tables","references"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["copy-exists","name-taken","account-fees","no-table","rule-exists","columns-differ","changed"]},"names":{"type":"array","items":{"type":"string"}}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/decision-tables/mode-copy":{"post":{"summary":"Write a decision table copied from the other mode","tags":["decisionTables"],"parameters":[{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"tables":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"slugId":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9-]+$"},"description":{"type":"string"},"kind":{"default":"generic","type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"enabled":{"default":true,"type":"boolean"},"priority":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field"]}},"hitPolicy":{"default":"first","type":"string","enum":["first","collect"]},"inputs":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}}}},"required":["id","label"]}},"outputs":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}}}},"required":["id","label"]}},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"]}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"]}}},"required":["name","slugId"]}},"replace":{"type":"boolean"},"dryRun":{"type":"boolean"}},"required":["tables"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"name":{"type":"string"},"slugId":{"type":"string"},"description":{"type":["string","null"]},"kind":{"default":"generic","type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"enabled":{"default":true,"type":"boolean"},"priority":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field","op","values"],"additionalProperties":false}},"hitPolicy":{"type":"string","enum":["first","collect"]},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}},"serviceConnectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"managedByApplicationId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"createdBy":{"type":["string","null"]}},"required":["id","context","name","slugId","description","kind","enabled","priority","preConditions","hitPolicy","inputs","outputs","rules","createdAt","updatedAt","createdBy"],"additionalProperties":false},"replaces":{"type":"array","items":{"type":"string"}}},"required":["replaces"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["copy-exists","name-taken","account-fees","no-table","rule-exists","columns-differ","changed"]},"names":{"type":"array","items":{"type":"string"}}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/decision-tables/mode-copy/rule":{"post":{"summary":"Write one rule copied from the other mode","tags":["decisionTables"],"parameters":[{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"slugId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"rule":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"]}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"]},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}}}},"required":["id","label"]}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}}}},"required":["id","label"]}},"above":{"maxItems":1000,"type":"array","items":{"type":"string"}},"replace":{"type":"boolean"},"dryRun":{"type":"boolean"}},"required":["slugId","kind","rule","inputs","outputs","above"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"name":{"type":"string"},"slugId":{"type":"string"},"description":{"type":["string","null"]},"kind":{"default":"generic","type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"enabled":{"default":true,"type":"boolean"},"priority":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field","op","values"],"additionalProperties":false}},"hitPolicy":{"type":"string","enum":["first","collect"]},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}},"serviceConnectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"managedByApplicationId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"createdBy":{"type":["string","null"]}},"required":["id","context","name","slugId","description","kind","enabled","priority","preConditions","hitPolicy","inputs","outputs","rules","createdAt","updatedAt","createdBy"],"additionalProperties":false},"tableName":{"type":"string"},"outcome":{"type":"string","enum":["added","replaced","unchanged"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"columnsAdded":{"type":"array","items":{"type":"string"}}},"required":["tableName","outcome","position","columnsAdded"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["copy-exists","name-taken","account-fees","no-table","rule-exists","columns-differ","changed"]},"names":{"type":"array","items":{"type":"string"}}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/decision-tables/{decisionTableId}/versions":{"get":{"summary":"List the versions of a decision table","tags":["decisionTables"],"parameters":[{"name":"decisionTableId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"decisionTableId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"change":{"type":"string","enum":["baseline","created","edited","rolled-back","copied"]},"sourceVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"sourceMode":{"anyOf":[{"type":"string","enum":["live","test"]},{"type":"null"}]},"changes":{"anyOf":[{"type":"object","properties":{"rulesAdded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rulesRemoved":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rulesChanged":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rulesReordered":{"type":"boolean"},"columnsChanged":{"type":"boolean"},"settings":{"type":"array","items":{"type":"string","enum":["name","slugId","description","kind","enabled","preConditions","hitPolicy"]}},"details":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"rule-added"},"rule":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cells":{"type":"array","items":{"type":"object","properties":{"column":{"type":"string"},"input":{"type":"boolean"},"value":{"type":"string"},"listCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["column","input"],"additionalProperties":false}}},"required":["type","rule","cells"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"rule-removed"},"rule":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","rule"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"rule-changed"},"rule":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cells":{"type":"array","items":{"type":"object","properties":{"column":{"type":"string"},"input":{"type":"boolean"},"from":{"type":"string"},"to":{"type":"string"},"listAdded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"listRemoved":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["column","input"],"additionalProperties":false}},"enabled":{"type":"boolean"}},"required":["type","rule","cells"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"column-added"},"column":{"type":"string"},"input":{"type":"boolean"}},"required":["type","column","input"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"column-removed"},"column":{"type":"string"},"input":{"type":"boolean"}},"required":["type","column","input"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"column-changed"},"column":{"type":"string"},"input":{"type":"boolean"},"renamedTo":{"type":"string"}},"required":["type","column","input"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"setting"},"setting":{"type":"string","enum":["name","slugId","description","kind","enabled","preConditions","hitPolicy"]},"from":{"type":"string"},"to":{"type":"string"}},"required":["type","setting"],"additionalProperties":false}]}},"moreDetails":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["rulesAdded","rulesRemoved","rulesChanged","rulesReordered","columnsChanged","settings"],"additionalProperties":false},{"type":"null"}]},"name":{"type":"string"},"enabled":{"type":"boolean"},"ruleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdBy":{"type":["string","null"]},"createdByName":{"type":["string","null"]},"createdAt":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["id","decisionTableId","version","change","sourceVersion","sourceMode","changes","name","enabled","ruleCount","createdBy","createdByName","createdAt","isCurrent"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/decision-tables/{decisionTableId}/versions/{versionId}":{"get":{"summary":"Get one version of a decision table","tags":["decisionTables"],"parameters":[{"name":"decisionTableId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"decisionTableId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"change":{"type":"string","enum":["baseline","created","edited","rolled-back","copied"]},"sourceVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"sourceMode":{"anyOf":[{"type":"string","enum":["live","test"]},{"type":"null"}]},"changes":{"anyOf":[{"type":"object","properties":{"rulesAdded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rulesRemoved":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rulesChanged":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rulesReordered":{"type":"boolean"},"columnsChanged":{"type":"boolean"},"settings":{"type":"array","items":{"type":"string","enum":["name","slugId","description","kind","enabled","preConditions","hitPolicy"]}},"details":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"rule-added"},"rule":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cells":{"type":"array","items":{"type":"object","properties":{"column":{"type":"string"},"input":{"type":"boolean"},"value":{"type":"string"},"listCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["column","input"],"additionalProperties":false}}},"required":["type","rule","cells"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"rule-removed"},"rule":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","rule"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"rule-changed"},"rule":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cells":{"type":"array","items":{"type":"object","properties":{"column":{"type":"string"},"input":{"type":"boolean"},"from":{"type":"string"},"to":{"type":"string"},"listAdded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"listRemoved":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["column","input"],"additionalProperties":false}},"enabled":{"type":"boolean"}},"required":["type","rule","cells"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"column-added"},"column":{"type":"string"},"input":{"type":"boolean"}},"required":["type","column","input"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"column-removed"},"column":{"type":"string"},"input":{"type":"boolean"}},"required":["type","column","input"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"column-changed"},"column":{"type":"string"},"input":{"type":"boolean"},"renamedTo":{"type":"string"}},"required":["type","column","input"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"setting"},"setting":{"type":"string","enum":["name","slugId","description","kind","enabled","preConditions","hitPolicy"]},"from":{"type":"string"},"to":{"type":"string"}},"required":["type","setting"],"additionalProperties":false}]}},"moreDetails":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["rulesAdded","rulesRemoved","rulesChanged","rulesReordered","columnsChanged","settings"],"additionalProperties":false},{"type":"null"}]},"name":{"type":"string"},"enabled":{"type":"boolean"},"ruleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdBy":{"type":["string","null"]},"createdByName":{"type":["string","null"]},"createdAt":{"type":"string"},"isCurrent":{"type":"boolean"},"slugId":{"type":"string"},"description":{"type":["string","null"]},"kind":{"type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"preConditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field","op","values"],"additionalProperties":false}},"hitPolicy":{"type":"string","enum":["first","collect"]},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}}},"required":["id","decisionTableId","version","change","sourceVersion","sourceMode","changes","name","enabled","ruleCount","createdBy","createdByName","createdAt","isCurrent","slugId","description","kind","preConditions","hitPolicy","inputs","outputs","rules"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/decision-tables/{decisionTableId}/versions/{versionId}/rollback":{"post":{"summary":"Roll a decision table back to an older version","tags":["decisionTables"],"parameters":[{"name":"decisionTableId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"name":{"type":"string"},"slugId":{"type":"string"},"description":{"type":["string","null"]},"kind":{"default":"generic","type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"enabled":{"default":true,"type":"boolean"},"priority":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field","op","values"],"additionalProperties":false}},"hitPolicy":{"type":"string","enum":["first","collect"]},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}},"serviceConnectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"managedByApplicationId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"createdBy":{"type":["string","null"]}},"required":["id","context","name","slugId","description","kind","enabled","priority","preConditions","hitPolicy","inputs","outputs","rules","createdAt","updatedAt","createdBy"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/decision-tables/reorder":{"post":{"summary":"Reorder decision tables of a given kind by setting their priority","tags":["decisionTables"],"parameters":[{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"decisionTableIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["kind","decisionTableIds"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"name":{"type":"string"},"slugId":{"type":"string"},"description":{"type":["string","null"]},"kind":{"default":"generic","type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"enabled":{"default":true,"type":"boolean"},"priority":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field","op","values"],"additionalProperties":false}},"hitPolicy":{"type":"string","enum":["first","collect"]},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}},"serviceConnectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"managedByApplicationId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"createdBy":{"type":["string","null"]}},"required":["id","context","name","slugId","description","kind","enabled","priority","preConditions","hitPolicy","inputs","outputs","rules","createdAt","updatedAt","createdBy"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/decision-tables/{decisionTableId}/test":{"post":{"summary":"Test a decision table with input values","tags":["decisionTables"],"parameters":[{"name":"decisionTableId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"matchedRuleIds":{"type":"array","items":{"type":"string"}},"outputs":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}},"required":["matchedRuleIds","outputs"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/fx/rates":{"get":{"summary":"Get the FX rate table for a context","tags":["fx"],"parameters":[{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"baseCurrency":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9]{2,10}$"},{"type":"null"}]},"rates":{"type":"array","items":{"type":"object","properties":{"baseCurrency":{"type":"string","pattern":"^[A-Za-z0-9]{2,10}$"},"quoteCurrency":{"type":"string","pattern":"^[A-Za-z0-9]{2,10}$"},"rate":{"type":"number","exclusiveMinimum":0},"source":{"type":"string","enum":["provider","manual"]},"provider":{"type":["string","null"]},"asOf":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["baseCurrency","quoteCurrency","rate","source"],"additionalProperties":false}}},"required":["contextType","contextId","rates"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/fx/rates/override":{"put":{"summary":"Override a single FX rate (permission-gated)","tags":["fx"],"parameters":[{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"baseCurrency":{"type":"string","pattern":"^[A-Za-z0-9]{2,10}$"},"quoteCurrency":{"type":"string","pattern":"^[A-Za-z0-9]{2,10}$"},"rate":{"type":"number","exclusiveMinimum":0}},"required":["baseCurrency","quoteCurrency","rate"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"baseCurrency":{"type":"string","pattern":"^[A-Za-z0-9]{2,10}$"},"quoteCurrency":{"type":"string","pattern":"^[A-Za-z0-9]{2,10}$"},"rate":{"type":"number","exclusiveMinimum":0},"source":{"type":"string","enum":["provider","manual"]},"provider":{"type":["string","null"]},"asOf":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["baseCurrency","quoteCurrency","rate","source"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"delete":{"summary":"Undo a manual FX rate override (permission-gated)","tags":["fx"],"parameters":[{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string"}},{"name":"baseCurrency","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9]{2,10}$"}},{"name":"quoteCurrency","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9]{2,10}$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/fx/refresh":{"post":{"summary":"Refresh FX rates from the provider","tags":["fx"],"parameters":[{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"baseCurrency":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9]{2,10}$"},{"type":"null"}]},"rates":{"type":"array","items":{"type":"object","properties":{"baseCurrency":{"type":"string","pattern":"^[A-Za-z0-9]{2,10}$"},"quoteCurrency":{"type":"string","pattern":"^[A-Za-z0-9]{2,10}$"},"rate":{"type":"number","exclusiveMinimum":0},"source":{"type":"string","enum":["provider","manual"]},"provider":{"type":["string","null"]},"asOf":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["baseCurrency","quoteCurrency","rate","source"],"additionalProperties":false}}},"required":["contextType","contextId","rates"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"502":{"description":"502","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/organizations":{"get":{"summary":"List organizations the user has access to","tags":["organizations"],"parameters":[{"name":"page","in":"query","schema":{"default":1,"type":"number"}},{"name":"pageSize","in":"query","schema":{"default":50,"type":"number","minimum":1,"maximum":500}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","INACTIVE","SUSPENDED"]},"locale":{"default":"en","type":"string","enum":["en","sv","no","da","fi","de","fr","es","it","nl","pl","pt","ru","ja","zh","ko","ar","he"]},"businessModel":{"default":"PAYMENT_PROVIDER","type":"string","enum":["PAYMENT_PROVIDER","GATEWAY"]},"acceptedCustomerKinds":{"default":["STANDARD","PROVIDER"],"minItems":1,"type":"array","items":{"type":"string","enum":["STANDARD","PROVIDER"]},"description":"The types of company customer the organization takes on: STANDARD (merchants), PROVIDER (payment providers) or both"},"acceptedLegalEntityTypes":{"default":["COMPANY"],"minItems":1,"type":"array","items":{"type":"string","enum":["COMPANY","INDIVIDUAL"]},"description":"The kinds of customer the organization takes on: COMPANY, INDIVIDUAL or both"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","name","status","locale","businessModel","acceptedCustomerKinds","acceptedLegalEntityTypes","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"},"total":{"type":"number"}},"required":["page","pageSize","hasMore"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"summary":"Create a new organization","tags":["organizations"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","INACTIVE","SUSPENDED"]},"locale":{"default":"en","type":"string","enum":["en","sv","no","da","fi","de","fr","es","it","nl","pl","pt","ru","ja","zh","ko","ar","he"]},"businessModel":{"default":"PAYMENT_PROVIDER","type":"string","enum":["PAYMENT_PROVIDER","GATEWAY"]},"acceptedCustomerKinds":{"default":["STANDARD","PROVIDER"],"minItems":1,"type":"array","items":{"type":"string","enum":["STANDARD","PROVIDER"]},"description":"The types of company customer the organization takes on: STANDARD (merchants), PROVIDER (payment providers) or both"},"acceptedLegalEntityTypes":{"default":["COMPANY"],"minItems":1,"type":"array","items":{"type":"string","enum":["COMPANY","INDIVIDUAL"]},"description":"The kinds of customer the organization takes on: COMPANY, INDIVIDUAL or both"}},"required":["name","status"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","INACTIVE","SUSPENDED"]},"locale":{"default":"en","type":"string","enum":["en","sv","no","da","fi","de","fr","es","it","nl","pl","pt","ru","ja","zh","ko","ar","he"]},"businessModel":{"default":"PAYMENT_PROVIDER","type":"string","enum":["PAYMENT_PROVIDER","GATEWAY"]},"acceptedCustomerKinds":{"default":["STANDARD","PROVIDER"],"minItems":1,"type":"array","items":{"type":"string","enum":["STANDARD","PROVIDER"]},"description":"The types of company customer the organization takes on: STANDARD (merchants), PROVIDER (payment providers) or both"},"acceptedLegalEntityTypes":{"default":["COMPANY"],"minItems":1,"type":"array","items":{"type":"string","enum":["COMPANY","INDIVIDUAL"]},"description":"The kinds of customer the organization takes on: COMPANY, INDIVIDUAL or both"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","name","status","locale","businessModel","acceptedCustomerKinds","acceptedLegalEntityTypes","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/organizations/{organizationId}":{"get":{"summary":"Get an organization by ID","tags":["organizations"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","INACTIVE","SUSPENDED"]},"locale":{"default":"en","type":"string","enum":["en","sv","no","da","fi","de","fr","es","it","nl","pl","pt","ru","ja","zh","ko","ar","he"]},"businessModel":{"default":"PAYMENT_PROVIDER","type":"string","enum":["PAYMENT_PROVIDER","GATEWAY"]},"acceptedCustomerKinds":{"default":["STANDARD","PROVIDER"],"minItems":1,"type":"array","items":{"type":"string","enum":["STANDARD","PROVIDER"]},"description":"The types of company customer the organization takes on: STANDARD (merchants), PROVIDER (payment providers) or both"},"acceptedLegalEntityTypes":{"default":["COMPANY"],"minItems":1,"type":"array","items":{"type":"string","enum":["COMPANY","INDIVIDUAL"]},"description":"The kinds of customer the organization takes on: COMPANY, INDIVIDUAL or both"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","name","status","locale","businessModel","acceptedCustomerKinds","acceptedLegalEntityTypes","createdAt","updatedAt"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"patch":{"summary":"Update an organization","tags":["organizations"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","INACTIVE","SUSPENDED"]},"locale":{"type":"string","enum":["en","sv","no","da","fi","de","fr","es","it","nl","pl","pt","ru","ja","zh","ko","ar","he"]},"businessModel":{"type":"string","enum":["PAYMENT_PROVIDER","GATEWAY"]},"acceptedCustomerKinds":{"minItems":1,"type":"array","items":{"type":"string","enum":["STANDARD","PROVIDER"]},"description":"The types of company customer the organization takes on: STANDARD (merchants), PROVIDER (payment providers) or both"},"acceptedLegalEntityTypes":{"minItems":1,"type":"array","items":{"type":"string","enum":["COMPANY","INDIVIDUAL"]},"description":"The kinds of customer the organization takes on: COMPANY, INDIVIDUAL or both"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","INACTIVE","SUSPENDED"]},"locale":{"default":"en","type":"string","enum":["en","sv","no","da","fi","de","fr","es","it","nl","pl","pt","ru","ja","zh","ko","ar","he"]},"businessModel":{"default":"PAYMENT_PROVIDER","type":"string","enum":["PAYMENT_PROVIDER","GATEWAY"]},"acceptedCustomerKinds":{"default":["STANDARD","PROVIDER"],"minItems":1,"type":"array","items":{"type":"string","enum":["STANDARD","PROVIDER"]},"description":"The types of company customer the organization takes on: STANDARD (merchants), PROVIDER (payment providers) or both"},"acceptedLegalEntityTypes":{"default":["COMPANY"],"minItems":1,"type":"array","items":{"type":"string","enum":["COMPANY","INDIVIDUAL"]},"description":"The kinds of customer the organization takes on: COMPANY, INDIVIDUAL or both"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","name","status","locale","businessModel","acceptedCustomerKinds","acceptedLegalEntityTypes","createdAt","updatedAt"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/organizations/{organizationId}/customers/sync":{"get":{"summary":"Sync organization's customers from Financial system","tags":["organizations"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/organizations/{organizationId}/legal-entity":{"get":{"summary":"Get the organization's legal entity","tags":["organizations"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"origin":{"type":"string","enum":["MIGRATED","OPERATOR","ERP_SYNC","PROVISIONED","SELF_SERVICE","ORGANIZATION"]},"company":{"type":"object","properties":{"legalEntityType":{"anyOf":[{"type":"string","enum":["COMPANY","INDIVIDUAL"]},{"type":"null"}]},"individual":{"anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"],"additionalProperties":false},{"type":"null"}]},"legalName":{"type":"string","minLength":1},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"type":["string","null"]},"type":{"anyOf":[{"type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"legalForm":{"description":"Legal form, e.g. Aktiebolag, GmbH, Ltd","type":["string","null"]},"incorporationDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"url":{"type":["string","null"]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"people":{"type":"array","items":{"type":"object","properties":{"personKey":{"type":"string"},"roles":{"minItems":1,"type":"array","items":{"type":"string","enum":["DIRECTOR","UBO","SIGNATORY","SHAREHOLDER"]}},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"residenceCountry":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]},"controlType":{"anyOf":[{"type":"string","enum":["OWNERSHIP","VOTING","OTHER_CONTROL","SENIOR_MANAGER"]},{"type":"null"}]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["personKey","roles","firstName","lastName"],"additionalProperties":false}},"owners":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"regNo":{"type":["string","null"]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["REGISTRY_EXTRACT","ARTICLES","SHAREHOLDER_REGISTER","UBO_DECLARATION","OTHER"]},"fileName":{"type":"string"},"fileType":{"type":"string"},"fileSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"uploadedAt":{"type":"string"},"addedInVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"byYourOrganization":{"type":"boolean"},"uploadedByName":{"type":["string","null"]}},"required":["id","kind","fileName","fileType","fileSize","uploadedAt","addedInVersion","byYourOrganization","uploadedByName"],"additionalProperties":false}},"documentStorage":{"type":"boolean"},"updatedAt":{"type":"string"},"isController":{"type":"boolean"},"sharedWithYou":{"anyOf":[{"type":"object","properties":{"consentedAt":{"type":"string"}},"required":["consentedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["id","version","origin","company","people","owners","documents","documentStorage","updatedAt","isController","sharedWithYou"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"put":{"description":"Replaces company details, people and corporate owners.","summary":"Save a new version of the organization's legal entity","tags":["organizations"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"company":{"type":"object","properties":{"legalEntityType":{"anyOf":[{"type":"string","enum":["COMPANY","INDIVIDUAL"]},{"type":"null"}]},"individual":{"anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"]},{"type":"null"}]},"legalName":{"type":"string","minLength":1},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"type":["string","null"]},"type":{"anyOf":[{"type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]},{"type":"null"}]}}},{"type":"null"}]},"legalForm":{"description":"Legal form, e.g. Aktiebolag, GmbH, Ltd","type":["string","null"]},"incorporationDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"url":{"type":["string","null"]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["legalName"]},"people":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"personKey":{"type":"string","minLength":1,"maxLength":64},"roles":{"minItems":1,"type":"array","items":{"type":"string","enum":["DIRECTOR","UBO","SIGNATORY","SHAREHOLDER"]}},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"residenceCountry":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]},"controlType":{"anyOf":[{"type":"string","enum":["OWNERSHIP","VOTING","OTHER_CONTROL","SENIOR_MANAGER"]},{"type":"null"}]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["roles","firstName","lastName"]}},"owners":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"regNo":{"type":["string","null"]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]}},"required":["name"]}}},"required":["expectedVersion","company","people","owners"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"origin":{"type":"string","enum":["MIGRATED","OPERATOR","ERP_SYNC","PROVISIONED","SELF_SERVICE","ORGANIZATION"]},"company":{"type":"object","properties":{"legalEntityType":{"anyOf":[{"type":"string","enum":["COMPANY","INDIVIDUAL"]},{"type":"null"}]},"individual":{"anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"],"additionalProperties":false},{"type":"null"}]},"legalName":{"type":"string","minLength":1},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"type":["string","null"]},"type":{"anyOf":[{"type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"legalForm":{"description":"Legal form, e.g. Aktiebolag, GmbH, Ltd","type":["string","null"]},"incorporationDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"url":{"type":["string","null"]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"people":{"type":"array","items":{"type":"object","properties":{"personKey":{"type":"string"},"roles":{"minItems":1,"type":"array","items":{"type":"string","enum":["DIRECTOR","UBO","SIGNATORY","SHAREHOLDER"]}},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"residenceCountry":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]},"controlType":{"anyOf":[{"type":"string","enum":["OWNERSHIP","VOTING","OTHER_CONTROL","SENIOR_MANAGER"]},{"type":"null"}]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["personKey","roles","firstName","lastName"],"additionalProperties":false}},"owners":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"regNo":{"type":["string","null"]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["REGISTRY_EXTRACT","ARTICLES","SHAREHOLDER_REGISTER","UBO_DECLARATION","OTHER"]},"fileName":{"type":"string"},"fileType":{"type":"string"},"fileSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"uploadedAt":{"type":"string"},"addedInVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"byYourOrganization":{"type":"boolean"},"uploadedByName":{"type":["string","null"]}},"required":["id","kind","fileName","fileType","fileSize","uploadedAt","addedInVersion","byYourOrganization","uploadedByName"],"additionalProperties":false}},"documentStorage":{"type":"boolean"},"updatedAt":{"type":"string"},"isController":{"type":"boolean"},"sharedWithYou":{"anyOf":[{"type":"object","properties":{"consentedAt":{"type":"string"}},"required":["consentedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["id","version","origin","company","people","owners","documents","documentStorage","updatedAt","isController","sharedWithYou"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string","enum":["NOT_CONTROLLER","VERSION_CONFLICT"]}},"required":["message","code"],"additionalProperties":false}}}}}}},"/api/v1/organizations/{organizationId}/legal-entity/versions":{"get":{"summary":"List the versions of the organization's legal entity, newest first","tags":["organizations"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changeReason":{"type":"string","enum":["MIGRATED","CREATED","DETAILS_CHANGE","ADDRESS_CHANGE","DIRECTOR_CHANGE","UBO_CHANGE","PEOPLE_CHANGE","OWNERSHIP_CHANGE","DOCUMENTS_CHANGE","MERGED"]},"changedFields":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"byYourOrganization":{"type":"boolean"},"createdByName":{"type":["string","null"]}},"required":["version","changeReason","changedFields","createdAt","byYourOrganization","createdByName"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/organizations/{organizationId}/legal-entity/versions/{version}":{"get":{"summary":"Get one version of the organization's legal entity","tags":["organizations"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changeReason":{"type":"string","enum":["MIGRATED","CREATED","DETAILS_CHANGE","ADDRESS_CHANGE","DIRECTOR_CHANGE","UBO_CHANGE","PEOPLE_CHANGE","OWNERSHIP_CHANGE","DOCUMENTS_CHANGE","MERGED"]},"changedFields":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"byYourOrganization":{"type":"boolean"},"createdByName":{"type":["string","null"]},"company":{"type":"object","properties":{"legalEntityType":{"anyOf":[{"type":"string","enum":["COMPANY","INDIVIDUAL"]},{"type":"null"}]},"individual":{"anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"],"additionalProperties":false},{"type":"null"}]},"legalName":{"type":"string","minLength":1},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"type":["string","null"]},"type":{"anyOf":[{"type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"legalForm":{"description":"Legal form, e.g. Aktiebolag, GmbH, Ltd","type":["string","null"]},"incorporationDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"url":{"type":["string","null"]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"people":{"type":"array","items":{"type":"object","properties":{"personKey":{"type":"string"},"roles":{"minItems":1,"type":"array","items":{"type":"string","enum":["DIRECTOR","UBO","SIGNATORY","SHAREHOLDER"]}},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"residenceCountry":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]},"controlType":{"anyOf":[{"type":"string","enum":["OWNERSHIP","VOTING","OTHER_CONTROL","SENIOR_MANAGER"]},{"type":"null"}]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["personKey","roles","firstName","lastName"],"additionalProperties":false}},"owners":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"regNo":{"type":["string","null"]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["REGISTRY_EXTRACT","ARTICLES","SHAREHOLDER_REGISTER","UBO_DECLARATION","OTHER"]},"fileName":{"type":"string"},"fileType":{"type":"string"},"fileSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"uploadedAt":{"type":"string"},"addedInVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"byYourOrganization":{"type":"boolean"},"uploadedByName":{"type":["string","null"]}},"required":["id","kind","fileName","fileType","fileSize","uploadedAt","addedInVersion","byYourOrganization","uploadedByName"],"additionalProperties":false}}},"required":["version","changeReason","changedFields","createdAt","byYourOrganization","createdByName","company","people","owners","documents"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/organizations/{organizationId}/legal-entity/documents":{"post":{"summary":"Add a company document, as a new version of the organization's legal entity","tags":["organizations"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"kind":{"type":"string","enum":["REGISTRY_EXTRACT","ARTICLES","SHAREHOLDER_REGISTER","UBO_DECLARATION","OTHER"]},"fileName":{"type":"string","minLength":1,"maxLength":200},"fileType":{"type":"string","enum":["application/pdf","image/png","image/jpeg","image/jpg"]},"contentBase64":{"type":"string","minLength":1,"maxLength":13981018}},"required":["expectedVersion","kind","fileName","fileType","contentBase64"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"origin":{"type":"string","enum":["MIGRATED","OPERATOR","ERP_SYNC","PROVISIONED","SELF_SERVICE","ORGANIZATION"]},"company":{"type":"object","properties":{"legalEntityType":{"anyOf":[{"type":"string","enum":["COMPANY","INDIVIDUAL"]},{"type":"null"}]},"individual":{"anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"],"additionalProperties":false},{"type":"null"}]},"legalName":{"type":"string","minLength":1},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"type":["string","null"]},"type":{"anyOf":[{"type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"legalForm":{"description":"Legal form, e.g. Aktiebolag, GmbH, Ltd","type":["string","null"]},"incorporationDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"url":{"type":["string","null"]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"people":{"type":"array","items":{"type":"object","properties":{"personKey":{"type":"string"},"roles":{"minItems":1,"type":"array","items":{"type":"string","enum":["DIRECTOR","UBO","SIGNATORY","SHAREHOLDER"]}},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"residenceCountry":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]},"controlType":{"anyOf":[{"type":"string","enum":["OWNERSHIP","VOTING","OTHER_CONTROL","SENIOR_MANAGER"]},{"type":"null"}]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["personKey","roles","firstName","lastName"],"additionalProperties":false}},"owners":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"regNo":{"type":["string","null"]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["REGISTRY_EXTRACT","ARTICLES","SHAREHOLDER_REGISTER","UBO_DECLARATION","OTHER"]},"fileName":{"type":"string"},"fileType":{"type":"string"},"fileSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"uploadedAt":{"type":"string"},"addedInVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"byYourOrganization":{"type":"boolean"},"uploadedByName":{"type":["string","null"]}},"required":["id","kind","fileName","fileType","fileSize","uploadedAt","addedInVersion","byYourOrganization","uploadedByName"],"additionalProperties":false}},"documentStorage":{"type":"boolean"},"updatedAt":{"type":"string"},"isController":{"type":"boolean"},"sharedWithYou":{"anyOf":[{"type":"object","properties":{"consentedAt":{"type":"string"}},"required":["consentedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["id","version","origin","company","people","owners","documents","documentStorage","updatedAt","isController","sharedWithYou"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string","enum":["NOT_CONTROLLER","VERSION_CONFLICT"]}},"required":["message","code"],"additionalProperties":false}}}},"503":{"description":"503","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/organizations/{organizationId}/legal-entity/documents/{documentId}/remove":{"post":{"summary":"Remove a company document, as a new version; earlier versions keep it","tags":["organizations"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["expectedVersion"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"origin":{"type":"string","enum":["MIGRATED","OPERATOR","ERP_SYNC","PROVISIONED","SELF_SERVICE","ORGANIZATION"]},"company":{"type":"object","properties":{"legalEntityType":{"anyOf":[{"type":"string","enum":["COMPANY","INDIVIDUAL"]},{"type":"null"}]},"individual":{"anyOf":[{"type":"object","properties":{"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"nationalId":{"description":"Personal identity number, e.g. a Swedish personnummer","type":["string","null"]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["firstName","lastName"],"additionalProperties":false},{"type":"null"}]},"legalName":{"type":"string","minLength":1},"regNo":{"description":"Registration number","type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"type":["string","null"]},"type":{"anyOf":[{"type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"legalForm":{"description":"Legal form, e.g. Aktiebolag, GmbH, Ltd","type":["string","null"]},"incorporationDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"url":{"type":["string","null"]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"people":{"type":"array","items":{"type":"object","properties":{"personKey":{"type":"string"},"roles":{"minItems":1,"type":"array","items":{"type":"string","enum":["DIRECTOR","UBO","SIGNATORY","SHAREHOLDER"]}},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"residenceCountry":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]},"controlType":{"anyOf":[{"type":"string","enum":["OWNERSHIP","VOTING","OTHER_CONTROL","SENIOR_MANAGER"]},{"type":"null"}]},"pepDeclared":{"description":"Declared to be a politically exposed person","type":["boolean","null"]}},"required":["personKey","roles","firstName","lastName"],"additionalProperties":false}},"owners":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"regNo":{"type":["string","null"]},"ownershipPercent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,4})?$"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["REGISTRY_EXTRACT","ARTICLES","SHAREHOLDER_REGISTER","UBO_DECLARATION","OTHER"]},"fileName":{"type":"string"},"fileType":{"type":"string"},"fileSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"uploadedAt":{"type":"string"},"addedInVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"byYourOrganization":{"type":"boolean"},"uploadedByName":{"type":["string","null"]}},"required":["id","kind","fileName","fileType","fileSize","uploadedAt","addedInVersion","byYourOrganization","uploadedByName"],"additionalProperties":false}},"documentStorage":{"type":"boolean"},"updatedAt":{"type":"string"},"isController":{"type":"boolean"},"sharedWithYou":{"anyOf":[{"type":"object","properties":{"consentedAt":{"type":"string"}},"required":["consentedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["id","version","origin","company","people","owners","documents","documentStorage","updatedAt","isController","sharedWithYou"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string","enum":["NOT_CONTROLLER","VERSION_CONFLICT"]}},"required":["message","code"],"additionalProperties":false}}}}}}},"/api/v1/organizations/{organizationId}/legal-entity/documents/{documentId}/download":{"get":{"summary":"Download a document of any version of the organization's legal entity","tags":["organizations"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"503":{"description":"503","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/services/definitions":{"get":{"summary":"Get the service definitions available to a context","tags":["serviceConnections"],"parameters":[{"name":"contextType","in":"query","schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"interfaces":{"type":"array","items":{"type":"string","enum":["erp","payment","analytics","crm","iplookup","binlookup","cardinspect","exchange","cryptoexchange","devicefingerprint","threeds","risk","email","sms","ai","bank","observability"]}},"contexts":{"type":"array","items":{"type":"string","enum":["organization","partner","customer"]}},"authTypes":{"type":"array","items":{"type":"string","enum":["oauth","api_key"]}},"allowsMultipleConnections":{"default":true,"type":"boolean"},"uiMetadata":{"type":"object","properties":{"icon":{"type":"string"},"category":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["text","password","select","textarea","number","email","url","checkbox","multiselect"]},"required":{"type":"boolean"},"placeholder":{"type":"string"},"description":{"type":"string"},"help":{"type":"object","properties":{"text":{"type":"string"},"codes":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"meaning":{"type":"string"}},"required":["value","meaning"],"additionalProperties":false}},"links":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri"}},"required":["label","url"],"additionalProperties":false}}},"required":["text"],"additionalProperties":false},"default":{},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"validation":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name","label","type"],"additionalProperties":false}},"description":{"type":"string"},"testing":{"type":"object","properties":{"intro":{"type":"string"},"cards":{"type":"array","items":{"type":"object","properties":{"pan":{"type":"string"},"brand":{"type":"string"},"expiry":{"type":"string"},"cvv":{"type":"string"},"scenario":{"type":"string"}},"required":["pan","scenario"],"additionalProperties":false}},"triggers":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"effect":{"type":"string"}},"required":["field","value","effect"],"additionalProperties":false}},"notes":{"type":"array","items":{"type":"string"}},"links":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri"}},"required":["label","url"],"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"supportsWhiteLabel":{"type":"boolean"},"supportedPaymentOptions":{"type":"array","items":{"type":"string"}},"outputFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"}},"required":["id","label","type"],"additionalProperties":false}},"capabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"defaults":{"type":"object","properties":{"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"allow":{"readOnly":true,"type":"array","items":{"type":"string"}},"deny":{"readOnly":true,"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false},"options":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"option":{"type":"string"},"operations":{"readOnly":true,"type":"array","items":{"type":"string"}},"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"allow":{"readOnly":true,"type":"array","items":{"type":"string"}},"deny":{"readOnly":true,"type":"array","items":{"type":"string"}}},"additionalProperties":false}},"flows":{"readOnly":true,"type":"array","items":{"type":"string"}},"notes":{"type":"string"}},"required":["option","operations"],"additionalProperties":false}}},"required":["options"],"additionalProperties":false}},"environments":{"type":"object","properties":{"field":{"type":"string"},"test":{"type":"string"},"live":{"type":"string"},"credentialField":{"type":"string"}},"additionalProperties":false}},"required":["id","name","description","interfaces","contexts","authTypes","allowsMultipleConnections"],"additionalProperties":false}}}}}}}},"/api/v1/services/interfaces/{interface}":{"get":{"summary":"Get services implementing a specific interface","tags":["serviceConnections"],"parameters":[{"name":"interface","in":"path","required":true,"schema":{"type":"string","enum":["erp","payment","analytics","crm","iplookup","binlookup","cardinspect","exchange","cryptoexchange","devicefingerprint","threeds","risk","email","sms","ai","bank","observability"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"interfaces":{"type":"array","items":{"type":"string","enum":["erp","payment","analytics","crm","iplookup","binlookup","cardinspect","exchange","cryptoexchange","devicefingerprint","threeds","risk","email","sms","ai","bank","observability"]}},"contexts":{"type":"array","items":{"type":"string","enum":["organization","partner","customer"]}},"authTypes":{"type":"array","items":{"type":"string","enum":["oauth","api_key"]}},"allowsMultipleConnections":{"default":true,"type":"boolean"},"uiMetadata":{"type":"object","properties":{"icon":{"type":"string"},"category":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["text","password","select","textarea","number","email","url","checkbox","multiselect"]},"required":{"type":"boolean"},"placeholder":{"type":"string"},"description":{"type":"string"},"help":{"type":"object","properties":{"text":{"type":"string"},"codes":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"meaning":{"type":"string"}},"required":["value","meaning"],"additionalProperties":false}},"links":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri"}},"required":["label","url"],"additionalProperties":false}}},"required":["text"],"additionalProperties":false},"default":{},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"validation":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name","label","type"],"additionalProperties":false}},"description":{"type":"string"},"testing":{"type":"object","properties":{"intro":{"type":"string"},"cards":{"type":"array","items":{"type":"object","properties":{"pan":{"type":"string"},"brand":{"type":"string"},"expiry":{"type":"string"},"cvv":{"type":"string"},"scenario":{"type":"string"}},"required":["pan","scenario"],"additionalProperties":false}},"triggers":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"effect":{"type":"string"}},"required":["field","value","effect"],"additionalProperties":false}},"notes":{"type":"array","items":{"type":"string"}},"links":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri"}},"required":["label","url"],"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"supportsWhiteLabel":{"type":"boolean"},"supportedPaymentOptions":{"type":"array","items":{"type":"string"}},"outputFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"}},"required":["id","label","type"],"additionalProperties":false}},"capabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"defaults":{"type":"object","properties":{"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"allow":{"readOnly":true,"type":"array","items":{"type":"string"}},"deny":{"readOnly":true,"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false},"options":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"option":{"type":"string"},"operations":{"readOnly":true,"type":"array","items":{"type":"string"}},"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"allow":{"readOnly":true,"type":"array","items":{"type":"string"}},"deny":{"readOnly":true,"type":"array","items":{"type":"string"}}},"additionalProperties":false}},"flows":{"readOnly":true,"type":"array","items":{"type":"string"}},"notes":{"type":"string"}},"required":["option","operations"],"additionalProperties":false}}},"required":["options"],"additionalProperties":false}},"environments":{"type":"object","properties":{"field":{"type":"string"},"test":{"type":"string"},"live":{"type":"string"},"credentialField":{"type":"string"}},"additionalProperties":false}},"required":["id","name","description","interfaces","contexts","authTypes","allowsMultipleConnections"],"additionalProperties":false}}}}}}}},"/api/v1/services/contexts/{context}":{"get":{"summary":"Get services available for a specific context","tags":["serviceConnections"],"parameters":[{"name":"context","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"interfaces":{"type":"array","items":{"type":"string","enum":["erp","payment","analytics","crm","iplookup","binlookup","cardinspect","exchange","cryptoexchange","devicefingerprint","threeds","risk","email","sms","ai","bank","observability"]}},"contexts":{"type":"array","items":{"type":"string","enum":["organization","partner","customer"]}},"authTypes":{"type":"array","items":{"type":"string","enum":["oauth","api_key"]}},"allowsMultipleConnections":{"default":true,"type":"boolean"},"uiMetadata":{"type":"object","properties":{"icon":{"type":"string"},"category":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["text","password","select","textarea","number","email","url","checkbox","multiselect"]},"required":{"type":"boolean"},"placeholder":{"type":"string"},"description":{"type":"string"},"help":{"type":"object","properties":{"text":{"type":"string"},"codes":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"meaning":{"type":"string"}},"required":["value","meaning"],"additionalProperties":false}},"links":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri"}},"required":["label","url"],"additionalProperties":false}}},"required":["text"],"additionalProperties":false},"default":{},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"validation":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name","label","type"],"additionalProperties":false}},"description":{"type":"string"},"testing":{"type":"object","properties":{"intro":{"type":"string"},"cards":{"type":"array","items":{"type":"object","properties":{"pan":{"type":"string"},"brand":{"type":"string"},"expiry":{"type":"string"},"cvv":{"type":"string"},"scenario":{"type":"string"}},"required":["pan","scenario"],"additionalProperties":false}},"triggers":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"effect":{"type":"string"}},"required":["field","value","effect"],"additionalProperties":false}},"notes":{"type":"array","items":{"type":"string"}},"links":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri"}},"required":["label","url"],"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"supportsWhiteLabel":{"type":"boolean"},"supportedPaymentOptions":{"type":"array","items":{"type":"string"}},"outputFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean"]},"description":{"type":"string"}},"required":["id","label","type"],"additionalProperties":false}},"capabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"defaults":{"type":"object","properties":{"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"allow":{"readOnly":true,"type":"array","items":{"type":"string"}},"deny":{"readOnly":true,"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false},"options":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"option":{"type":"string"},"operations":{"readOnly":true,"type":"array","items":{"type":"string"}},"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"allow":{"readOnly":true,"type":"array","items":{"type":"string"}},"deny":{"readOnly":true,"type":"array","items":{"type":"string"}}},"additionalProperties":false}},"flows":{"readOnly":true,"type":"array","items":{"type":"string"}},"notes":{"type":"string"}},"required":["option","operations"],"additionalProperties":false}}},"required":["options"],"additionalProperties":false}},"environments":{"type":"object","properties":{"field":{"type":"string"},"test":{"type":"string"},"live":{"type":"string"},"credentialField":{"type":"string"}},"additionalProperties":false}},"required":["id","name","description","interfaces","contexts","authTypes","allowsMultipleConnections"],"additionalProperties":false}}}}}}}},"/api/v1/service-connections":{"get":{"summary":"List service connections for current context","tags":["serviceConnections"],"parameters":[{"name":"contextType","in":"query","schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"serviceId":{"type":"string"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerId":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"authenticationType":{"type":"string","const":"oauth"},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["ACTIVE","INACTIVE","PENDING","ERROR","EXPIRED"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"lastSyncedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"managedByApplicationId":{"type":["string","null"]},"mode":{"anyOf":[{"type":"string","enum":["live","test"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"clientId":{"type":"string"},"tokenExpiry":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","serviceId","slugId","contextType","contextId","authenticationType","name","status","config","createdAt","updatedAt","clientId","tokenExpiry"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"serviceId":{"type":"string"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerId":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"authenticationType":{"type":"string","const":"api_key"},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["ACTIVE","INACTIVE","PENDING","ERROR","EXPIRED"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"lastSyncedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"managedByApplicationId":{"type":["string","null"]},"mode":{"anyOf":[{"type":"string","enum":["live","test"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"refreshToken":{"type":"string"},"tokenExpiry":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","serviceId","slugId","contextType","contextId","authenticationType","name","status","config","createdAt","updatedAt"],"additionalProperties":false}]}}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/service-connections/{slugId}":{"get":{"summary":"Get a service connection by slugId (context from auth header)","tags":["serviceConnections"],"parameters":[{"name":"slugId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"serviceId":{"type":"string"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerId":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"authenticationType":{"type":"string","const":"oauth"},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["ACTIVE","INACTIVE","PENDING","ERROR","EXPIRED"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"lastSyncedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"managedByApplicationId":{"type":["string","null"]},"mode":{"anyOf":[{"type":"string","enum":["live","test"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"clientId":{"type":"string"},"tokenExpiry":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","serviceId","slugId","contextType","contextId","authenticationType","name","status","config","createdAt","updatedAt","clientId","tokenExpiry"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"serviceId":{"type":"string"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerId":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"authenticationType":{"type":"string","const":"api_key"},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["ACTIVE","INACTIVE","PENDING","ERROR","EXPIRED"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"lastSyncedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"managedByApplicationId":{"type":["string","null"]},"mode":{"anyOf":[{"type":"string","enum":["live","test"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"refreshToken":{"type":"string"},"tokenExpiry":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","serviceId","slugId","contextType","contextId","authenticationType","name","status","config","createdAt","updatedAt"],"additionalProperties":false}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/service-connections/oauth":{"post":{"summary":"Initiate an OAuth service connection flow","tags":["serviceConnections"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"serviceId":{"type":"string"},"providerSlug":{"type":"string"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"authenticationType":{"type":"string","const":"oauth"},"name":{"type":"string","minLength":1},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["serviceId","contextType","contextId","authenticationType","name","config"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"state":{"type":"string"}},"required":["authorizationUrl","state"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/oauth/callback":{"get":{"summary":"Complete a service connection OAuth flow","tags":["serviceConnections"],"parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string"}},{"name":"state","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"serviceId":{"type":"string"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerId":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"authenticationType":{"type":"string","const":"oauth"},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["ACTIVE","INACTIVE","PENDING","ERROR","EXPIRED"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"lastSyncedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"managedByApplicationId":{"type":["string","null"]},"mode":{"anyOf":[{"type":"string","enum":["live","test"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"clientId":{"type":"string"},"tokenExpiry":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","serviceId","slugId","contextType","contextId","authenticationType","name","status","config","createdAt","updatedAt","clientId","tokenExpiry"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"serviceId":{"type":"string"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerId":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"authenticationType":{"type":"string","const":"api_key"},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["ACTIVE","INACTIVE","PENDING","ERROR","EXPIRED"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"lastSyncedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"managedByApplicationId":{"type":["string","null"]},"mode":{"anyOf":[{"type":"string","enum":["live","test"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"refreshToken":{"type":"string"},"tokenExpiry":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","serviceId","slugId","contextType","contextId","authenticationType","name","status","config","createdAt","updatedAt"],"additionalProperties":false}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/service-connections/api-key":{"post":{"summary":"Create an API key service connection","tags":["serviceConnections"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"serviceId":{"type":"string"},"providerSlug":{"type":"string"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"authenticationType":{"type":"string","const":"api_key"},"name":{"type":"string","minLength":1},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["serviceId","contextType","contextId","authenticationType","name","config"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"serviceId":{"type":"string"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerId":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"authenticationType":{"type":"string","const":"oauth"},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["ACTIVE","INACTIVE","PENDING","ERROR","EXPIRED"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"lastSyncedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"managedByApplicationId":{"type":["string","null"]},"mode":{"anyOf":[{"type":"string","enum":["live","test"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"clientId":{"type":"string"},"tokenExpiry":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","serviceId","slugId","contextType","contextId","authenticationType","name","status","config","createdAt","updatedAt","clientId","tokenExpiry"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"serviceId":{"type":"string"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerId":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"authenticationType":{"type":"string","const":"api_key"},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["ACTIVE","INACTIVE","PENDING","ERROR","EXPIRED"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"lastSyncedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"managedByApplicationId":{"type":["string","null"]},"mode":{"anyOf":[{"type":"string","enum":["live","test"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"refreshToken":{"type":"string"},"tokenExpiry":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","serviceId","slugId","contextType","contextId","authenticationType","name","status","config","createdAt","updatedAt"],"additionalProperties":false}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/service-connections/{id}/test":{"post":{"summary":"Test a service connection","tags":["serviceConnections"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ACTIVE","INACTIVE","PENDING","ERROR","EXPIRED"]},"message":{"type":"string"}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/service-connections/{id}":{"put":{"summary":"Update a service connection","tags":["serviceConnections"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"serviceId":{"type":"string"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerId":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"authenticationType":{"type":"string","const":"oauth"},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["ACTIVE","INACTIVE","PENDING","ERROR","EXPIRED"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"lastSyncedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"managedByApplicationId":{"type":["string","null"]},"mode":{"anyOf":[{"type":"string","enum":["live","test"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"clientId":{"type":"string"},"tokenExpiry":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","serviceId","slugId","contextType","contextId","authenticationType","name","status","config","createdAt","updatedAt","clientId","tokenExpiry"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"serviceId":{"type":"string"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerId":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"authenticationType":{"type":"string","const":"api_key"},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["ACTIVE","INACTIVE","PENDING","ERROR","EXPIRED"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"lastSyncedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"managedByApplicationId":{"type":["string","null"]},"mode":{"anyOf":[{"type":"string","enum":["live","test"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"refreshToken":{"type":"string"},"tokenExpiry":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","serviceId","slugId","contextType","contextId","authenticationType","name","status","config","createdAt","updatedAt"],"additionalProperties":false}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a service connection","tags":["serviceConnections"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"openTransactions":{"type":"number"},"recentTransactions":{"type":"number"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/service-connections/{id}/fees":{"get":{"summary":"The provider fees of a provider account","tags":["serviceConnections"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"connectionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"source":{"type":"string","enum":["manual","provider"]},"editable":{"type":"boolean"},"providerName":{"type":["string","null"]},"tables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"name":{"type":"string"},"slugId":{"type":"string"},"description":{"type":["string","null"]},"kind":{"default":"generic","type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"enabled":{"default":true,"type":"boolean"},"priority":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field","op","values"],"additionalProperties":false}},"hitPolicy":{"type":"string","enum":["first","collect"]},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}},"serviceConnectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"managedByApplicationId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"createdBy":{"type":["string","null"]}},"required":["id","context","name","slugId","description","kind","enabled","priority","preConditions","hitPolicy","inputs","outputs","rules","createdAt","updatedAt","createdBy"],"additionalProperties":false}}},"required":["connectionId","source","editable","tables"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"post":{"summary":"Add a provider fee rule set to a provider account","tags":["serviceConnections"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}}}},"required":["id","label"]}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"]}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"]}}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"name":{"type":"string"},"slugId":{"type":"string"},"description":{"type":["string","null"]},"kind":{"default":"generic","type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"enabled":{"default":true,"type":"boolean"},"priority":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field","op","values"],"additionalProperties":false}},"hitPolicy":{"type":"string","enum":["first","collect"]},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}},"serviceConnectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"managedByApplicationId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"createdBy":{"type":["string","null"]}},"required":["id","context","name","slugId","description","kind","enabled","priority","preConditions","hitPolicy","inputs","outputs","rules","createdAt","updatedAt","createdBy"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/service-connections/{id}/fees/{tableId}":{"put":{"summary":"Change one of a provider account's fee rule sets","tags":["serviceConnections"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"tableId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"enabled":{"type":"boolean"},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}}}},"required":["id","label"]}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"]}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"]}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"name":{"type":"string"},"slugId":{"type":"string"},"description":{"type":["string","null"]},"kind":{"default":"generic","type":"string","enum":["generic","fraud-block","routing","routing-plan","fees","provider-fees","emi-fees","emi-gas-fees","fx","notification-rules","notification-routing"]},"enabled":{"default":true,"type":"boolean"},"priority":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preConditions":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"default":"in","type":"string","enum":["in","not-in"]},"values":{"default":[],"type":"array","items":{"type":"string"}}},"required":["field","op","values"],"additionalProperties":false}},"hitPolicy":{"type":"string","enum":["first","collect"]},"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}},"serviceConnectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"managedByApplicationId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"createdBy":{"type":["string","null"]}},"required":["id","context","name","slugId","description","kind","enabled","priority","preConditions","hitPolicy","inputs","outputs","rules","createdAt","updatedAt","createdBy"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove one of a provider account's fee rule sets","tags":["serviceConnections"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"tableId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/providers":{"get":{"summary":"List providers for the current context","tags":["providers"],"parameters":[{"name":"serviceInterface","in":"query","schema":{"type":"string"}},{"name":"connectorId","in":"query","schema":{"type":"string"}},{"name":"contextType","in":"query","schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"connectorId":{"type":"string"},"serviceInterface":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"enabled":{"type":"boolean"},"capabilities":{"type":"array","items":{"type":"object","properties":{"option":{"type":"string"},"enabled":{"type":"boolean"},"operations":{"readOnly":true,"type":"array","items":{"type":"string"}},"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"allow":{"readOnly":true,"type":"array","items":{"type":"string"}},"deny":{"readOnly":true,"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"required":["option"],"additionalProperties":false}},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"operatedByCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"operatorName":{"type":["string","null"]},"publishedOfferings":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slugId","connectorId","serviceInterface","contextType","contextId","name","enabled","capabilities","createdAt","updatedAt"],"additionalProperties":false}}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"post":{"summary":"Define a provider over a connector","tags":["providers"],"parameters":[{"name":"contextType","in":"query","schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"connectorId":{"type":"string"},"serviceInterface":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"enabled":{"default":true,"type":"boolean"},"capabilities":{"default":[],"type":"array","items":{"type":"object","properties":{"option":{"type":"string"},"enabled":{"type":"boolean"},"operations":{"readOnly":true,"type":"array","items":{"type":"string"}},"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"allow":{"readOnly":true,"type":"array","items":{"type":"string"}},"deny":{"readOnly":true,"type":"array","items":{"type":"string"}}}}}},"required":["option"]}},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}}},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["slugId","connectorId","serviceInterface","name"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"connectorId":{"type":"string"},"serviceInterface":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"enabled":{"type":"boolean"},"capabilities":{"type":"array","items":{"type":"object","properties":{"option":{"type":"string"},"enabled":{"type":"boolean"},"operations":{"readOnly":true,"type":"array","items":{"type":"string"}},"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"allow":{"readOnly":true,"type":"array","items":{"type":"string"}},"deny":{"readOnly":true,"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"required":["option"],"additionalProperties":false}},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"operatedByCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"operatorName":{"type":["string","null"]},"publishedOfferings":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slugId","connectorId","serviceInterface","contextType","contextId","name","enabled","capabilities","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"violations":{"type":"array","items":{"type":"object","properties":{"option":{"type":"string"},"operations":{"type":"array","items":{"type":"string"}},"dimension":{"type":"string"},"message":{"type":"string"}},"required":["option","message"],"additionalProperties":false}}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/providers/{slugId}":{"get":{"summary":"Get one provider by slug","tags":["providers"],"parameters":[{"name":"slugId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"connectorId":{"type":"string"},"serviceInterface":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"enabled":{"type":"boolean"},"capabilities":{"type":"array","items":{"type":"object","properties":{"option":{"type":"string"},"enabled":{"type":"boolean"},"operations":{"readOnly":true,"type":"array","items":{"type":"string"}},"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"allow":{"readOnly":true,"type":"array","items":{"type":"string"}},"deny":{"readOnly":true,"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"required":["option"],"additionalProperties":false}},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"operatedByCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"operatorName":{"type":["string","null"]},"publishedOfferings":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slugId","connectorId","serviceInterface","contextType","contextId","name","enabled","capabilities","createdAt","updatedAt"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"patch":{"summary":"Change a provider's narrowing or display identity","tags":["providers"],"parameters":[{"name":"slugId","in":"path","required":true,"schema":{"type":"string"}},{"name":"contextType","in":"query","schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"enabled":{"type":"boolean"},"capabilities":{"type":"array","items":{"type":"object","properties":{"option":{"type":"string"},"enabled":{"type":"boolean"},"operations":{"readOnly":true,"type":"array","items":{"type":"string"}},"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"allow":{"readOnly":true,"type":"array","items":{"type":"string"}},"deny":{"readOnly":true,"type":"array","items":{"type":"string"}}}}}},"required":["option"]}},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}}},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"operatedByCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"connectorId":{"type":"string"},"serviceInterface":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"enabled":{"type":"boolean"},"capabilities":{"type":"array","items":{"type":"object","properties":{"option":{"type":"string"},"enabled":{"type":"boolean"},"operations":{"readOnly":true,"type":"array","items":{"type":"string"}},"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"allow":{"readOnly":true,"type":"array","items":{"type":"string"}},"deny":{"readOnly":true,"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"required":["option"],"additionalProperties":false}},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"operatedByCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"operatorName":{"type":["string","null"]},"publishedOfferings":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slugId","connectorId","serviceInterface","contextType","contextId","name","enabled","capabilities","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"violations":{"type":"array","items":{"type":"object","properties":{"option":{"type":"string"},"operations":{"type":"array","items":{"type":"string"}},"dimension":{"type":"string"},"message":{"type":"string"}},"required":["option","message"],"additionalProperties":false}}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a provider that has no accounts","tags":["providers"],"parameters":[{"name":"slugId","in":"path","required":true,"schema":{"type":"string"}},{"name":"contextType","in":"query","schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"204":{"description":"204","content":{"application/json":{"schema":{}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"accountCount":{"type":"number"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/connector-policies":{"get":{"description":"Returns the policy stored on an organization or customer, the connectors it may currently attach, and the candidates it may choose from (the parent's effective set).","summary":"Get the connector availability policy for a context","tags":["providerPolicies"],"parameters":[{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"policy":{"type":"object","properties":{"mode":{"default":"inherit","type":"string","enum":["inherit","allowlist"]},"allowed":{"default":[],"type":"array","items":{"type":"string","minLength":1}}},"required":["mode","allowed"],"additionalProperties":false},"effective":{"type":"array","items":{"type":"string"}},"candidates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"connectorId":{"type":"string"},"serviceInterface":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"enabled":{"type":"boolean"},"capabilities":{"type":"array","items":{"type":"object","properties":{"option":{"type":"string"},"enabled":{"type":"boolean"},"operations":{"readOnly":true,"type":"array","items":{"type":"string"}},"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"allow":{"readOnly":true,"type":"array","items":{"type":"string"}},"deny":{"readOnly":true,"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"required":["option"],"additionalProperties":false}},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"operatedByCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"operatorName":{"type":["string","null"]},"publishedOfferings":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slugId","connectorId","serviceInterface","contextType","contextId","name","enabled","capabilities","createdAt","updatedAt"],"additionalProperties":false}},"onRequest":{"default":[],"type":"array","items":{"type":"string"}},"granted":{"default":[],"type":"array","items":{"type":"string"}},"canManageCustomerAccess":{"default":false,"type":"boolean"},"inheritedFrom":{"type":"object","properties":{"contextType":{"type":"string","const":"organization"},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["contextType","contextId"],"additionalProperties":false},"updatedAt":{"type":"string"}},"required":["contextType","contextId","policy","effective","candidates","onRequest","granted","canManageCustomerAccess"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"put":{"description":"An organization policy can only be changed by the platform root user. A customer policy can only narrow its organization's set; connector ids outside the candidates are rejected.","summary":"Replace the connector availability policy for a context","tags":["providerPolicies"],"parameters":[{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"default":"inherit","type":"string","enum":["inherit","allowlist"]},"allowed":{"default":[],"type":"array","items":{"type":"string","minLength":1}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"policy":{"type":"object","properties":{"mode":{"default":"inherit","type":"string","enum":["inherit","allowlist"]},"allowed":{"default":[],"type":"array","items":{"type":"string","minLength":1}}},"required":["mode","allowed"],"additionalProperties":false},"effective":{"type":"array","items":{"type":"string"}},"candidates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"connectorId":{"type":"string"},"serviceInterface":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"enabled":{"type":"boolean"},"capabilities":{"type":"array","items":{"type":"object","properties":{"option":{"type":"string"},"enabled":{"type":"boolean"},"operations":{"readOnly":true,"type":"array","items":{"type":"string"}},"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"allow":{"readOnly":true,"type":"array","items":{"type":"string"}},"deny":{"readOnly":true,"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"required":["option"],"additionalProperties":false}},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"operatedByCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"operatorName":{"type":["string","null"]},"publishedOfferings":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slugId","connectorId","serviceInterface","contextType","contextId","name","enabled","capabilities","createdAt","updatedAt"],"additionalProperties":false}},"onRequest":{"default":[],"type":"array","items":{"type":"string"}},"granted":{"default":[],"type":"array","items":{"type":"string"}},"canManageCustomerAccess":{"default":false,"type":"boolean"},"inheritedFrom":{"type":"object","properties":{"contextType":{"type":"string","const":"organization"},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["contextType","contextId"],"additionalProperties":false},"updatedAt":{"type":"string"}},"required":["contextType","contextId","policy","effective","candidates","onRequest","granted","canManageCustomerAccess"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/connector-policies/customer-defaults":{"put":{"description":"Organization context only. Providers listed in `onRequest` are shown only to the customers they are granted to; every other provider is offered to all customers. Writable by the organization itself or the platform root user.","summary":"Choose which of an organization's providers every customer gets","tags":["providerPolicies"],"parameters":[{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"onRequest":{"default":[],"type":"array","items":{"type":"string","minLength":1}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"policy":{"type":"object","properties":{"mode":{"default":"inherit","type":"string","enum":["inherit","allowlist"]},"allowed":{"default":[],"type":"array","items":{"type":"string","minLength":1}}},"required":["mode","allowed"],"additionalProperties":false},"effective":{"type":"array","items":{"type":"string"}},"candidates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"connectorId":{"type":"string"},"serviceInterface":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"enabled":{"type":"boolean"},"capabilities":{"type":"array","items":{"type":"object","properties":{"option":{"type":"string"},"enabled":{"type":"boolean"},"operations":{"readOnly":true,"type":"array","items":{"type":"string"}},"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"allow":{"readOnly":true,"type":"array","items":{"type":"string"}},"deny":{"readOnly":true,"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"required":["option"],"additionalProperties":false}},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"operatedByCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"operatorName":{"type":["string","null"]},"publishedOfferings":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slugId","connectorId","serviceInterface","contextType","contextId","name","enabled","capabilities","createdAt","updatedAt"],"additionalProperties":false}},"onRequest":{"default":[],"type":"array","items":{"type":"string"}},"granted":{"default":[],"type":"array","items":{"type":"string"}},"canManageCustomerAccess":{"default":false,"type":"boolean"},"inheritedFrom":{"type":"object","properties":{"contextType":{"type":"string","const":"organization"},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["contextType","contextId"],"additionalProperties":false},"updatedAt":{"type":"string"}},"required":["contextType","contextId","policy","effective","candidates","onRequest","granted","canManageCustomerAccess"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/connector-policies/grants":{"put":{"description":"Customer context only. Replaces the customer's grants; every slug must be one of its organization's on-request providers. Writable by the customer's organization or the platform root user, never by the customer itself.","summary":"Grant a customer providers its organization offers on request","tags":["providerPolicies"],"parameters":[{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","customer"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"granted":{"default":[],"type":"array","items":{"type":"string","minLength":1}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"policy":{"type":"object","properties":{"mode":{"default":"inherit","type":"string","enum":["inherit","allowlist"]},"allowed":{"default":[],"type":"array","items":{"type":"string","minLength":1}}},"required":["mode","allowed"],"additionalProperties":false},"effective":{"type":"array","items":{"type":"string"}},"candidates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"connectorId":{"type":"string"},"serviceInterface":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"enabled":{"type":"boolean"},"capabilities":{"type":"array","items":{"type":"object","properties":{"option":{"type":"string"},"enabled":{"type":"boolean"},"operations":{"readOnly":true,"type":"array","items":{"type":"string"}},"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"allow":{"readOnly":true,"type":"array","items":{"type":"string"}},"deny":{"readOnly":true,"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"required":["option"],"additionalProperties":false}},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"operatedByCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"operatorName":{"type":["string","null"]},"publishedOfferings":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slugId","connectorId","serviceInterface","contextType","contextId","name","enabled","capabilities","createdAt","updatedAt"],"additionalProperties":false}},"onRequest":{"default":[],"type":"array","items":{"type":"string"}},"granted":{"default":[],"type":"array","items":{"type":"string"}},"canManageCustomerAccess":{"default":false,"type":"boolean"},"inheritedFrom":{"type":"object","properties":{"contextType":{"type":"string","const":"organization"},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["contextType","contextId"],"additionalProperties":false},"updatedAt":{"type":"string"}},"required":["contextType","contextId","policy","effective","candidates","onRequest","granted","canManageCustomerAccess"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/provider-offerings/operated-providers":{"get":{"summary":"The providers the caller's Payment Provider customer operates — what it can set up offerings for","tags":["providerOfferings"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slugId":{"type":"string"},"name":{"type":"string"},"connectorId":{"type":"string"},"enabled":{"type":"boolean"}},"required":["id","slugId","name","connectorId","enabled"],"additionalProperties":false}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/provider-offerings":{"get":{"summary":"List the offerings this organization publishes","tags":["providerOfferings"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"customerId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"page","in":"query","schema":{"default":1,"type":"number","minimum":1}},{"name":"limit","in":"query","schema":{"default":100,"type":"number","minimum":1}},{"name":"dateRange","in":"query","style":"deepObject","schema":{"type":"object","properties":{"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}}}},{"name":"refresh","in":"query","schema":{"type":"boolean"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["name","slugId","status","visibility","approvalMode","fulfilmentMode"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","PUBLISHED","ARCHIVED"]},"visibility":{"type":"string","enum":["INSTANCE","INVITE","FEDERATED"]},"approvalMode":{"type":"string","enum":["MANUAL","AUTO"]},"autoApprove":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"operator":{"default":"in","type":"string","enum":["in","notIn","lte","gte"]},"values":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["field","operator","values"],"additionalProperties":false}},"inviteCode":{"type":["string","null"]},"form":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","textarea","email","url","number","select","checkbox"]},"required":{"default":false,"type":"boolean"},"options":{"type":"array","items":{"type":"string","minLength":1}},"help":{"type":"string"}},"required":["name","label","type","required"],"additionalProperties":false}},"terms":{"type":["string","null"]},"termsVersion":{"type":["string","null"]},"pricing":{"anyOf":[{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}}},"required":["inputs","rules"],"additionalProperties":false},{"type":"null"}]},"template":{"type":"object","properties":{"customerStatus":{"default":"ACTIVE","type":"string","enum":["ACTIVE","ONBOARDING"]},"approverIsAccountManager":{"default":false,"type":"boolean"}},"required":["customerStatus","approverIsAccountManager"],"additionalProperties":false},"federatedOrigins":{"type":"array","items":{"type":"string","format":"uri"}},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"providerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"connectorId":{"type":["string","null"]},"operatedByCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"operatorName":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","slugId","name","status","visibility","approvalMode","autoApprove","form","template","federatedOrigins","fulfilmentMode","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"},"total":{"type":"number"}},"required":["page","pageSize","hasMore"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"post":{"summary":"Create an offering (as a draft)","tags":["providerOfferings"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}}},{"type":"null"}]},"visibility":{"default":"INSTANCE","type":"string","enum":["INSTANCE","INVITE","FEDERATED"]},"approvalMode":{"default":"MANUAL","type":"string","enum":["MANUAL","AUTO"]},"autoApprove":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"operator":{"default":"in","type":"string","enum":["in","notIn","lte","gte"]},"values":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["field","values"]}},"form":{"default":[],"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","textarea","email","url","number","select","checkbox"]},"required":{"default":false,"type":"boolean"},"options":{"type":"array","items":{"type":"string","minLength":1}},"help":{"type":"string"}},"required":["name","label","type"]}},"terms":{"type":["string","null"]},"pricing":{"anyOf":[{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}}}},"required":["id","label"]}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"]}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"]}}},"required":["inputs","rules"]},{"type":"null"}]},"template":{"default":{"customerStatus":"ACTIVE","approverIsAccountManager":false},"type":"object","properties":{"customerStatus":{"default":"ACTIVE","type":"string","enum":["ACTIVE","ONBOARDING"]},"approverIsAccountManager":{"default":false,"type":"boolean"}}},"federatedOrigins":{"default":[],"type":"array","items":{"type":"string","format":"uri"}},"fulfilmentMode":{"default":"BABELPAY_LINK","type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"providerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"connectorId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"operatedByCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["slugId","name"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","PUBLISHED","ARCHIVED"]},"visibility":{"type":"string","enum":["INSTANCE","INVITE","FEDERATED"]},"approvalMode":{"type":"string","enum":["MANUAL","AUTO"]},"autoApprove":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"operator":{"default":"in","type":"string","enum":["in","notIn","lte","gte"]},"values":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["field","operator","values"],"additionalProperties":false}},"inviteCode":{"type":["string","null"]},"form":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","textarea","email","url","number","select","checkbox"]},"required":{"default":false,"type":"boolean"},"options":{"type":"array","items":{"type":"string","minLength":1}},"help":{"type":"string"}},"required":["name","label","type","required"],"additionalProperties":false}},"terms":{"type":["string","null"]},"termsVersion":{"type":["string","null"]},"pricing":{"anyOf":[{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}}},"required":["inputs","rules"],"additionalProperties":false},{"type":"null"}]},"template":{"type":"object","properties":{"customerStatus":{"default":"ACTIVE","type":"string","enum":["ACTIVE","ONBOARDING"]},"approverIsAccountManager":{"default":false,"type":"boolean"}},"required":["customerStatus","approverIsAccountManager"],"additionalProperties":false},"federatedOrigins":{"type":"array","items":{"type":"string","format":"uri"}},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"providerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"connectorId":{"type":["string","null"]},"operatedByCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"operatorName":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","slugId","name","status","visibility","approvalMode","autoApprove","form","template","federatedOrigins","fulfilmentMode","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/provider-offerings/{id}":{"get":{"summary":"Get one of this organization's offerings","tags":["providerOfferings"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","PUBLISHED","ARCHIVED"]},"visibility":{"type":"string","enum":["INSTANCE","INVITE","FEDERATED"]},"approvalMode":{"type":"string","enum":["MANUAL","AUTO"]},"autoApprove":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"operator":{"default":"in","type":"string","enum":["in","notIn","lte","gte"]},"values":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["field","operator","values"],"additionalProperties":false}},"inviteCode":{"type":["string","null"]},"form":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","textarea","email","url","number","select","checkbox"]},"required":{"default":false,"type":"boolean"},"options":{"type":"array","items":{"type":"string","minLength":1}},"help":{"type":"string"}},"required":["name","label","type","required"],"additionalProperties":false}},"terms":{"type":["string","null"]},"termsVersion":{"type":["string","null"]},"pricing":{"anyOf":[{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}}},"required":["inputs","rules"],"additionalProperties":false},{"type":"null"}]},"template":{"type":"object","properties":{"customerStatus":{"default":"ACTIVE","type":"string","enum":["ACTIVE","ONBOARDING"]},"approverIsAccountManager":{"default":false,"type":"boolean"}},"required":["customerStatus","approverIsAccountManager"],"additionalProperties":false},"federatedOrigins":{"type":"array","items":{"type":"string","format":"uri"}},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"providerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"connectorId":{"type":["string","null"]},"operatedByCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"operatorName":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","slugId","name","status","visibility","approvalMode","autoApprove","form","template","federatedOrigins","fulfilmentMode","createdAt","updatedAt"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"patch":{"summary":"Change an offering","tags":["providerOfferings"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}}},{"type":"null"}]},"visibility":{"default":"INSTANCE","type":"string","enum":["INSTANCE","INVITE","FEDERATED"]},"approvalMode":{"default":"MANUAL","type":"string","enum":["MANUAL","AUTO"]},"autoApprove":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"operator":{"default":"in","type":"string","enum":["in","notIn","lte","gte"]},"values":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["field","values"]}},"form":{"default":[],"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","textarea","email","url","number","select","checkbox"]},"required":{"default":false,"type":"boolean"},"options":{"type":"array","items":{"type":"string","minLength":1}},"help":{"type":"string"}},"required":["name","label","type"]}},"terms":{"type":["string","null"]},"pricing":{"anyOf":[{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}}}},"required":["id","label"]}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"]}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"]}}},"required":["inputs","rules"]},{"type":"null"}]},"template":{"default":{"customerStatus":"ACTIVE","approverIsAccountManager":false},"type":"object","properties":{"customerStatus":{"default":"ACTIVE","type":"string","enum":["ACTIVE","ONBOARDING"]},"approverIsAccountManager":{"default":false,"type":"boolean"}}},"federatedOrigins":{"default":[],"type":"array","items":{"type":"string","format":"uri"}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","PUBLISHED","ARCHIVED"]},"visibility":{"type":"string","enum":["INSTANCE","INVITE","FEDERATED"]},"approvalMode":{"type":"string","enum":["MANUAL","AUTO"]},"autoApprove":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"operator":{"default":"in","type":"string","enum":["in","notIn","lte","gte"]},"values":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["field","operator","values"],"additionalProperties":false}},"inviteCode":{"type":["string","null"]},"form":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","textarea","email","url","number","select","checkbox"]},"required":{"default":false,"type":"boolean"},"options":{"type":"array","items":{"type":"string","minLength":1}},"help":{"type":"string"}},"required":["name","label","type","required"],"additionalProperties":false}},"terms":{"type":["string","null"]},"termsVersion":{"type":["string","null"]},"pricing":{"anyOf":[{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}}},"required":["inputs","rules"],"additionalProperties":false},{"type":"null"}]},"template":{"type":"object","properties":{"customerStatus":{"default":"ACTIVE","type":"string","enum":["ACTIVE","ONBOARDING"]},"approverIsAccountManager":{"default":false,"type":"boolean"}},"required":["customerStatus","approverIsAccountManager"],"additionalProperties":false},"federatedOrigins":{"type":"array","items":{"type":"string","format":"uri"}},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"providerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"connectorId":{"type":["string","null"]},"operatedByCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"operatorName":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","slugId","name","status","visibility","approvalMode","autoApprove","form","template","federatedOrigins","fulfilmentMode","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete an offering nobody has applied to","tags":["providerOfferings"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"204":{"description":"204","content":{"application/json":{"schema":{}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/provider-offerings/{id}/publish":{"post":{"summary":"Publish an offering so it can be applied to","tags":["providerOfferings"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","PUBLISHED","ARCHIVED"]},"visibility":{"type":"string","enum":["INSTANCE","INVITE","FEDERATED"]},"approvalMode":{"type":"string","enum":["MANUAL","AUTO"]},"autoApprove":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"operator":{"default":"in","type":"string","enum":["in","notIn","lte","gte"]},"values":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["field","operator","values"],"additionalProperties":false}},"inviteCode":{"type":["string","null"]},"form":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","textarea","email","url","number","select","checkbox"]},"required":{"default":false,"type":"boolean"},"options":{"type":"array","items":{"type":"string","minLength":1}},"help":{"type":"string"}},"required":["name","label","type","required"],"additionalProperties":false}},"terms":{"type":["string","null"]},"termsVersion":{"type":["string","null"]},"pricing":{"anyOf":[{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}}},"required":["inputs","rules"],"additionalProperties":false},{"type":"null"}]},"template":{"type":"object","properties":{"customerStatus":{"default":"ACTIVE","type":"string","enum":["ACTIVE","ONBOARDING"]},"approverIsAccountManager":{"default":false,"type":"boolean"}},"required":["customerStatus","approverIsAccountManager"],"additionalProperties":false},"federatedOrigins":{"type":"array","items":{"type":"string","format":"uri"}},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"providerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"connectorId":{"type":["string","null"]},"operatedByCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"operatorName":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","slugId","name","status","visibility","approvalMode","autoApprove","form","template","federatedOrigins","fulfilmentMode","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/provider-offerings/{id}/archive":{"post":{"summary":"Stop taking applications; existing links are untouched","tags":["providerOfferings"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","PUBLISHED","ARCHIVED"]},"visibility":{"type":"string","enum":["INSTANCE","INVITE","FEDERATED"]},"approvalMode":{"type":"string","enum":["MANUAL","AUTO"]},"autoApprove":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"operator":{"default":"in","type":"string","enum":["in","notIn","lte","gte"]},"values":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["field","operator","values"],"additionalProperties":false}},"inviteCode":{"type":["string","null"]},"form":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","textarea","email","url","number","select","checkbox"]},"required":{"default":false,"type":"boolean"},"options":{"type":"array","items":{"type":"string","minLength":1}},"help":{"type":"string"}},"required":["name","label","type","required"],"additionalProperties":false}},"terms":{"type":["string","null"]},"termsVersion":{"type":["string","null"]},"pricing":{"anyOf":[{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}}},"required":["inputs","rules"],"additionalProperties":false},{"type":"null"}]},"template":{"type":"object","properties":{"customerStatus":{"default":"ACTIVE","type":"string","enum":["ACTIVE","ONBOARDING"]},"approverIsAccountManager":{"default":false,"type":"boolean"}},"required":["customerStatus","approverIsAccountManager"],"additionalProperties":false},"federatedOrigins":{"type":"array","items":{"type":"string","format":"uri"}},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"providerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"connectorId":{"type":["string","null"]},"operatedByCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"operatorName":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","slugId","name","status","visibility","approvalMode","autoApprove","form","template","federatedOrigins","fulfilmentMode","createdAt","updatedAt"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/provider-offerings/{id}/invite-code":{"post":{"summary":"Issue a new invite code; the old one stops working","tags":["providerOfferings"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","PUBLISHED","ARCHIVED"]},"visibility":{"type":"string","enum":["INSTANCE","INVITE","FEDERATED"]},"approvalMode":{"type":"string","enum":["MANUAL","AUTO"]},"autoApprove":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"operator":{"default":"in","type":"string","enum":["in","notIn","lte","gte"]},"values":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["field","operator","values"],"additionalProperties":false}},"inviteCode":{"type":["string","null"]},"form":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","textarea","email","url","number","select","checkbox"]},"required":{"default":false,"type":"boolean"},"options":{"type":"array","items":{"type":"string","minLength":1}},"help":{"type":"string"}},"required":["name","label","type","required"],"additionalProperties":false}},"terms":{"type":["string","null"]},"termsVersion":{"type":["string","null"]},"pricing":{"anyOf":[{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}}},"required":["inputs","rules"],"additionalProperties":false},{"type":"null"}]},"template":{"type":"object","properties":{"customerStatus":{"default":"ACTIVE","type":"string","enum":["ACTIVE","ONBOARDING"]},"approverIsAccountManager":{"default":false,"type":"boolean"}},"required":["customerStatus","approverIsAccountManager"],"additionalProperties":false},"federatedOrigins":{"type":"array","items":{"type":"string","format":"uri"}},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"providerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"connectorId":{"type":["string","null"]},"operatedByCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"operatorName":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","slugId","name","status","visibility","approvalMode","autoApprove","form","template","federatedOrigins","fulfilmentMode","createdAt","updatedAt"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/offering-directory":{"get":{"summary":"Offerings on this instance an organization can add to its catalog","tags":["providerOfferings"],"parameters":[{"name":"contextType","in":"query","schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"name":{"type":"string"},"description":{"type":["string","null"]},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"providerOrganizationName":{"type":"string"},"addedAs":{"type":["string","null"]}},"required":["id","slugId","name","providerOrganizationName"],"additionalProperties":false}}}}}}},"post":{"summary":"Add an offering to this organization's providers","tags":["providerOfferings"],"parameters":[{"name":"contextType","in":"query","schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"inviteCode":{"type":"string","minLength":6},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"connectorId":{"type":"string"},"serviceInterface":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"enabled":{"type":"boolean"},"capabilities":{"type":"array","items":{"type":"object","properties":{"option":{"type":"string"},"enabled":{"type":"boolean"},"operations":{"readOnly":true,"type":"array","items":{"type":"string"}},"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"allow":{"readOnly":true,"type":"array","items":{"type":"string"}},"deny":{"readOnly":true,"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"required":["option"],"additionalProperties":false}},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"operatedByCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"operatorName":{"type":["string","null"]},"publishedOfferings":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slugId","connectorId","serviceInterface","contextType","contextId","name","enabled","capabilities","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/offering-directory/remote":{"post":{"summary":"Add an offering from another BabelPay platform by its link","tags":["providerOfferings"],"parameters":[{"name":"contextType","in":"query","schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"inviteCode":{"type":"string"},"slugId":{"type":"string"}},"required":["url"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"connectorId":{"type":"string"},"serviceInterface":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"enabled":{"type":"boolean"},"capabilities":{"type":"array","items":{"type":"object","properties":{"option":{"type":"string"},"enabled":{"type":"boolean"},"operations":{"readOnly":true,"type":"array","items":{"type":"string"}},"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"allow":{"readOnly":true,"type":"array","items":{"type":"string"}},"deny":{"readOnly":true,"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"required":["option"],"additionalProperties":false}},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"operatedByCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"operatorName":{"type":["string","null"]},"publishedOfferings":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slugId","connectorId","serviceInterface","contextType","contextId","name","enabled","capabilities","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/apply-form":{"get":{"summary":"What the apply dialog shows for one provider","tags":["accountApplications"],"parameters":[{"name":"providerSlug","in":"query","required":true,"schema":{"type":"string"}},{"name":"offeringId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"contextType","in":"query","schema":{"type":"string","enum":["organization","customer"]}},{"name":"contextId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"choices":{"type":"array","items":{"type":"object","properties":{"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"type":["string","null"]},"pricing":{"anyOf":[{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}}},"required":["inputs","rules"],"additionalProperties":false},{"type":"null"}]}},"required":["offeringId","name"],"additionalProperties":false}},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"providerOrganizationName":{"type":"string"},"description":{"type":["string","null"]},"branding":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"supportUrl":{"type":"string","format":"uri"},"statementDescriptor":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"terms":{"type":["string","null"]},"termsVersion":{"type":["string","null"]},"pricing":{"anyOf":[{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"field":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date","select","multiselect","regex","function","list"]},"enumName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"caseSensitive":{"type":"boolean"},"functionName":{"type":"string"},"functionParams":{"type":"array","items":{"type":"string"}},"validation":{"type":"object","properties":{"required":{"type":"boolean"},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}},"required":["value"],"additionalProperties":false}]}},"outputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","inputs","outputs"],"additionalProperties":false}}},"required":["inputs","rules"],"additionalProperties":false},{"type":"null"}]},"form":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","textarea","email","url","number","select","checkbox"]},"required":{"default":false,"type":"boolean"},"options":{"type":"array","items":{"type":"string","minLength":1}},"help":{"type":"string"}},"required":["name","label","type","required"],"additionalProperties":false}},"prefill":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"additionalProperties":false},"mode":{"type":"string","enum":["live","test"]},"suggestedAccountName":{"type":"string"},"canShareLegalEntity":{"type":"boolean"},"followUp":{"anyOf":[{"type":"object","properties":{"fromApplicationId":{"type":"string"},"termsChanged":{"type":"boolean"},"missingQuestions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","textarea","email","url","number","select","checkbox"]},"required":{"default":false,"type":"boolean"},"options":{"type":"array","items":{"type":"string","minLength":1}},"help":{"type":"string"}},"required":["name","label","type","required"],"additionalProperties":false}},"existingAccounts":{"type":"array","items":{"type":"string"}}},"required":["fromApplicationId","termsChanged","missingQuestions","existingAccounts"],"additionalProperties":false},{"type":"null"}]}},"required":["offeringId","offeringName","providerOrganizationName","form","prefill","suggestedAccountName"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/account-applications":{"post":{"summary":"Apply for an account at a provider","tags":["accountApplications"],"parameters":[{"name":"contextType","in":"query","schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"providerSlug":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accountName":{"type":"string","minLength":1,"maxLength":80},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}}},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"]},"answers":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"acceptTerms":{"type":"boolean"},"consentToShare":{"type":"boolean"},"shareLegalEntity":{"type":"boolean"}},"required":["providerSlug","accountName"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"accountSlug":{"type":["string","null"]},"providerOrganizationName":{"type":"string"},"providerSlug":{"type":["string","null"]},"applicantContextType":{"type":"string","enum":["organization","partner","customer"]},"applicantContextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"sharesLegalEntity":{"type":"boolean"},"connectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"decisionNote":{"type":["string","null"]},"becameDefaultRoute":{"type":"boolean"},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","providerOrganizationName","applicantContextType","applicantContextId","snapshot","answers","becameDefaultRoute","events","submittedAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"get":{"summary":"Applications to this organization's offerings","tags":["accountApplications"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"customerId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"page","in":"query","schema":{"default":1,"type":"number","minimum":1}},{"name":"limit","in":"query","schema":{"default":100,"type":"number","minimum":1}},{"name":"dateRange","in":"query","style":"deepObject","schema":{"type":"object","properties":{"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}}}},{"name":"refresh","in":"query","schema":{"type":"boolean"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["status","offeringName","accountName","applicantName","countryCode","regNo","submittedAt"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"mode":{"type":"string","enum":["live","test"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"applicantName":{"type":"string"},"applicantOrigin":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"regNo":{"type":["string","null"]}},"required":["id","status","offeringId","offeringName","accountName","applicantName","submittedAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"},"total":{"type":"number"}},"required":["page","pageSize","hasMore"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/mine":{"get":{"summary":"This context's applications and links","tags":["accountApplications"],"parameters":[{"name":"contextType","in":"query","schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"accountSlug":{"type":["string","null"]},"providerOrganizationName":{"type":"string"},"providerSlug":{"type":["string","null"]},"applicantContextType":{"type":"string","enum":["organization","partner","customer"]},"applicantContextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"sharesLegalEntity":{"type":"boolean"},"connectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"decisionNote":{"type":["string","null"]},"becameDefaultRoute":{"type":"boolean"},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","providerOrganizationName","applicantContextType","applicantContextId","snapshot","answers","becameDefaultRoute","events","submittedAt","updatedAt"],"additionalProperties":false}}}}}}}},"/api/v1/account-applications/pending-count":{"get":{"summary":"How many applications wait for this organization to act — the nav badge","tags":["accountApplications"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"}},"required":["count"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/mine/{id}":{"get":{"summary":"One of this context's applications","tags":["accountApplications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"contextType","in":"query","schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"accountSlug":{"type":["string","null"]},"providerOrganizationName":{"type":"string"},"providerSlug":{"type":["string","null"]},"applicantContextType":{"type":"string","enum":["organization","partner","customer"]},"applicantContextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"sharesLegalEntity":{"type":"boolean"},"connectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"decisionNote":{"type":["string","null"]},"becameDefaultRoute":{"type":"boolean"},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","providerOrganizationName","applicantContextType","applicantContextId","snapshot","answers","becameDefaultRoute","events","submittedAt","updatedAt"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/mine/{id}/respond":{"post":{"summary":"Answer the provider's request for information","tags":["accountApplications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"contextType","in":"query","schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":5000},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}}},"required":["message"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"accountSlug":{"type":["string","null"]},"providerOrganizationName":{"type":"string"},"providerSlug":{"type":["string","null"]},"applicantContextType":{"type":"string","enum":["organization","partner","customer"]},"applicantContextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"sharesLegalEntity":{"type":"boolean"},"connectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"decisionNote":{"type":["string","null"]},"becameDefaultRoute":{"type":"boolean"},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","providerOrganizationName","applicantContextType","applicantContextId","snapshot","answers","becameDefaultRoute","events","submittedAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/mine/{id}/withdraw":{"post":{"summary":"Withdraw an application still under review","tags":["accountApplications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"contextType","in":"query","schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"accountSlug":{"type":["string","null"]},"providerOrganizationName":{"type":"string"},"providerSlug":{"type":["string","null"]},"applicantContextType":{"type":"string","enum":["organization","partner","customer"]},"applicantContextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"sharesLegalEntity":{"type":"boolean"},"connectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"decisionNote":{"type":["string","null"]},"becameDefaultRoute":{"type":"boolean"},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","providerOrganizationName","applicantContextType","applicantContextId","snapshot","answers","becameDefaultRoute","events","submittedAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/mine/{id}/disconnect":{"post":{"summary":"Close the account at the provider and remove the connection","tags":["accountApplications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"contextType","in":"query","schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"},"force":{"type":"boolean"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"accountSlug":{"type":["string","null"]},"providerOrganizationName":{"type":"string"},"providerSlug":{"type":["string","null"]},"applicantContextType":{"type":"string","enum":["organization","partner","customer"]},"applicantContextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"sharesLegalEntity":{"type":"boolean"},"connectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"decisionNote":{"type":["string","null"]},"becameDefaultRoute":{"type":"boolean"},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","providerOrganizationName","applicantContextType","applicantContextId","snapshot","answers","becameDefaultRoute","events","submittedAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"openTransactions":{"type":"number"},"recentTransactions":{"type":"number"}},"required":["message","openTransactions","recentTransactions"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/mine/{id}/messages":{"post":{"summary":"Write to the provider","tags":["accountApplications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"contextType","in":"query","schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":5000}},"required":["message"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"accountSlug":{"type":["string","null"]},"providerOrganizationName":{"type":"string"},"providerSlug":{"type":["string","null"]},"applicantContextType":{"type":"string","enum":["organization","partner","customer"]},"applicantContextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"sharesLegalEntity":{"type":"boolean"},"connectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"decisionNote":{"type":["string","null"]},"becameDefaultRoute":{"type":"boolean"},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","providerOrganizationName","applicantContextType","applicantContextId","snapshot","answers","becameDefaultRoute","events","submittedAt","updatedAt"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/mine/{id}/rotate":{"post":{"summary":"Replace the account's credentials","tags":["accountApplications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"contextType","in":"query","schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"contextId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"accountSlug":{"type":["string","null"]},"providerOrganizationName":{"type":"string"},"providerSlug":{"type":["string","null"]},"applicantContextType":{"type":"string","enum":["organization","partner","customer"]},"applicantContextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"sharesLegalEntity":{"type":"boolean"},"connectionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"decisionNote":{"type":["string","null"]},"becameDefaultRoute":{"type":"boolean"},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","providerOrganizationName","applicantContextType","applicantContextId","snapshot","answers","becameDefaultRoute","events","submittedAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/{id}":{"get":{"summary":"One application, as its reviewer sees it","tags":["accountApplications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"applicantName":{"type":"string"},"applicantOrigin":{"type":["string","null"]},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"termsVersion":{"type":["string","null"]},"termsAcceptedAt":{"type":["string","null"]},"provisioned":{"type":"object","properties":{"attachToCustomerId":{"type":"string"},"customerId":{"type":"string"},"applicationId":{"type":"string"},"appSlugId":{"type":"string"},"apiKeyId":{"type":"string"},"connectionId":{"type":"string"},"becameDefaultRoute":{"type":"boolean"},"sharedLegalEntity":{"type":"boolean"},"steps":{"default":[],"type":"array","items":{"type":"object","properties":{"step":{"type":"string"},"ok":{"type":"boolean"},"detail":{"type":"string"},"at":{"type":"string"}},"required":["step","ok","at"],"additionalProperties":false}}},"required":["steps"],"additionalProperties":false},"possibleDuplicates":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"legalName":{"type":"string"},"regNo":{"type":["string","null"]},"vatNo":{"type":["string","null"]},"matchedOn":{"type":"array","items":{"type":"string","enum":["regNo","vatNo","legalName"]}}},"required":["customerId","legalName","matchedOn"],"additionalProperties":false}},"existingCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sharesLegalEntity":{"type":"boolean"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"decisionNote":{"type":["string","null"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"connectorId":{"type":["string","null"]},"credentialKeysSet":{"type":"array","items":{"type":"string"}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","applicantName","snapshot","answers","provisioned","possibleDuplicates","events","submittedAt","updatedAt"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/{id}/start-review":{"post":{"summary":"Mark an application as being reviewed","tags":["accountApplications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"applicantName":{"type":"string"},"applicantOrigin":{"type":["string","null"]},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"termsVersion":{"type":["string","null"]},"termsAcceptedAt":{"type":["string","null"]},"provisioned":{"type":"object","properties":{"attachToCustomerId":{"type":"string"},"customerId":{"type":"string"},"applicationId":{"type":"string"},"appSlugId":{"type":"string"},"apiKeyId":{"type":"string"},"connectionId":{"type":"string"},"becameDefaultRoute":{"type":"boolean"},"sharedLegalEntity":{"type":"boolean"},"steps":{"default":[],"type":"array","items":{"type":"object","properties":{"step":{"type":"string"},"ok":{"type":"boolean"},"detail":{"type":"string"},"at":{"type":"string"}},"required":["step","ok","at"],"additionalProperties":false}}},"required":["steps"],"additionalProperties":false},"possibleDuplicates":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"legalName":{"type":"string"},"regNo":{"type":["string","null"]},"vatNo":{"type":["string","null"]},"matchedOn":{"type":"array","items":{"type":"string","enum":["regNo","vatNo","legalName"]}}},"required":["customerId","legalName","matchedOn"],"additionalProperties":false}},"existingCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sharesLegalEntity":{"type":"boolean"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"decisionNote":{"type":["string","null"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"connectorId":{"type":["string","null"]},"credentialKeysSet":{"type":"array","items":{"type":"string"}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","applicantName","snapshot","answers","provisioned","possibleDuplicates","events","submittedAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/{id}/request-info":{"post":{"summary":"Ask the applicant for more information","tags":["accountApplications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":5000}},"required":["message"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"applicantName":{"type":"string"},"applicantOrigin":{"type":["string","null"]},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"termsVersion":{"type":["string","null"]},"termsAcceptedAt":{"type":["string","null"]},"provisioned":{"type":"object","properties":{"attachToCustomerId":{"type":"string"},"customerId":{"type":"string"},"applicationId":{"type":"string"},"appSlugId":{"type":"string"},"apiKeyId":{"type":"string"},"connectionId":{"type":"string"},"becameDefaultRoute":{"type":"boolean"},"sharedLegalEntity":{"type":"boolean"},"steps":{"default":[],"type":"array","items":{"type":"object","properties":{"step":{"type":"string"},"ok":{"type":"boolean"},"detail":{"type":"string"},"at":{"type":"string"}},"required":["step","ok","at"],"additionalProperties":false}}},"required":["steps"],"additionalProperties":false},"possibleDuplicates":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"legalName":{"type":"string"},"regNo":{"type":["string","null"]},"vatNo":{"type":["string","null"]},"matchedOn":{"type":"array","items":{"type":"string","enum":["regNo","vatNo","legalName"]}}},"required":["customerId","legalName","matchedOn"],"additionalProperties":false}},"existingCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sharesLegalEntity":{"type":"boolean"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"decisionNote":{"type":["string","null"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"connectorId":{"type":["string","null"]},"credentialKeysSet":{"type":"array","items":{"type":"string"}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","applicantName","snapshot","answers","provisioned","possibleDuplicates","events","submittedAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/{id}/approve":{"post":{"summary":"Approve and provision the account","tags":["accountApplications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"},"attachToCustomerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"credentials":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"applicantName":{"type":"string"},"applicantOrigin":{"type":["string","null"]},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"termsVersion":{"type":["string","null"]},"termsAcceptedAt":{"type":["string","null"]},"provisioned":{"type":"object","properties":{"attachToCustomerId":{"type":"string"},"customerId":{"type":"string"},"applicationId":{"type":"string"},"appSlugId":{"type":"string"},"apiKeyId":{"type":"string"},"connectionId":{"type":"string"},"becameDefaultRoute":{"type":"boolean"},"sharedLegalEntity":{"type":"boolean"},"steps":{"default":[],"type":"array","items":{"type":"object","properties":{"step":{"type":"string"},"ok":{"type":"boolean"},"detail":{"type":"string"},"at":{"type":"string"}},"required":["step","ok","at"],"additionalProperties":false}}},"required":["steps"],"additionalProperties":false},"possibleDuplicates":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"legalName":{"type":"string"},"regNo":{"type":["string","null"]},"vatNo":{"type":["string","null"]},"matchedOn":{"type":"array","items":{"type":"string","enum":["regNo","vatNo","legalName"]}}},"required":["customerId","legalName","matchedOn"],"additionalProperties":false}},"existingCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sharesLegalEntity":{"type":"boolean"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"decisionNote":{"type":["string","null"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"connectorId":{"type":["string","null"]},"credentialKeysSet":{"type":"array","items":{"type":"string"}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","applicantName","snapshot","answers","provisioned","possibleDuplicates","events","submittedAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/{id}/reject":{"post":{"summary":"Reject an application","tags":["accountApplications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1}},"required":["reason"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"applicantName":{"type":"string"},"applicantOrigin":{"type":["string","null"]},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"termsVersion":{"type":["string","null"]},"termsAcceptedAt":{"type":["string","null"]},"provisioned":{"type":"object","properties":{"attachToCustomerId":{"type":"string"},"customerId":{"type":"string"},"applicationId":{"type":"string"},"appSlugId":{"type":"string"},"apiKeyId":{"type":"string"},"connectionId":{"type":"string"},"becameDefaultRoute":{"type":"boolean"},"sharedLegalEntity":{"type":"boolean"},"steps":{"default":[],"type":"array","items":{"type":"object","properties":{"step":{"type":"string"},"ok":{"type":"boolean"},"detail":{"type":"string"},"at":{"type":"string"}},"required":["step","ok","at"],"additionalProperties":false}}},"required":["steps"],"additionalProperties":false},"possibleDuplicates":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"legalName":{"type":"string"},"regNo":{"type":["string","null"]},"vatNo":{"type":["string","null"]},"matchedOn":{"type":"array","items":{"type":"string","enum":["regNo","vatNo","legalName"]}}},"required":["customerId","legalName","matchedOn"],"additionalProperties":false}},"existingCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sharesLegalEntity":{"type":"boolean"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"decisionNote":{"type":["string","null"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"connectorId":{"type":["string","null"]},"credentialKeysSet":{"type":"array","items":{"type":"string"}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","applicantName","snapshot","answers","provisioned","possibleDuplicates","events","submittedAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/{id}/retry-provisioning":{"post":{"summary":"Run the remaining provisioning steps again","tags":["accountApplications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"credentials":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"applicantName":{"type":"string"},"applicantOrigin":{"type":["string","null"]},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"termsVersion":{"type":["string","null"]},"termsAcceptedAt":{"type":["string","null"]},"provisioned":{"type":"object","properties":{"attachToCustomerId":{"type":"string"},"customerId":{"type":"string"},"applicationId":{"type":"string"},"appSlugId":{"type":"string"},"apiKeyId":{"type":"string"},"connectionId":{"type":"string"},"becameDefaultRoute":{"type":"boolean"},"sharedLegalEntity":{"type":"boolean"},"steps":{"default":[],"type":"array","items":{"type":"object","properties":{"step":{"type":"string"},"ok":{"type":"boolean"},"detail":{"type":"string"},"at":{"type":"string"}},"required":["step","ok","at"],"additionalProperties":false}}},"required":["steps"],"additionalProperties":false},"possibleDuplicates":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"legalName":{"type":"string"},"regNo":{"type":["string","null"]},"vatNo":{"type":["string","null"]},"matchedOn":{"type":"array","items":{"type":"string","enum":["regNo","vatNo","legalName"]}}},"required":["customerId","legalName","matchedOn"],"additionalProperties":false}},"existingCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sharesLegalEntity":{"type":"boolean"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"decisionNote":{"type":["string","null"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"connectorId":{"type":["string","null"]},"credentialKeysSet":{"type":"array","items":{"type":"string"}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","applicantName","snapshot","answers","provisioned","possibleDuplicates","events","submittedAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/{id}/activate":{"post":{"summary":"Activate a customer provisioned in ONBOARDING, and its link","tags":["accountApplications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"applicantName":{"type":"string"},"applicantOrigin":{"type":["string","null"]},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"termsVersion":{"type":["string","null"]},"termsAcceptedAt":{"type":["string","null"]},"provisioned":{"type":"object","properties":{"attachToCustomerId":{"type":"string"},"customerId":{"type":"string"},"applicationId":{"type":"string"},"appSlugId":{"type":"string"},"apiKeyId":{"type":"string"},"connectionId":{"type":"string"},"becameDefaultRoute":{"type":"boolean"},"sharedLegalEntity":{"type":"boolean"},"steps":{"default":[],"type":"array","items":{"type":"object","properties":{"step":{"type":"string"},"ok":{"type":"boolean"},"detail":{"type":"string"},"at":{"type":"string"}},"required":["step","ok","at"],"additionalProperties":false}}},"required":["steps"],"additionalProperties":false},"possibleDuplicates":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"legalName":{"type":"string"},"regNo":{"type":["string","null"]},"vatNo":{"type":["string","null"]},"matchedOn":{"type":"array","items":{"type":"string","enum":["regNo","vatNo","legalName"]}}},"required":["customerId","legalName","matchedOn"],"additionalProperties":false}},"existingCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sharesLegalEntity":{"type":"boolean"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"decisionNote":{"type":["string","null"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"connectorId":{"type":["string","null"]},"credentialKeysSet":{"type":"array","items":{"type":"string"}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","applicantName","snapshot","answers","provisioned","possibleDuplicates","events","submittedAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/{id}/suspend":{"post":{"summary":"Stop the link carrying traffic, keeping its credentials","tags":["accountApplications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1}},"required":["reason"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"applicantName":{"type":"string"},"applicantOrigin":{"type":["string","null"]},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"termsVersion":{"type":["string","null"]},"termsAcceptedAt":{"type":["string","null"]},"provisioned":{"type":"object","properties":{"attachToCustomerId":{"type":"string"},"customerId":{"type":"string"},"applicationId":{"type":"string"},"appSlugId":{"type":"string"},"apiKeyId":{"type":"string"},"connectionId":{"type":"string"},"becameDefaultRoute":{"type":"boolean"},"sharedLegalEntity":{"type":"boolean"},"steps":{"default":[],"type":"array","items":{"type":"object","properties":{"step":{"type":"string"},"ok":{"type":"boolean"},"detail":{"type":"string"},"at":{"type":"string"}},"required":["step","ok","at"],"additionalProperties":false}}},"required":["steps"],"additionalProperties":false},"possibleDuplicates":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"legalName":{"type":"string"},"regNo":{"type":["string","null"]},"vatNo":{"type":["string","null"]},"matchedOn":{"type":"array","items":{"type":"string","enum":["regNo","vatNo","legalName"]}}},"required":["customerId","legalName","matchedOn"],"additionalProperties":false}},"existingCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sharesLegalEntity":{"type":"boolean"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"decisionNote":{"type":["string","null"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"connectorId":{"type":["string","null"]},"credentialKeysSet":{"type":"array","items":{"type":"string"}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","applicantName","snapshot","answers","provisioned","possibleDuplicates","events","submittedAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/{id}/resume":{"post":{"summary":"Undo a suspension","tags":["accountApplications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"applicantName":{"type":"string"},"applicantOrigin":{"type":["string","null"]},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"termsVersion":{"type":["string","null"]},"termsAcceptedAt":{"type":["string","null"]},"provisioned":{"type":"object","properties":{"attachToCustomerId":{"type":"string"},"customerId":{"type":"string"},"applicationId":{"type":"string"},"appSlugId":{"type":"string"},"apiKeyId":{"type":"string"},"connectionId":{"type":"string"},"becameDefaultRoute":{"type":"boolean"},"sharedLegalEntity":{"type":"boolean"},"steps":{"default":[],"type":"array","items":{"type":"object","properties":{"step":{"type":"string"},"ok":{"type":"boolean"},"detail":{"type":"string"},"at":{"type":"string"}},"required":["step","ok","at"],"additionalProperties":false}}},"required":["steps"],"additionalProperties":false},"possibleDuplicates":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"legalName":{"type":"string"},"regNo":{"type":["string","null"]},"vatNo":{"type":["string","null"]},"matchedOn":{"type":"array","items":{"type":"string","enum":["regNo","vatNo","legalName"]}}},"required":["customerId","legalName","matchedOn"],"additionalProperties":false}},"existingCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sharesLegalEntity":{"type":"boolean"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"decisionNote":{"type":["string","null"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"connectorId":{"type":["string","null"]},"credentialKeysSet":{"type":"array","items":{"type":"string"}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","applicantName","snapshot","answers","provisioned","possibleDuplicates","events","submittedAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/{id}/terminate":{"post":{"summary":"End the link and revoke its credentials","tags":["accountApplications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"},"force":{"type":"boolean"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"applicantName":{"type":"string"},"applicantOrigin":{"type":["string","null"]},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"termsVersion":{"type":["string","null"]},"termsAcceptedAt":{"type":["string","null"]},"provisioned":{"type":"object","properties":{"attachToCustomerId":{"type":"string"},"customerId":{"type":"string"},"applicationId":{"type":"string"},"appSlugId":{"type":"string"},"apiKeyId":{"type":"string"},"connectionId":{"type":"string"},"becameDefaultRoute":{"type":"boolean"},"sharedLegalEntity":{"type":"boolean"},"steps":{"default":[],"type":"array","items":{"type":"object","properties":{"step":{"type":"string"},"ok":{"type":"boolean"},"detail":{"type":"string"},"at":{"type":"string"}},"required":["step","ok","at"],"additionalProperties":false}}},"required":["steps"],"additionalProperties":false},"possibleDuplicates":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"legalName":{"type":"string"},"regNo":{"type":["string","null"]},"vatNo":{"type":["string","null"]},"matchedOn":{"type":"array","items":{"type":"string","enum":["regNo","vatNo","legalName"]}}},"required":["customerId","legalName","matchedOn"],"additionalProperties":false}},"existingCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sharesLegalEntity":{"type":"boolean"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"decisionNote":{"type":["string","null"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"connectorId":{"type":["string","null"]},"credentialKeysSet":{"type":"array","items":{"type":"string"}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","applicantName","snapshot","answers","provisioned","possibleDuplicates","events","submittedAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"openTransactions":{"type":"number"},"recentTransactions":{"type":"number"}},"required":["message","openTransactions","recentTransactions"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/{id}/messages":{"post":{"summary":"Write to the applicant","tags":["accountApplications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":5000}},"required":["message"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"applicantName":{"type":"string"},"applicantOrigin":{"type":["string","null"]},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"termsVersion":{"type":["string","null"]},"termsAcceptedAt":{"type":["string","null"]},"provisioned":{"type":"object","properties":{"attachToCustomerId":{"type":"string"},"customerId":{"type":"string"},"applicationId":{"type":"string"},"appSlugId":{"type":"string"},"apiKeyId":{"type":"string"},"connectionId":{"type":"string"},"becameDefaultRoute":{"type":"boolean"},"sharedLegalEntity":{"type":"boolean"},"steps":{"default":[],"type":"array","items":{"type":"object","properties":{"step":{"type":"string"},"ok":{"type":"boolean"},"detail":{"type":"string"},"at":{"type":"string"}},"required":["step","ok","at"],"additionalProperties":false}}},"required":["steps"],"additionalProperties":false},"possibleDuplicates":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"legalName":{"type":"string"},"regNo":{"type":["string","null"]},"vatNo":{"type":["string","null"]},"matchedOn":{"type":"array","items":{"type":"string","enum":["regNo","vatNo","legalName"]}}},"required":["customerId","legalName","matchedOn"],"additionalProperties":false}},"existingCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sharesLegalEntity":{"type":"boolean"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"decisionNote":{"type":["string","null"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"connectorId":{"type":["string","null"]},"credentialKeysSet":{"type":"array","items":{"type":"string"}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","applicantName","snapshot","answers","provisioned","possibleDuplicates","events","submittedAt","updatedAt"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/{id}/rotate":{"post":{"summary":"Replace the link's credentials","tags":["accountApplications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"applicantName":{"type":"string"},"applicantOrigin":{"type":["string","null"]},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"termsVersion":{"type":["string","null"]},"termsAcceptedAt":{"type":["string","null"]},"provisioned":{"type":"object","properties":{"attachToCustomerId":{"type":"string"},"customerId":{"type":"string"},"applicationId":{"type":"string"},"appSlugId":{"type":"string"},"apiKeyId":{"type":"string"},"connectionId":{"type":"string"},"becameDefaultRoute":{"type":"boolean"},"sharedLegalEntity":{"type":"boolean"},"steps":{"default":[],"type":"array","items":{"type":"object","properties":{"step":{"type":"string"},"ok":{"type":"boolean"},"detail":{"type":"string"},"at":{"type":"string"}},"required":["step","ok","at"],"additionalProperties":false}}},"required":["steps"],"additionalProperties":false},"possibleDuplicates":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"legalName":{"type":"string"},"regNo":{"type":["string","null"]},"vatNo":{"type":["string","null"]},"matchedOn":{"type":"array","items":{"type":"string","enum":["regNo","vatNo","legalName"]}}},"required":["customerId","legalName","matchedOn"],"additionalProperties":false}},"existingCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sharesLegalEntity":{"type":"boolean"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"decisionNote":{"type":["string","null"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"connectorId":{"type":["string","null"]},"credentialKeysSet":{"type":"array","items":{"type":"string"}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","applicantName","snapshot","answers","provisioned","possibleDuplicates","events","submittedAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/account-applications/{id}/credentials":{"post":{"summary":"Replace a direct account's merchant credentials (write-only)","tags":["accountApplications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"credentials":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}}},"required":["credentials"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},"offeringId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offeringName":{"type":"string"},"accountName":{"type":"string"},"applicantName":{"type":"string"},"applicantOrigin":{"type":["string","null"]},"mode":{"type":"string","enum":["live","test"]},"snapshot":{"type":"object","properties":{"legalName":{"type":"string","minLength":1},"name":{"type":["string","null"]},"url":{"type":["string","null"]},"regNo":{"type":["string","null"]},"vat":{"anyOf":[{"type":"object","properties":{"number":{"description":"VAT number","type":"string"},"type":{"description":"VAT type","type":"string","enum":["SEVAT","SEREVERSEDVAT","EUREVERSEDVAT","EUVAT","EXPORT"]}},"additionalProperties":false},{"type":"null"}]},"address1":{"type":["string","null"]},"address2":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"countryCode":{"anyOf":[{"type":"string","enum":["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","VGB","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","SWZ","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","VIR","URY","UZB","VUT","VAT","VEN","VNM","WLF","ESH","YEM","ZMB","ZWE","ZZZ"]},{"type":"null"}]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"financeEmail":{"type":["string","null"]},"contact":{"type":["string","null"]},"contactEmail":{"type":["string","null"]}},"required":["legalName"],"additionalProperties":false},"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"termsVersion":{"type":["string","null"]},"termsAcceptedAt":{"type":["string","null"]},"provisioned":{"type":"object","properties":{"attachToCustomerId":{"type":"string"},"customerId":{"type":"string"},"applicationId":{"type":"string"},"appSlugId":{"type":"string"},"apiKeyId":{"type":"string"},"connectionId":{"type":"string"},"becameDefaultRoute":{"type":"boolean"},"sharedLegalEntity":{"type":"boolean"},"steps":{"default":[],"type":"array","items":{"type":"object","properties":{"step":{"type":"string"},"ok":{"type":"boolean"},"detail":{"type":"string"},"at":{"type":"string"}},"required":["step","ok","at"],"additionalProperties":false}}},"required":["steps"],"additionalProperties":false},"possibleDuplicates":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"legalName":{"type":"string"},"regNo":{"type":["string","null"]},"vatNo":{"type":["string","null"]},"matchedOn":{"type":"array","items":{"type":"string","enum":["regNo","vatNo","legalName"]}}},"required":["customerId","legalName","matchedOn"],"additionalProperties":false}},"existingCustomerId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sharesLegalEntity":{"type":"boolean"},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"decisionNote":{"type":["string","null"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["STATUS","MESSAGE","PROVISIONING_STEP"]},"side":{"type":"string","enum":["applicant","provider","system"]},"actorName":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["SUBMITTED","IN_REVIEW","INFO_REQUESTED","APPROVED","PROVISIONING","PROVISIONING_FAILED","AWAITING_ACTIVATION","AWAITING_CLAIM","WAITING_FOR_PLATFORM","ACTIVE","SUSPENDED","REJECTED","WITHDRAWN","TERMINATED","DISCONNECTED"]},{"type":"null"}]},"message":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","side","createdAt"],"additionalProperties":false}},"fulfilmentMode":{"type":"string","enum":["BABELPAY_LINK","DIRECT_CREDENTIALS"]},"connectorId":{"type":["string","null"]},"credentialKeysSet":{"type":"array","items":{"type":"string"}},"submittedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","offeringId","offeringName","accountName","applicantName","snapshot","answers","provisioned","possibleDuplicates","events","submittedAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/federation-peers":{"get":{"summary":"Other platforms this one may send card data to","tags":["federationPeers"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"origin":{"type":"string"},"platformId":{"type":["string","null"]},"status":{"type":"string","enum":["PENDING","APPROVED","BLOCKED"]},"apiBaseUrl":{"type":["string","null"]},"relays":{"type":"object","properties":{"production":{"type":"string","format":"uri"},"sandbox":{"type":"string","format":"uri"}},"additionalProperties":false},"sharedVault":{"type":"boolean"},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"note":{"type":["string","null"]},"linkCount":{"type":"number"},"waitingCount":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","origin","status","relays","sharedVault","linkCount","waitingCount","createdAt","updatedAt"],"additionalProperties":false}}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/federation-peers/{id}":{"patch":{"summary":"Approve, block or re-point a platform","tags":["federationPeers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["PENDING","APPROVED","BLOCKED"]},"relays":{"type":"object","properties":{"production":{"type":"string","format":"uri"},"sandbox":{"type":"string","format":"uri"}}},"sharedVault":{"type":"boolean"},"note":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"origin":{"type":"string"},"platformId":{"type":["string","null"]},"status":{"type":"string","enum":["PENDING","APPROVED","BLOCKED"]},"apiBaseUrl":{"type":["string","null"]},"relays":{"type":"object","properties":{"production":{"type":"string","format":"uri"},"sandbox":{"type":"string","format":"uri"}},"additionalProperties":false},"sharedVault":{"type":"boolean"},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"note":{"type":["string","null"]},"linkCount":{"type":"number"},"waitingCount":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","origin","status","relays","sharedVault","linkCount","waitingCount","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/settings/groups":{"get":{"summary":"Get all registered settings group definitions","tags":["settings"],"parameters":[{"name":"contextType","in":"query","schema":{"type":"string","enum":["organization","partner","customer","application"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"group":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"contexts":{"type":"array","items":{"type":"string","enum":["organization","partner","customer","application"]}},"multiple":{"type":"boolean"},"modeScoped":{"type":"boolean"},"jsonSchema":{}},"required":["group","label","description","contexts","modeScoped","jsonSchema"],"additionalProperties":false}}}}}}}},"/api/v1/settings/{group}":{"get":{"summary":"Get settings for a group in a context","tags":["settings"],"parameters":[{"name":"group","in":"path","required":true,"schema":{"type":"string"}},{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer","application"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"group":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer","application"]},"contextId":{"type":"string"},"data":{},"updatedAt":{"type":"string"}},"required":["group","contextType","contextId","data"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"put":{"summary":"Update settings for a group in a context","tags":["settings"],"parameters":[{"name":"group","in":"path","required":true,"schema":{"type":"string"}},{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer","application"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"group":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer","application"]},"contextId":{"type":"string"},"data":{},"updatedAt":{"type":"string"}},"required":["group","contextType","contextId","data"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete (reset) settings for a group in a context","tags":["settings"],"parameters":[{"name":"group","in":"path","required":true,"schema":{"type":"string"}},{"name":"contextType","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer","application"]}},{"name":"contextId","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/notifications/inbox":{"get":{"summary":"Search the caller's notification inbox","tags":["notifications"],"parameters":[{"name":"page","in":"query","schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"limit","in":"query","schema":{"default":25,"type":"integer","minimum":1,"maximum":200}},{"name":"q","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["unread","read","archived"]}},{"name":"allContexts","in":"query","schema":{"type":"boolean"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["status","severity","category","notificationType","triggerSource","mode"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"notificationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"notificationType":{"type":"string"},"subjectId":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string"},"severity":{"type":"string","enum":["info","warning","critical"]},"category":{"type":"string","enum":["transactional","action_required","operational"]},"status":{"type":"string","enum":["unread","read","archived"]},"muted":{"type":"boolean"},"title":{"type":"string"},"body":{"type":"string"},"actions":{"default":[],"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"labelKey":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"},"style":{"default":"secondary","type":"string","enum":["primary","secondary"]}},"required":["key","labelKey","url","style"],"additionalProperties":false}},"subjectRefType":{"type":["string","null"]},"subjectRefId":{"type":["string","null"]},"triggerSource":{"type":"string","enum":["domain_event","monitor","rule","schedule","manual"]},"triggerRef":{"type":["string","null"]},"actorSubjectId":{"type":["string","null"]},"actor":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["id"],"additionalProperties":false},{"type":"null"}]},"mode":{"type":"string","enum":["live","test"]},"readAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","notificationId","notificationType","subjectId","contextType","contextId","severity","category","status","muted","title","body","actions","triggerSource","mode","createdAt"],"additionalProperties":false}},"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"}},"required":["items","page","pageSize","hasMore"],"additionalProperties":false}}}}}}},"/api/v1/notifications/inbox/unread-count":{"get":{"summary":"Unread inbox count for the badge","tags":["notifications"],"parameters":[{"name":"allContexts","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"},"topSeverity":{"anyOf":[{"type":"string","enum":["info","warning","critical"]},{"type":"null"}]}},"required":["count"],"additionalProperties":false}}}}}}},"/api/v1/notifications/inbox/{id}":{"get":{"summary":"Get one inbox item","tags":["notifications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"notificationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"notificationType":{"type":"string"},"subjectId":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string"},"severity":{"type":"string","enum":["info","warning","critical"]},"category":{"type":"string","enum":["transactional","action_required","operational"]},"status":{"type":"string","enum":["unread","read","archived"]},"muted":{"type":"boolean"},"title":{"type":"string"},"body":{"type":"string"},"actions":{"default":[],"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"labelKey":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"},"style":{"default":"secondary","type":"string","enum":["primary","secondary"]}},"required":["key","labelKey","url","style"],"additionalProperties":false}},"subjectRefType":{"type":["string","null"]},"subjectRefId":{"type":["string","null"]},"triggerSource":{"type":"string","enum":["domain_event","monitor","rule","schedule","manual"]},"triggerRef":{"type":["string","null"]},"actorSubjectId":{"type":["string","null"]},"actor":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["id"],"additionalProperties":false},{"type":"null"}]},"mode":{"type":"string","enum":["live","test"]},"readAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","notificationId","notificationType","subjectId","contextType","contextId","severity","category","status","muted","title","body","actions","triggerSource","mode","createdAt"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/notifications/inbox/{id}/read":{"post":{"summary":"Mark an inbox item read or unread","tags":["notifications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"read":{"default":true,"type":"boolean"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"notificationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"notificationType":{"type":"string"},"subjectId":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string"},"severity":{"type":"string","enum":["info","warning","critical"]},"category":{"type":"string","enum":["transactional","action_required","operational"]},"status":{"type":"string","enum":["unread","read","archived"]},"muted":{"type":"boolean"},"title":{"type":"string"},"body":{"type":"string"},"actions":{"default":[],"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"labelKey":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"},"style":{"default":"secondary","type":"string","enum":["primary","secondary"]}},"required":["key","labelKey","url","style"],"additionalProperties":false}},"subjectRefType":{"type":["string","null"]},"subjectRefId":{"type":["string","null"]},"triggerSource":{"type":"string","enum":["domain_event","monitor","rule","schedule","manual"]},"triggerRef":{"type":["string","null"]},"actorSubjectId":{"type":["string","null"]},"actor":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["id"],"additionalProperties":false},{"type":"null"}]},"mode":{"type":"string","enum":["live","test"]},"readAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","notificationId","notificationType","subjectId","contextType","contextId","severity","category","status","muted","title","body","actions","triggerSource","mode","createdAt"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/notifications/inbox/{id}/archive":{"post":{"summary":"Archive an inbox item","tags":["notifications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"notificationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"notificationType":{"type":"string"},"subjectId":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string"},"severity":{"type":"string","enum":["info","warning","critical"]},"category":{"type":"string","enum":["transactional","action_required","operational"]},"status":{"type":"string","enum":["unread","read","archived"]},"muted":{"type":"boolean"},"title":{"type":"string"},"body":{"type":"string"},"actions":{"default":[],"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"labelKey":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"},"style":{"default":"secondary","type":"string","enum":["primary","secondary"]}},"required":["key","labelKey","url","style"],"additionalProperties":false}},"subjectRefType":{"type":["string","null"]},"subjectRefId":{"type":["string","null"]},"triggerSource":{"type":"string","enum":["domain_event","monitor","rule","schedule","manual"]},"triggerRef":{"type":["string","null"]},"actorSubjectId":{"type":["string","null"]},"actor":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["id"],"additionalProperties":false},{"type":"null"}]},"mode":{"type":"string","enum":["live","test"]},"readAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","notificationId","notificationType","subjectId","contextType","contextId","severity","category","status","muted","title","body","actions","triggerSource","mode","createdAt"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/notifications/inbox/read-all":{"post":{"summary":"Mark every unread item in scope as read","tags":["notifications"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"allContexts":{"type":"boolean"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"number"}},"required":["updated"],"additionalProperties":false}}}}}}},"/api/v1/notifications/types":{"get":{"summary":"The notification catalog with effective activation","tags":["notifications"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"group":{"type":"string"},"category":{"type":"string","enum":["transactional","action_required","operational"]},"severity":{"type":"string","enum":["info","warning","critical"]},"audiences":{"type":"array","items":{"type":"string","enum":["organization","partner","customer"]}},"mandatory":{"type":"boolean"},"active":{"type":"boolean"},"audience":{"type":"array","items":{"type":"string"}},"defaultAudience":{"type":"array","items":{"type":"string"}},"audienceInherited":{"type":"boolean"},"inherited":{"type":"boolean"}},"required":["type","name","group","category","severity","audiences","mandatory","active","audience","defaultAudience","audienceInherited","inherited"],"additionalProperties":false}}}}}}}},"/api/v1/notifications/settings":{"get":{"summary":"Activation rows stored on the current context","tags":["notifications"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string"},"notificationType":{"type":"string"},"active":{"type":"boolean"},"audience":{"anyOf":[{"type":"array","items":{"type":"string","minLength":3,"pattern":"^(role|permission|subject|context|contact|email|sms|telegram|destination):\\S(?:.*\\S)?$"}},{"type":"null"}]},"minSeverity":{"anyOf":[{"type":"string","enum":["info","warning","critical"]},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contextType","contextId","notificationType","active","createdAt","updatedAt"],"additionalProperties":false}}}}}}}},"/api/v1/notifications/settings/{notificationType}":{"put":{"summary":"Activate/deactivate a type or override its audience","tags":["notifications"],"parameters":[{"name":"notificationType","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"},"audience":{"anyOf":[{"type":"array","items":{"type":"string","minLength":3,"pattern":"^(role|permission|subject|context|contact|email|sms|telegram|destination):\\S(?:.*\\S)?$"}},{"type":"null"}]},"minSeverity":{"anyOf":[{"type":"string","enum":["info","warning","critical"]},{"type":"null"}]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string"},"notificationType":{"type":"string"},"active":{"type":"boolean"},"audience":{"anyOf":[{"type":"array","items":{"type":"string","minLength":3,"pattern":"^(role|permission|subject|context|contact|email|sms|telegram|destination):\\S(?:.*\\S)?$"}},{"type":"null"}]},"minSeverity":{"anyOf":[{"type":"string","enum":["info","warning","critical"]},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contextType","contextId","notificationType","active","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/notifications/preferences":{"get":{"summary":"The caller's effective preference matrix","tags":["notifications"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"notificationType":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"group":{"type":"string"},"category":{"type":"string","enum":["transactional","action_required","operational"]},"severity":{"type":"string","enum":["info","warning","critical"]},"mandatory":{"type":"boolean"},"audiences":{"type":"array","items":{"type":"string","enum":["organization","partner","customer"]}},"channels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"relay":{"type":"string","enum":["immediate","if_unread_after_15m","digest_hourly","digest_daily","off"]},"inherited":{"type":"boolean"},"available":{"type":"boolean"}},"required":["relay","inherited","available"],"additionalProperties":false}}},"required":["notificationType","name","group","category","severity","mandatory","audiences","channels"],"additionalProperties":false}}}}}}},"put":{"summary":"Set one cell of the caller's preference matrix","tags":["notifications"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"notificationType":{"type":"string","minLength":1},"channel":{"type":"string","enum":["inbox","email","webhook","sms","telegram","pagerduty","slack"]},"relay":{"type":"string","enum":["immediate","if_unread_after_15m","digest_hourly","digest_daily","off"]},"contextType":{"anyOf":[{"type":"string","enum":["organization","partner","customer"]},{"type":"null"}]},"contextId":{"type":["string","null"]}},"required":["notificationType","channel","relay"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"notificationType":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"group":{"type":"string"},"category":{"type":"string","enum":["transactional","action_required","operational"]},"severity":{"type":"string","enum":["info","warning","critical"]},"mandatory":{"type":"boolean"},"audiences":{"type":"array","items":{"type":"string","enum":["organization","partner","customer"]}},"channels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"relay":{"type":"string","enum":["immediate","if_unread_after_15m","digest_hourly","digest_daily","off"]},"inherited":{"type":"boolean"},"available":{"type":"boolean"}},"required":["relay","inherited","available"],"additionalProperties":false}}},"required":["notificationType","name","group","category","severity","mandatory","audiences","channels"],"additionalProperties":false}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/notifications/identities":{"get":{"summary":"The caller's registered channel destinations","tags":["notifications"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["sms","telegram"]},"address":{"type":"string"},"verified":{"type":"boolean"},"verifiedAt":{"type":["string","null"]},"codeSentAt":{"type":["string","null"]}},"required":["channel","address","verified"],"additionalProperties":false}}}}}}}},"/api/v1/notifications/identities/{channel}":{"put":{"summary":"Register a destination for a channel and send a verification code to it","tags":["notifications"],"parameters":[{"name":"channel","in":"path","required":true,"schema":{"type":"string","enum":["sms","telegram"]}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"}},"required":["address"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"string","enum":["sms","telegram"]},"address":{"type":"string"},"verified":{"type":"boolean"},"verifiedAt":{"type":["string","null"]},"codeSentAt":{"type":["string","null"]}},"required":["channel","address","verified"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove a channel destination","tags":["notifications"],"parameters":[{"name":"channel","in":"path","required":true,"schema":{"type":"string","enum":["sms","telegram"]}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"additionalProperties":false}}}}}}},"/api/v1/notifications/identities/{channel}/verify":{"post":{"summary":"Confirm a destination with the code that was sent to it","tags":["notifications"],"parameters":[{"name":"channel","in":"path","required":true,"schema":{"type":"string","enum":["sms","telegram"]}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^\\d{6}$"}},"required":["code"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"string","enum":["sms","telegram"]},"address":{"type":"string"},"verified":{"type":"boolean"},"verifiedAt":{"type":["string","null"]},"codeSentAt":{"type":["string","null"]}},"required":["channel","address","verified"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/notifications":{"get":{"summary":"Search notifications raised in this context","tags":["notifications"],"parameters":[{"name":"page","in":"query","schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"limit","in":"query","schema":{"default":25,"type":"integer","minimum":1,"maximum":200}},{"name":"q","in":"query","schema":{"type":"string"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["severity","category","notificationType","triggerSource","mode"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"notificationType":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string"},"severity":{"type":"string","enum":["info","warning","critical"]},"category":{"type":"string","enum":["transactional","action_required","operational"]},"subjectRefType":{"type":["string","null"]},"subjectRefId":{"type":["string","null"]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"dedupKey":{"type":"string"},"triggerSource":{"type":"string","enum":["domain_event","monitor","rule","schedule","manual"]},"triggerRef":{"type":["string","null"]},"actorSubjectId":{"type":["string","null"]},"mode":{"type":"string","enum":["live","test"]},"createdAt":{"type":"string"}},"required":["id","notificationType","contextType","contextId","severity","category","payload","dedupKey","triggerSource","mode","createdAt"],"additionalProperties":false}},"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"}},"required":["items","page","pageSize","hasMore"],"additionalProperties":false}}}}}}},"/api/v1/notifications/{id}":{"get":{"summary":"One notification with its delivery records","tags":["notifications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"notification":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"notificationType":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string"},"severity":{"type":"string","enum":["info","warning","critical"]},"category":{"type":"string","enum":["transactional","action_required","operational"]},"subjectRefType":{"type":["string","null"]},"subjectRefId":{"type":["string","null"]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"dedupKey":{"type":"string"},"triggerSource":{"type":"string","enum":["domain_event","monitor","rule","schedule","manual"]},"triggerRef":{"type":["string","null"]},"actorSubjectId":{"type":["string","null"]},"mode":{"type":"string","enum":["live","test"]},"createdAt":{"type":"string"}},"required":["id","notificationType","contextType","contextId","severity","category","payload","dedupKey","triggerSource","mode","createdAt"],"additionalProperties":false},"deliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"notificationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"subjectId":{"type":["string","null"]},"channel":{"type":"string","enum":["inbox","email","webhook","sms","telegram","pagerduty","slack"]},"target":{"type":"string"},"recipientRef":{"type":["string","null"]},"status":{"type":"string","enum":["sent","failed","skipped","scheduled","cancelled"]},"providerRef":{"type":["string","null"]},"error":{"type":["string","null"]},"locale":{"type":["string","null"]},"scheduledFor":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","notificationId","channel","target","status","createdAt"],"additionalProperties":false}},"recipients":{"type":"number"}},"required":["notification","deliveries","recipients"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/notifications/test":{"post":{"summary":"Raise a sample notification of a type to check the wiring","tags":["notifications"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"notificationType":{"type":"string","minLength":1},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["notificationType"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"notificationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"inboxItems":{"type":"number"},"deliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"notificationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"subjectId":{"type":["string","null"]},"channel":{"type":"string","enum":["inbox","email","webhook","sms","telegram","pagerduty","slack"]},"target":{"type":"string"},"recipientRef":{"type":["string","null"]},"status":{"type":"string","enum":["sent","failed","skipped","scheduled","cancelled"]},"providerRef":{"type":["string","null"]},"error":{"type":["string","null"]},"locale":{"type":["string","null"]},"scheduledFor":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","notificationId","channel","target","status","createdAt"],"additionalProperties":false}},"skippedReason":{"type":["string","null"]}},"required":["inboxItems","deliveries"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/my-account/settings":{"get":{"summary":"The caller's account settings","tags":["myAccount"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"locale":{"type":"string","minLength":2,"maxLength":10},"timezone":{"type":"string","minLength":1,"maxLength":64},"favoriteContexts":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false}}},"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"patch":{"summary":"Merge a patch into the caller's account settings","tags":["myAccount"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"locale":{"anyOf":[{"type":"string","minLength":2,"maxLength":10},{"type":"null"}]},"timezone":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"favoriteContexts":{"anyOf":[{"maxItems":50,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false}},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"locale":{"type":"string","minLength":2,"maxLength":10},"timezone":{"type":"string","minLength":1,"maxLength":64},"favoriteContexts":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false}}},"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/organizations/{organizationId}/usage-events":{"post":{"summary":"Record a one or more usage events","tags":["usageEvents"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"continueOnFailure","in":"query","schema":{"default":false,"type":"boolean"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"_time":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601; Format: 2025-05-21T10:31:04+02:00 (Sweden UTC+2)\tor 2025-05-21T08:31:04Z (UTC)"},"metricId":{"type":"string","description":"Slug ID of the billable metric"},"customerId":{"description":"Customer ID that generated the event","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"applicationId":{"description":"Application slug ID that generated the event","type":"string"},"userId":{"description":"User ID that generated the event","type":"string"},"refId":{"description":"Reference ID that generated the event","type":"string"},"props":{"description":"Custom properties","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["_time","metricId"]},"description":"Array of usage events"}},"required":["events"]}}}},"responses":{"201":{"description":"Usage event ingest response","content":{"application/json":{"schema":{"type":"object","properties":{"ingested":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of events successfully ingested"},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of events that failed to ingest"},"failures":{"type":"array","items":{"type":"object","properties":{"error":{"type":"string","description":"Error message describing why the event failed to ingest"},"index":{"description":"Optional: Index or identifier of the failed event","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"event":{"description":"Optional: The actual event data that failed","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["error"],"additionalProperties":false,"description":"Array of failure details for any events that failed to ingest"}},"processedBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total bytes processed during the ingestion operation"},"blocksCreated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of new storage blocks created during ingestion"},"walLength":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Current length of the Write-Ahead Log (WAL)"},"savedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of events that were successfully saved to Axiom"}},"required":["ingested","failed","failures","processedBytes","blocksCreated","walLength","savedCount"],"additionalProperties":false,"description":"Usage event ingest response"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"failedEvents":{"type":"array","items":{"type":"object","properties":{"event":{},"reason":{"type":"string"}},"required":["event","reason"],"additionalProperties":false}},"totalEvents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"savedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/velocity/config":{"get":{"summary":"Get velocity metric definitions","tags":["velocity"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"metrics":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"aggregate":{"type":"string","enum":["count","sum","countDistinct"]},"aggregateField":{"type":"string"},"groupBy":{"minItems":1,"type":"array","items":{"type":"string","enum":["userId","cardFingerprint","cardBin","ip","ipCountry","deviceId","browserFingerprint","email","mobile"]}},"customerId":{"type":"string","minLength":1},"excludeSelf":{"default":false,"type":"boolean"},"includeCurrent":{"default":false,"type":"boolean"},"filters":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"type":"string","enum":["eq","neq","in"]},"values":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["field","op","values"],"additionalProperties":false}},"window":{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string","enum":["minutes","hours","days","months","all"]}},"required":["value","unit"],"additionalProperties":false},"outputField":{"type":"string","minLength":1}},"required":["id","name","aggregate","groupBy","excludeSelf","includeCurrent","filters","window","outputField"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["metrics"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"put":{"summary":"Save velocity metric definitions","tags":["velocity"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"metrics":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"aggregate":{"type":"string","enum":["count","sum","countDistinct"]},"aggregateField":{"type":"string"},"groupBy":{"minItems":1,"type":"array","items":{"type":"string","enum":["userId","cardFingerprint","cardBin","ip","ipCountry","deviceId","browserFingerprint","email","mobile"]}},"customerId":{"type":"string","minLength":1},"excludeSelf":{"default":false,"type":"boolean"},"includeCurrent":{"default":false,"type":"boolean"},"filters":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"type":"string","enum":["eq","neq","in"]},"values":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["field","op","values"]}},"window":{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string","enum":["minutes","hours","days","months","all"]}},"required":["value","unit"]},"outputField":{"type":"string","minLength":1}},"required":["id","name","aggregate","groupBy","window","outputField"]}}},"required":["metrics"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"metrics":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"aggregate":{"type":"string","enum":["count","sum","countDistinct"]},"aggregateField":{"type":"string"},"groupBy":{"minItems":1,"type":"array","items":{"type":"string","enum":["userId","cardFingerprint","cardBin","ip","ipCountry","deviceId","browserFingerprint","email","mobile"]}},"customerId":{"type":"string","minLength":1},"excludeSelf":{"default":false,"type":"boolean"},"includeCurrent":{"default":false,"type":"boolean"},"filters":{"default":[],"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"type":"string","enum":["eq","neq","in"]},"values":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["field","op","values"],"additionalProperties":false}},"window":{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string","enum":["minutes","hours","days","months","all"]}},"required":["value","unit"],"additionalProperties":false},"outputField":{"type":"string","minLength":1}},"required":["id","name","aggregate","groupBy","excludeSelf","includeCurrent","filters","window","outputField"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["metrics"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/velocity/purge":{"post":{"summary":"Purge old velocity events","tags":["velocity"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"maxAgeDays":{"default":90,"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"number"}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/monitors":{"get":{"summary":"List monitors for the current context","tags":["monitors"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"dataset","in":"query","schema":{"type":"string"}},{"name":"enabled","in":"query","schema":{"type":"boolean"}},{"name":"page","in":"query","schema":{"type":"number"}},{"name":"limit","in":"query","schema":{"type":"number"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["type","dataset","severity","enabled","lastRunState","createdAt","createdBy"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"dataset":{"type":"string","enum":["usage_events_dev","audit-log","workflow-events","transactions","monitor-alerts","notifications","checkout-events"]},"type":{"type":"string","enum":["threshold","anomaly","match"]},"aplQuery":{"type":"string","minLength":1},"schedule":{"type":"object","properties":{"intervalMinutes":{"default":5,"type":"integer","minimum":1,"maximum":9007199254740991},"rangeMinutes":{"default":5,"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["intervalMinutes","rangeMinutes"],"additionalProperties":false},"severity":{"default":"warning","type":"string","enum":["info","warning","critical"]},"comparison":{"type":"string","enum":["above","aboveOrEqual","below","belowOrEqual","aboveOrBelow"]},"threshold":{"type":"number"},"tolerance":{"type":"number","minimum":0,"maximum":100},"compareDays":{"type":"integer","minimum":0,"maximum":7},"notifyByGroup":{"default":false,"type":"boolean"},"valueField":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"destinationIds":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"emailRecipients":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"smsRecipients":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\+[1-9]\\d{1,14}$"}},"action":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"disable_routing_rows"},"decisionTableIds":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"target":{"oneOf":[{"type":"object","properties":{"from":{"type":"string","const":"group"},"groupIndex":{"default":0,"type":"integer","minimum":0,"maximum":5}},"required":["from","groupIndex"],"additionalProperties":false},{"type":"object","properties":{"from":{"type":"string","const":"fixed"},"provider":{"type":"string","minLength":1,"maxLength":200}},"required":["from","provider"],"additionalProperties":false}]},"requireConsecutiveAlertRuns":{"default":3,"type":"integer","minimum":1,"maximum":30},"ttlMinutes":{"default":30,"type":"integer","minimum":5,"maximum":1440},"maxCycles":{"default":3,"type":"integer","minimum":1,"maximum":10}},"required":["kind","decisionTableIds","target","requireConsecutiveAlertRuns","ttlMinutes","maxCycles"],"additionalProperties":false}]},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"lastRunAt":{"type":["string","null"]},"nextRunAt":{"type":["string","null"]},"lastRunState":{"anyOf":[{"type":"string","enum":["ok","alert","error","no_data"]},{"type":"null"}]},"lastRunError":{"type":["string","null"]},"recentRuns":{"default":[],"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string"},"state":{"type":"string","enum":["ok","alert","error","no_data"]},"value":{"type":["number","null"]},"threshold":{"type":["number","null"]},"durationMs":{"type":["number","null"]},"error":{"type":["string","null"]},"errorSince":{"type":["string","null"]},"groupValues":{"type":"array","items":{"type":"string"}},"alertId":{"type":["string","null"]}},"required":["timestamp","state"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":["string","null"]},"createdByName":{"type":["string","null"]},"createdByEmail":{"type":["string","null"]},"activeAlertCount":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastTriggeredAt":{"type":["string","null"]},"destinations":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["email","sms","slack"]},"name":{"type":"string"}},"required":["id","kind","name"],"additionalProperties":false}},"actionArmedBy":{"type":["string","null"]},"actionArmedByName":{"type":["string","null"]}},"required":["name","dataset","type","aplQuery","schedule","severity","notifyByGroup","enabled","destinationIds","emailRecipients","smsRecipients","id","contextType","contextId","recentRuns","createdAt","updatedAt","activeAlertCount","destinations"],"additionalProperties":false}},"meta":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"},"total":{"type":"number"}},"required":["page","pageSize","hasMore"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"post":{"summary":"Create a monitor (and sync it to the detection engine)","tags":["monitors"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"dataset":{"type":"string","enum":["usage_events_dev","audit-log","workflow-events","transactions","monitor-alerts","notifications","checkout-events"]},"type":{"type":"string","enum":["threshold","anomaly","match"]},"aplQuery":{"type":"string","minLength":1},"schedule":{"type":"object","properties":{"intervalMinutes":{"default":5,"type":"integer","minimum":1,"maximum":9007199254740991},"rangeMinutes":{"default":5,"type":"integer","minimum":1,"maximum":9007199254740991}}},"severity":{"default":"warning","type":"string","enum":["info","warning","critical"]},"comparison":{"type":"string","enum":["above","aboveOrEqual","below","belowOrEqual","aboveOrBelow"]},"threshold":{"type":"number"},"tolerance":{"type":"number","minimum":0,"maximum":100},"compareDays":{"type":"integer","minimum":0,"maximum":7},"notifyByGroup":{"default":false,"type":"boolean"},"valueField":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"destinationIds":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"emailRecipients":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"smsRecipients":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\+[1-9]\\d{1,14}$"}},"action":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"disable_routing_rows"},"decisionTableIds":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"target":{"oneOf":[{"type":"object","properties":{"from":{"type":"string","const":"group"},"groupIndex":{"default":0,"type":"integer","minimum":0,"maximum":5}},"required":["from"]},{"type":"object","properties":{"from":{"type":"string","const":"fixed"},"provider":{"type":"string","minLength":1,"maxLength":200}},"required":["from","provider"]}]},"requireConsecutiveAlertRuns":{"default":3,"type":"integer","minimum":1,"maximum":30},"ttlMinutes":{"default":30,"type":"integer","minimum":5,"maximum":1440},"maxCycles":{"default":3,"type":"integer","minimum":1,"maximum":10}},"required":["kind","decisionTableIds","target"]}]},{"type":"null"}]}},"required":["name","dataset","type","aplQuery","schedule"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"dataset":{"type":"string","enum":["usage_events_dev","audit-log","workflow-events","transactions","monitor-alerts","notifications","checkout-events"]},"type":{"type":"string","enum":["threshold","anomaly","match"]},"aplQuery":{"type":"string","minLength":1},"schedule":{"type":"object","properties":{"intervalMinutes":{"default":5,"type":"integer","minimum":1,"maximum":9007199254740991},"rangeMinutes":{"default":5,"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["intervalMinutes","rangeMinutes"],"additionalProperties":false},"severity":{"default":"warning","type":"string","enum":["info","warning","critical"]},"comparison":{"type":"string","enum":["above","aboveOrEqual","below","belowOrEqual","aboveOrBelow"]},"threshold":{"type":"number"},"tolerance":{"type":"number","minimum":0,"maximum":100},"compareDays":{"type":"integer","minimum":0,"maximum":7},"notifyByGroup":{"default":false,"type":"boolean"},"valueField":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"destinationIds":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"emailRecipients":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"smsRecipients":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\+[1-9]\\d{1,14}$"}},"action":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"disable_routing_rows"},"decisionTableIds":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"target":{"oneOf":[{"type":"object","properties":{"from":{"type":"string","const":"group"},"groupIndex":{"default":0,"type":"integer","minimum":0,"maximum":5}},"required":["from","groupIndex"],"additionalProperties":false},{"type":"object","properties":{"from":{"type":"string","const":"fixed"},"provider":{"type":"string","minLength":1,"maxLength":200}},"required":["from","provider"],"additionalProperties":false}]},"requireConsecutiveAlertRuns":{"default":3,"type":"integer","minimum":1,"maximum":30},"ttlMinutes":{"default":30,"type":"integer","minimum":5,"maximum":1440},"maxCycles":{"default":3,"type":"integer","minimum":1,"maximum":10}},"required":["kind","decisionTableIds","target","requireConsecutiveAlertRuns","ttlMinutes","maxCycles"],"additionalProperties":false}]},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"lastRunAt":{"type":["string","null"]},"nextRunAt":{"type":["string","null"]},"lastRunState":{"anyOf":[{"type":"string","enum":["ok","alert","error","no_data"]},{"type":"null"}]},"lastRunError":{"type":["string","null"]},"recentRuns":{"default":[],"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string"},"state":{"type":"string","enum":["ok","alert","error","no_data"]},"value":{"type":["number","null"]},"threshold":{"type":["number","null"]},"durationMs":{"type":["number","null"]},"error":{"type":["string","null"]},"errorSince":{"type":["string","null"]},"groupValues":{"type":"array","items":{"type":"string"}},"alertId":{"type":["string","null"]}},"required":["timestamp","state"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":["string","null"]},"createdByName":{"type":["string","null"]},"createdByEmail":{"type":["string","null"]},"activeAlertCount":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastTriggeredAt":{"type":["string","null"]},"destinations":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["email","sms","slack"]},"name":{"type":"string"}},"required":["id","kind","name"],"additionalProperties":false}},"actionArmedBy":{"type":["string","null"]},"actionArmedByName":{"type":["string","null"]}},"required":["name","dataset","type","aplQuery","schedule","severity","notifyByGroup","enabled","destinationIds","emailRecipients","smsRecipients","id","contextType","contextId","recentRuns","createdAt","updatedAt","activeAlertCount","destinations"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/monitors/runs":{"get":{"summary":"Recent engine checks for monitors in the current context","tags":["monitors"],"parameters":[{"name":"ids","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"hours","in":"query","schema":{"type":"integer","minimum":1,"maximum":720}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["state","value","durationMs"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"monitorId":{"type":"string"},"source":{"type":"string","enum":["history","cache","unavailable"]},"message":{"type":["string","null"]},"runs":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string"},"state":{"type":"string","enum":["ok","alert","error","no_data"]},"value":{"type":["number","null"]},"threshold":{"type":["number","null"]},"durationMs":{"type":["number","null"]},"error":{"type":["string","null"]},"errorSince":{"type":["string","null"]},"groupValues":{"type":"array","items":{"type":"string"}},"alertId":{"type":["string","null"]}},"required":["timestamp","state"],"additionalProperties":false}}},"required":["monitorId","source","runs"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/monitors/{id}":{"get":{"summary":"Get a monitor by ID","tags":["monitors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"dataset":{"type":"string","enum":["usage_events_dev","audit-log","workflow-events","transactions","monitor-alerts","notifications","checkout-events"]},"type":{"type":"string","enum":["threshold","anomaly","match"]},"aplQuery":{"type":"string","minLength":1},"schedule":{"type":"object","properties":{"intervalMinutes":{"default":5,"type":"integer","minimum":1,"maximum":9007199254740991},"rangeMinutes":{"default":5,"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["intervalMinutes","rangeMinutes"],"additionalProperties":false},"severity":{"default":"warning","type":"string","enum":["info","warning","critical"]},"comparison":{"type":"string","enum":["above","aboveOrEqual","below","belowOrEqual","aboveOrBelow"]},"threshold":{"type":"number"},"tolerance":{"type":"number","minimum":0,"maximum":100},"compareDays":{"type":"integer","minimum":0,"maximum":7},"notifyByGroup":{"default":false,"type":"boolean"},"valueField":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"destinationIds":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"emailRecipients":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"smsRecipients":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\+[1-9]\\d{1,14}$"}},"action":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"disable_routing_rows"},"decisionTableIds":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"target":{"oneOf":[{"type":"object","properties":{"from":{"type":"string","const":"group"},"groupIndex":{"default":0,"type":"integer","minimum":0,"maximum":5}},"required":["from","groupIndex"],"additionalProperties":false},{"type":"object","properties":{"from":{"type":"string","const":"fixed"},"provider":{"type":"string","minLength":1,"maxLength":200}},"required":["from","provider"],"additionalProperties":false}]},"requireConsecutiveAlertRuns":{"default":3,"type":"integer","minimum":1,"maximum":30},"ttlMinutes":{"default":30,"type":"integer","minimum":5,"maximum":1440},"maxCycles":{"default":3,"type":"integer","minimum":1,"maximum":10}},"required":["kind","decisionTableIds","target","requireConsecutiveAlertRuns","ttlMinutes","maxCycles"],"additionalProperties":false}]},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"lastRunAt":{"type":["string","null"]},"nextRunAt":{"type":["string","null"]},"lastRunState":{"anyOf":[{"type":"string","enum":["ok","alert","error","no_data"]},{"type":"null"}]},"lastRunError":{"type":["string","null"]},"recentRuns":{"default":[],"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string"},"state":{"type":"string","enum":["ok","alert","error","no_data"]},"value":{"type":["number","null"]},"threshold":{"type":["number","null"]},"durationMs":{"type":["number","null"]},"error":{"type":["string","null"]},"errorSince":{"type":["string","null"]},"groupValues":{"type":"array","items":{"type":"string"}},"alertId":{"type":["string","null"]}},"required":["timestamp","state"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":["string","null"]},"createdByName":{"type":["string","null"]},"createdByEmail":{"type":["string","null"]},"activeAlertCount":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastTriggeredAt":{"type":["string","null"]},"destinations":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["email","sms","slack"]},"name":{"type":"string"}},"required":["id","kind","name"],"additionalProperties":false}},"actionArmedBy":{"type":["string","null"]},"actionArmedByName":{"type":["string","null"]}},"required":["name","dataset","type","aplQuery","schedule","severity","notifyByGroup","enabled","destinationIds","emailRecipients","smsRecipients","id","contextType","contextId","recentRuns","createdAt","updatedAt","activeAlertCount","destinations"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a monitor","tags":["monitors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"dataset":{"type":"string","enum":["usage_events_dev","audit-log","workflow-events","transactions","monitor-alerts","notifications","checkout-events"]},"type":{"type":"string","enum":["threshold","anomaly","match"]},"aplQuery":{"type":"string","minLength":1},"schedule":{"type":"object","properties":{"intervalMinutes":{"default":5,"type":"integer","minimum":1,"maximum":9007199254740991},"rangeMinutes":{"default":5,"type":"integer","minimum":1,"maximum":9007199254740991}}},"severity":{"type":"string","enum":["info","warning","critical"]},"comparison":{"type":"string","enum":["above","aboveOrEqual","below","belowOrEqual","aboveOrBelow"]},"threshold":{"type":"number"},"tolerance":{"type":"number","minimum":0,"maximum":100},"compareDays":{"type":"integer","minimum":0,"maximum":7},"notifyByGroup":{"type":"boolean"},"valueField":{"type":"string"},"enabled":{"type":"boolean"},"destinationIds":{"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"emailRecipients":{"maxItems":20,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"smsRecipients":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\+[1-9]\\d{1,14}$"}},"action":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"disable_routing_rows"},"decisionTableIds":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"target":{"oneOf":[{"type":"object","properties":{"from":{"type":"string","const":"group"},"groupIndex":{"default":0,"type":"integer","minimum":0,"maximum":5}},"required":["from"]},{"type":"object","properties":{"from":{"type":"string","const":"fixed"},"provider":{"type":"string","minLength":1,"maxLength":200}},"required":["from","provider"]}]},"requireConsecutiveAlertRuns":{"default":3,"type":"integer","minimum":1,"maximum":30},"ttlMinutes":{"default":30,"type":"integer","minimum":5,"maximum":1440},"maxCycles":{"default":3,"type":"integer","minimum":1,"maximum":10}},"required":["kind","decisionTableIds","target"]}]},{"type":"null"}]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"dataset":{"type":"string","enum":["usage_events_dev","audit-log","workflow-events","transactions","monitor-alerts","notifications","checkout-events"]},"type":{"type":"string","enum":["threshold","anomaly","match"]},"aplQuery":{"type":"string","minLength":1},"schedule":{"type":"object","properties":{"intervalMinutes":{"default":5,"type":"integer","minimum":1,"maximum":9007199254740991},"rangeMinutes":{"default":5,"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["intervalMinutes","rangeMinutes"],"additionalProperties":false},"severity":{"default":"warning","type":"string","enum":["info","warning","critical"]},"comparison":{"type":"string","enum":["above","aboveOrEqual","below","belowOrEqual","aboveOrBelow"]},"threshold":{"type":"number"},"tolerance":{"type":"number","minimum":0,"maximum":100},"compareDays":{"type":"integer","minimum":0,"maximum":7},"notifyByGroup":{"default":false,"type":"boolean"},"valueField":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"destinationIds":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"emailRecipients":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"smsRecipients":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\+[1-9]\\d{1,14}$"}},"action":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"disable_routing_rows"},"decisionTableIds":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"target":{"oneOf":[{"type":"object","properties":{"from":{"type":"string","const":"group"},"groupIndex":{"default":0,"type":"integer","minimum":0,"maximum":5}},"required":["from","groupIndex"],"additionalProperties":false},{"type":"object","properties":{"from":{"type":"string","const":"fixed"},"provider":{"type":"string","minLength":1,"maxLength":200}},"required":["from","provider"],"additionalProperties":false}]},"requireConsecutiveAlertRuns":{"default":3,"type":"integer","minimum":1,"maximum":30},"ttlMinutes":{"default":30,"type":"integer","minimum":5,"maximum":1440},"maxCycles":{"default":3,"type":"integer","minimum":1,"maximum":10}},"required":["kind","decisionTableIds","target","requireConsecutiveAlertRuns","ttlMinutes","maxCycles"],"additionalProperties":false}]},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"lastRunAt":{"type":["string","null"]},"nextRunAt":{"type":["string","null"]},"lastRunState":{"anyOf":[{"type":"string","enum":["ok","alert","error","no_data"]},{"type":"null"}]},"lastRunError":{"type":["string","null"]},"recentRuns":{"default":[],"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string"},"state":{"type":"string","enum":["ok","alert","error","no_data"]},"value":{"type":["number","null"]},"threshold":{"type":["number","null"]},"durationMs":{"type":["number","null"]},"error":{"type":["string","null"]},"errorSince":{"type":["string","null"]},"groupValues":{"type":"array","items":{"type":"string"}},"alertId":{"type":["string","null"]}},"required":["timestamp","state"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":["string","null"]},"createdByName":{"type":["string","null"]},"createdByEmail":{"type":["string","null"]},"activeAlertCount":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastTriggeredAt":{"type":["string","null"]},"destinations":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["email","sms","slack"]},"name":{"type":"string"}},"required":["id","kind","name"],"additionalProperties":false}},"actionArmedBy":{"type":["string","null"]},"actionArmedByName":{"type":["string","null"]}},"required":["name","dataset","type","aplQuery","schedule","severity","notifyByGroup","enabled","destinationIds","emailRecipients","smsRecipients","id","contextType","contextId","recentRuns","createdAt","updatedAt","activeAlertCount","destinations"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a monitor (and remove it from the detection engine)","tags":["monitors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"204":{"description":"204","content":{"application/json":{"schema":{}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/monitors/{id}/run":{"post":{"summary":"Evaluate the monitor now and apply what it finds","tags":["monitors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"dataset":{"type":"string","enum":["usage_events_dev","audit-log","workflow-events","transactions","monitor-alerts","notifications","checkout-events"]},"type":{"type":"string","enum":["threshold","anomaly","match"]},"aplQuery":{"type":"string","minLength":1},"schedule":{"type":"object","properties":{"intervalMinutes":{"default":5,"type":"integer","minimum":1,"maximum":9007199254740991},"rangeMinutes":{"default":5,"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["intervalMinutes","rangeMinutes"],"additionalProperties":false},"severity":{"default":"warning","type":"string","enum":["info","warning","critical"]},"comparison":{"type":"string","enum":["above","aboveOrEqual","below","belowOrEqual","aboveOrBelow"]},"threshold":{"type":"number"},"tolerance":{"type":"number","minimum":0,"maximum":100},"compareDays":{"type":"integer","minimum":0,"maximum":7},"notifyByGroup":{"default":false,"type":"boolean"},"valueField":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"destinationIds":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"emailRecipients":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"smsRecipients":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","pattern":"^\\+[1-9]\\d{1,14}$"}},"action":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"disable_routing_rows"},"decisionTableIds":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"target":{"oneOf":[{"type":"object","properties":{"from":{"type":"string","const":"group"},"groupIndex":{"default":0,"type":"integer","minimum":0,"maximum":5}},"required":["from","groupIndex"],"additionalProperties":false},{"type":"object","properties":{"from":{"type":"string","const":"fixed"},"provider":{"type":"string","minLength":1,"maxLength":200}},"required":["from","provider"],"additionalProperties":false}]},"requireConsecutiveAlertRuns":{"default":3,"type":"integer","minimum":1,"maximum":30},"ttlMinutes":{"default":30,"type":"integer","minimum":5,"maximum":1440},"maxCycles":{"default":3,"type":"integer","minimum":1,"maximum":10}},"required":["kind","decisionTableIds","target","requireConsecutiveAlertRuns","ttlMinutes","maxCycles"],"additionalProperties":false}]},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"lastRunAt":{"type":["string","null"]},"nextRunAt":{"type":["string","null"]},"lastRunState":{"anyOf":[{"type":"string","enum":["ok","alert","error","no_data"]},{"type":"null"}]},"lastRunError":{"type":["string","null"]},"recentRuns":{"default":[],"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string"},"state":{"type":"string","enum":["ok","alert","error","no_data"]},"value":{"type":["number","null"]},"threshold":{"type":["number","null"]},"durationMs":{"type":["number","null"]},"error":{"type":["string","null"]},"errorSince":{"type":["string","null"]},"groupValues":{"type":"array","items":{"type":"string"}},"alertId":{"type":["string","null"]}},"required":["timestamp","state"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":["string","null"]},"createdByName":{"type":["string","null"]},"createdByEmail":{"type":["string","null"]},"activeAlertCount":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastTriggeredAt":{"type":["string","null"]},"destinations":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["email","sms","slack"]},"name":{"type":"string"}},"required":["id","kind","name"],"additionalProperties":false}},"actionArmedBy":{"type":["string","null"]},"actionArmedByName":{"type":["string","null"]}},"required":["name","dataset","type","aplQuery","schedule","severity","notifyByGroup","enabled","destinationIds","emailRecipients","smsRecipients","id","contextType","contextId","recentRuns","createdAt","updatedAt","activeAlertCount","destinations"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/monitors/{id}/test":{"post":{"summary":"Run the monitor query once and report whether it would trigger","tags":["monitors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"wouldTrigger":{"type":"boolean"},"value":{"type":"number"},"rows":{}},"required":["message","wouldTrigger"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/monitors/{id}/simulate":{"post":{"summary":"Simulate an engine trigger for this monitor (testing)","tags":["monitors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"action":{"default":"Open","type":"string","enum":["Open","Closed"]},"title":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":1000},"value":{"type":"number"},"groupValues":{"maxItems":10,"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"alertId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"status":{"type":"string"},"message":{"type":"string"}},"required":["status","message"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/monitors/{id}/actions":{"get":{"summary":"List the changes a monitor's action made","tags":["monitors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"monitorId":{"type":"string"},"monitorName":{"type":"string"},"alertId":{"type":["string","null"]},"kind":{"type":"string","const":"disable_routing_rows"},"decisionTableId":{"type":"string"},"decisionTableName":{"type":"string"},"provider":{"type":"string"},"rowIds":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"},"status":{"type":"string","enum":["active","confirmed","reverted","undone"]},"cycle":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"expiresAt":{"type":["string","null"]},"appliedBy":{"type":"string"},"appliedByName":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"resolvedBy":{"type":["string","null"]},"resolvedByName":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contextType","contextId","mode","monitorId","monitorName","alertId","kind","decisionTableId","decisionTableName","provider","rowIds","summary","status","cycle","expiresAt","appliedBy","resolvedAt","resolvedBy","createdAt","updatedAt"],"additionalProperties":false}}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/monitor-actions/{actionId}/undo":{"post":{"summary":"Undo a monitor action's change","tags":["monitors"],"parameters":[{"name":"actionId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"monitorId":{"type":"string"},"monitorName":{"type":"string"},"alertId":{"type":["string","null"]},"kind":{"type":"string","const":"disable_routing_rows"},"decisionTableId":{"type":"string"},"decisionTableName":{"type":"string"},"provider":{"type":"string"},"rowIds":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"},"status":{"type":"string","enum":["active","confirmed","reverted","undone"]},"cycle":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"expiresAt":{"type":["string","null"]},"appliedBy":{"type":"string"},"appliedByName":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"resolvedBy":{"type":["string","null"]},"resolvedByName":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contextType","contextId","mode","monitorId","monitorName","alertId","kind","decisionTableId","decisionTableName","provider","rowIds","summary","status","cycle","expiresAt","appliedBy","resolvedAt","resolvedBy","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/monitor-actions/{actionId}/confirm":{"post":{"summary":"Confirm a monitor action's change, so it does not revert","tags":["monitors"],"parameters":[{"name":"actionId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"monitorId":{"type":"string"},"monitorName":{"type":"string"},"alertId":{"type":["string","null"]},"kind":{"type":"string","const":"disable_routing_rows"},"decisionTableId":{"type":"string"},"decisionTableName":{"type":"string"},"provider":{"type":"string"},"rowIds":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"},"status":{"type":"string","enum":["active","confirmed","reverted","undone"]},"cycle":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"expiresAt":{"type":["string","null"]},"appliedBy":{"type":"string"},"appliedByName":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"resolvedBy":{"type":["string","null"]},"resolvedByName":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contextType","contextId","mode","monitorId","monitorName","alertId","kind","decisionTableId","decisionTableName","provider","rowIds","summary","status","cycle","expiresAt","appliedBy","resolvedAt","resolvedBy","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/monitor-alerts":{"get":{"summary":"List triggered alerts for the current context","tags":["monitorAlerts"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["open","acknowledged","resolved","snoozed"]}},{"name":"severity","in":"query","schema":{"type":"string","enum":["info","warning","critical"]}},{"name":"monitorId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"assignedTo","in":"query","schema":{"type":"string"}},{"name":"active","in":"query","schema":{"type":"boolean"}},{"name":"page","in":"query","schema":{"type":"number"}},{"name":"limit","in":"query","schema":{"type":"number"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["status","severity","monitorName","assignedTo","triggerCount"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"monitorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"monitorName":{"type":"string"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"dedupKey":{"type":"string"},"status":{"type":"string","enum":["open","acknowledged","resolved","snoozed"]},"severity":{"type":"string","enum":["info","warning","critical"]},"title":{"type":"string"},"description":{"type":["string","null"]},"value":{"type":["number","null"]},"threshold":{"type":["number","null"]},"groupKeys":{"default":[],"type":"array","items":{"type":"string"}},"groupValues":{"default":[],"type":"array","items":{"type":"string"}},"matchedEvent":{"anyOf":[{},{"type":"null"}]},"firstSeenAt":{"type":"string"},"lastSeenAt":{"type":"string"},"triggerCount":{"default":1,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"acknowledgedAt":{"type":["string","null"]},"acknowledgedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"resolvedBy":{"type":["string","null"]},"assignedTo":{"type":["string","null"]},"assignedToName":{"type":["string","null"]},"assignedToEmail":{"type":["string","null"]},"snoozedUntil":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","monitorId","monitorName","contextType","contextId","dedupKey","status","severity","title","groupKeys","groupValues","firstSeenAt","lastSeenAt","triggerCount","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"},"total":{"type":"number"}},"required":["page","pageSize","hasMore"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/monitor-alerts/{id}":{"get":{"summary":"Get a triggered alert by ID","tags":["monitorAlerts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"monitorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"monitorName":{"type":"string"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"dedupKey":{"type":"string"},"status":{"type":"string","enum":["open","acknowledged","resolved","snoozed"]},"severity":{"type":"string","enum":["info","warning","critical"]},"title":{"type":"string"},"description":{"type":["string","null"]},"value":{"type":["number","null"]},"threshold":{"type":["number","null"]},"groupKeys":{"default":[],"type":"array","items":{"type":"string"}},"groupValues":{"default":[],"type":"array","items":{"type":"string"}},"matchedEvent":{"anyOf":[{},{"type":"null"}]},"firstSeenAt":{"type":"string"},"lastSeenAt":{"type":"string"},"triggerCount":{"default":1,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"acknowledgedAt":{"type":["string","null"]},"acknowledgedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"resolvedBy":{"type":["string","null"]},"assignedTo":{"type":["string","null"]},"assignedToName":{"type":["string","null"]},"assignedToEmail":{"type":["string","null"]},"snoozedUntil":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","monitorId","monitorName","contextType","contextId","dedupKey","status","severity","title","groupKeys","groupValues","firstSeenAt","lastSeenAt","triggerCount","createdAt","updatedAt"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/monitor-alerts/{id}/acknowledge":{"post":{"summary":"Acknowledge an alert","tags":["monitorAlerts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"monitorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"monitorName":{"type":"string"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"dedupKey":{"type":"string"},"status":{"type":"string","enum":["open","acknowledged","resolved","snoozed"]},"severity":{"type":"string","enum":["info","warning","critical"]},"title":{"type":"string"},"description":{"type":["string","null"]},"value":{"type":["number","null"]},"threshold":{"type":["number","null"]},"groupKeys":{"default":[],"type":"array","items":{"type":"string"}},"groupValues":{"default":[],"type":"array","items":{"type":"string"}},"matchedEvent":{"anyOf":[{},{"type":"null"}]},"firstSeenAt":{"type":"string"},"lastSeenAt":{"type":"string"},"triggerCount":{"default":1,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"acknowledgedAt":{"type":["string","null"]},"acknowledgedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"resolvedBy":{"type":["string","null"]},"assignedTo":{"type":["string","null"]},"assignedToName":{"type":["string","null"]},"assignedToEmail":{"type":["string","null"]},"snoozedUntil":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","monitorId","monitorName","contextType","contextId","dedupKey","status","severity","title","groupKeys","groupValues","firstSeenAt","lastSeenAt","triggerCount","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/monitor-alerts/{id}/resolve":{"post":{"summary":"Resolve an alert","tags":["monitorAlerts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"monitorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"monitorName":{"type":"string"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"dedupKey":{"type":"string"},"status":{"type":"string","enum":["open","acknowledged","resolved","snoozed"]},"severity":{"type":"string","enum":["info","warning","critical"]},"title":{"type":"string"},"description":{"type":["string","null"]},"value":{"type":["number","null"]},"threshold":{"type":["number","null"]},"groupKeys":{"default":[],"type":"array","items":{"type":"string"}},"groupValues":{"default":[],"type":"array","items":{"type":"string"}},"matchedEvent":{"anyOf":[{},{"type":"null"}]},"firstSeenAt":{"type":"string"},"lastSeenAt":{"type":"string"},"triggerCount":{"default":1,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"acknowledgedAt":{"type":["string","null"]},"acknowledgedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"resolvedBy":{"type":["string","null"]},"assignedTo":{"type":["string","null"]},"assignedToName":{"type":["string","null"]},"assignedToEmail":{"type":["string","null"]},"snoozedUntil":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","monitorId","monitorName","contextType","contextId","dedupKey","status","severity","title","groupKeys","groupValues","firstSeenAt","lastSeenAt","triggerCount","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/monitor-alerts/{id}/reopen":{"post":{"summary":"Reopen a resolved alert","tags":["monitorAlerts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"monitorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"monitorName":{"type":"string"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"dedupKey":{"type":"string"},"status":{"type":"string","enum":["open","acknowledged","resolved","snoozed"]},"severity":{"type":"string","enum":["info","warning","critical"]},"title":{"type":"string"},"description":{"type":["string","null"]},"value":{"type":["number","null"]},"threshold":{"type":["number","null"]},"groupKeys":{"default":[],"type":"array","items":{"type":"string"}},"groupValues":{"default":[],"type":"array","items":{"type":"string"}},"matchedEvent":{"anyOf":[{},{"type":"null"}]},"firstSeenAt":{"type":"string"},"lastSeenAt":{"type":"string"},"triggerCount":{"default":1,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"acknowledgedAt":{"type":["string","null"]},"acknowledgedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"resolvedBy":{"type":["string","null"]},"assignedTo":{"type":["string","null"]},"assignedToName":{"type":["string","null"]},"assignedToEmail":{"type":["string","null"]},"snoozedUntil":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","monitorId","monitorName","contextType","contextId","dedupKey","status","severity","title","groupKeys","groupValues","firstSeenAt","lastSeenAt","triggerCount","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/monitor-alerts/{id}/snooze":{"post":{"summary":"Snooze an alert until a given time","tags":["monitorAlerts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"until":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"note":{"type":"string"}},"required":["until"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"monitorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"monitorName":{"type":"string"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"dedupKey":{"type":"string"},"status":{"type":"string","enum":["open","acknowledged","resolved","snoozed"]},"severity":{"type":"string","enum":["info","warning","critical"]},"title":{"type":"string"},"description":{"type":["string","null"]},"value":{"type":["number","null"]},"threshold":{"type":["number","null"]},"groupKeys":{"default":[],"type":"array","items":{"type":"string"}},"groupValues":{"default":[],"type":"array","items":{"type":"string"}},"matchedEvent":{"anyOf":[{},{"type":"null"}]},"firstSeenAt":{"type":"string"},"lastSeenAt":{"type":"string"},"triggerCount":{"default":1,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"acknowledgedAt":{"type":["string","null"]},"acknowledgedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"resolvedBy":{"type":["string","null"]},"assignedTo":{"type":["string","null"]},"assignedToName":{"type":["string","null"]},"assignedToEmail":{"type":["string","null"]},"snoozedUntil":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","monitorId","monitorName","contextType","contextId","dedupKey","status","severity","title","groupKeys","groupValues","firstSeenAt","lastSeenAt","triggerCount","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/monitor-alerts/{id}/assign":{"post":{"summary":"Assign or unassign an alert","tags":["monitorAlerts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"assignedTo":{"type":["string","null"]}},"required":["assignedTo"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"monitorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"monitorName":{"type":"string"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"dedupKey":{"type":"string"},"status":{"type":"string","enum":["open","acknowledged","resolved","snoozed"]},"severity":{"type":"string","enum":["info","warning","critical"]},"title":{"type":"string"},"description":{"type":["string","null"]},"value":{"type":["number","null"]},"threshold":{"type":["number","null"]},"groupKeys":{"default":[],"type":"array","items":{"type":"string"}},"groupValues":{"default":[],"type":"array","items":{"type":"string"}},"matchedEvent":{"anyOf":[{},{"type":"null"}]},"firstSeenAt":{"type":"string"},"lastSeenAt":{"type":"string"},"triggerCount":{"default":1,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"acknowledgedAt":{"type":["string","null"]},"acknowledgedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"resolvedBy":{"type":["string","null"]},"assignedTo":{"type":["string","null"]},"assignedToName":{"type":["string","null"]},"assignedToEmail":{"type":["string","null"]},"snoozedUntil":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","monitorId","monitorName","contextType","contextId","dedupKey","status","severity","title","groupKeys","groupValues","firstSeenAt","lastSeenAt","triggerCount","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/monitor-alerts/{id}/audit-trail":{"get":{"summary":"Get the full audit trail for an alert","tags":["monitorAlerts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string"},"kind":{"type":"string"},"actorId":{"type":["string","null"]},"actorName":{"type":["string","null"]},"actorEmail":{"type":["string","null"]},"note":{"type":["string","null"]},"fromStatus":{"type":["string","null"]},"toStatus":{"type":["string","null"]},"channel":{"type":["string","null"]},"target":{"type":["string","null"]},"deliveryStatus":{"type":["string","null"]}},"required":["timestamp","kind"],"additionalProperties":false}}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/monitor-alerts/{id}/comments":{"get":{"summary":"List comments on an alert","tags":["monitorAlerts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"alertId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"authorId":{"type":"string"},"authorName":{"type":["string","null"]},"authorEmail":{"type":["string","null"]},"body":{"type":"string","minLength":1},"createdAt":{"type":"string"}},"required":["id","alertId","contextType","contextId","authorId","body","createdAt"],"additionalProperties":false}}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"post":{"summary":"Add a comment to an alert","tags":["monitorAlerts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":10000}},"required":["body"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"alertId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"authorId":{"type":"string"},"authorName":{"type":["string","null"]},"authorEmail":{"type":["string","null"]},"body":{"type":"string","minLength":1},"createdAt":{"type":"string"}},"required":["id","alertId","contextType","contextId","authorId","body","createdAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/alert-destinations":{"get":{"summary":"List alert destinations for the current context","tags":["alertDestinations"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"kind","in":"query","schema":{"type":"string","enum":["email","sms","slack"]}},{"name":"page","in":"query","schema":{"type":"number"}},{"name":"limit","in":"query","schema":{"type":"number"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["kind","name","createdAt"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"kind":{"type":"string","enum":["email","sms","slack"]},"name":{"type":"string"},"target":{"type":"string"},"usedBy":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":["string","null"]},"createdByName":{"type":["string","null"]}},"required":["id","contextType","contextId","kind","name","target","usedBy","createdAt","updatedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"},"total":{"type":"number"}},"required":["page","pageSize","hasMore"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"post":{"summary":"Register an alert destination","tags":["alertDestinations"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["email","sms","slack"]},"name":{"type":"string","minLength":1,"maxLength":100},"target":{"type":"string","minLength":1,"maxLength":500}},"required":["kind","name","target"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"kind":{"type":"string","enum":["email","sms","slack"]},"name":{"type":"string"},"target":{"type":"string"},"usedBy":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":["string","null"]},"createdByName":{"type":["string","null"]}},"required":["id","contextType","contextId","kind","name","target","usedBy","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/alert-destinations/{id}":{"get":{"summary":"Get an alert destination by ID","tags":["alertDestinations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"kind":{"type":"string","enum":["email","sms","slack"]},"name":{"type":"string"},"target":{"type":"string"},"usedBy":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":["string","null"]},"createdByName":{"type":["string","null"]}},"required":["id","contextType","contextId","kind","name","target","usedBy","createdAt","updatedAt"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"patch":{"summary":"Rename an alert destination or change its address","tags":["alertDestinations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"target":{"type":"string","minLength":1,"maxLength":500}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"kind":{"type":"string","enum":["email","sms","slack"]},"name":{"type":"string"},"target":{"type":"string"},"usedBy":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":["string","null"]},"createdByName":{"type":["string","null"]}},"required":["id","contextType","contextId","kind","name","target","usedBy","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete an alert destination","tags":["alertDestinations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"204":{"description":"204","content":{"application/json":{"schema":{}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/alert-destinations/{id}/test":{"post":{"summary":"Send a test message to an alert destination","tags":["alertDestinations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["sent","failed","skipped"]},"target":{"type":"string"},"message":{"type":"string"}},"required":["status","target","message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/agent-tasks":{"get":{"summary":"List scheduled agent tasks in the current context","tags":["agentTasks"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"number"}},{"name":"limit","in":"query","schema":{"type":"number"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["name","enabled","notifyPolicy","lastRunState","createdAt"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"agentId":{"type":"string"},"name":{"type":"string"},"instruction":{"type":"string"},"trigger":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"schedule"},"cron":{"type":"string","minLength":1,"maxLength":100},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["kind","cron","timezone"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"monitor_alert"},"monitorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["kind","monitorId"],"additionalProperties":false}]},"triggerMonitorName":{"type":["string","null"]},"notifyPolicy":{"type":"string","enum":["always","on_finding","never"]},"minSeverity":{"type":"string","enum":["info","warning","critical"]},"destinationIds":{"type":"array","items":{"type":"string"}},"destinations":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["email","sms","slack"]},"name":{"type":"string"}},"required":["id","kind","name"],"additionalProperties":false}},"recipe":{"type":"array","items":{"type":"object","properties":{"description":{"default":"","type":"string","maxLength":300},"dataset":{"type":"string","minLength":1,"maxLength":100},"query":{"type":"string","minLength":1,"maxLength":4000}},"required":["description","dataset","query"],"additionalProperties":false}},"model":{"type":["string","null"]},"effort":{"anyOf":[{"type":"string","enum":["low","medium","high","xhigh","max"]},{"type":"null"}]},"maxRunsPerDay":{"type":"number"},"enabled":{"type":"boolean"},"disabledReason":{"type":["string","null"]},"ownerSubjectId":{"type":"string"},"ownerName":{"type":["string","null"]},"ownerEmail":{"type":["string","null"]},"sourceConversationId":{"type":["string","null"]},"nextRunAt":{"type":["string","null"]},"lastRunAt":{"type":["string","null"]},"lastRunState":{"anyOf":[{"type":"string","enum":["ok","silent","error","skipped"]},{"type":"null"}]},"lastError":{"type":["string","null"]},"recentRuns":{"default":[],"type":"array","items":{"type":"object","properties":{"runKey":{"type":"string"},"cause":{"type":"string","enum":["schedule","manual","monitor_alert"]},"timestamp":{"type":"string"},"state":{"type":"string","enum":["ok","silent","error","skipped"]},"conversationId":{"type":["string","null"]},"delivered":{"type":"boolean"},"severity":{"anyOf":[{"type":"string","enum":["info","warning","critical"]},{"type":"null"}]},"title":{"type":["string","null"]},"error":{"type":["string","null"]},"durationMs":{"type":["number","null"]},"inputTokens":{"type":["number","null"]},"outputTokens":{"type":["number","null"]},"cacheReadInputTokens":{"type":["number","null"]},"alertId":{"type":["string","null"]},"errorSince":{"type":["string","null"]},"summary":{"type":["string","null"]}},"required":["runKey","cause","timestamp","state","conversationId","delivered"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":["string","null"]},"createdByName":{"type":["string","null"]},"createdByEmail":{"type":["string","null"]}},"required":["id","contextType","contextId","mode","agentId","name","instruction","trigger","notifyPolicy","minSeverity","destinationIds","destinations","recipe","model","effort","maxRunsPerDay","enabled","disabledReason","ownerSubjectId","sourceConversationId","nextRunAt","lastRunAt","lastRunState","lastError","recentRuns","createdAt","updatedAt","createdBy"],"additionalProperties":false}},"meta":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"},"total":{"type":"number"}},"required":["page","pageSize","hasMore"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"post":{"summary":"Create a scheduled agent task","tags":["agentTasks"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"instruction":{"type":"string","minLength":1,"maxLength":4000},"trigger":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"schedule"},"cron":{"type":"string","minLength":1,"maxLength":100},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["kind","cron","timezone"]},{"type":"object","properties":{"kind":{"type":"string","const":"monitor_alert"},"monitorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["kind","monitorId"]}]},"notifyPolicy":{"default":"always","type":"string","enum":["always","on_finding","never"]},"minSeverity":{"default":"info","type":"string","enum":["info","warning","critical"]},"destinationIds":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"recipe":{"default":[],"maxItems":10,"type":"array","items":{"type":"object","properties":{"description":{"default":"","type":"string","maxLength":300},"dataset":{"type":"string","minLength":1,"maxLength":100},"query":{"type":"string","minLength":1,"maxLength":4000}},"required":["dataset","query"]}},"model":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"effort":{"default":null,"anyOf":[{"type":"string","enum":["low","medium","high","xhigh","max"]},{"type":"null"}]},"maxRunsPerDay":{"default":24,"type":"integer","minimum":1,"maximum":48},"enabled":{"default":true,"type":"boolean"},"agentId":{"default":"analyst","type":"string","minLength":1,"maxLength":64}},"required":["name","instruction","trigger"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"agentId":{"type":"string"},"name":{"type":"string"},"instruction":{"type":"string"},"trigger":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"schedule"},"cron":{"type":"string","minLength":1,"maxLength":100},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["kind","cron","timezone"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"monitor_alert"},"monitorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["kind","monitorId"],"additionalProperties":false}]},"triggerMonitorName":{"type":["string","null"]},"notifyPolicy":{"type":"string","enum":["always","on_finding","never"]},"minSeverity":{"type":"string","enum":["info","warning","critical"]},"destinationIds":{"type":"array","items":{"type":"string"}},"destinations":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["email","sms","slack"]},"name":{"type":"string"}},"required":["id","kind","name"],"additionalProperties":false}},"recipe":{"type":"array","items":{"type":"object","properties":{"description":{"default":"","type":"string","maxLength":300},"dataset":{"type":"string","minLength":1,"maxLength":100},"query":{"type":"string","minLength":1,"maxLength":4000}},"required":["description","dataset","query"],"additionalProperties":false}},"model":{"type":["string","null"]},"effort":{"anyOf":[{"type":"string","enum":["low","medium","high","xhigh","max"]},{"type":"null"}]},"maxRunsPerDay":{"type":"number"},"enabled":{"type":"boolean"},"disabledReason":{"type":["string","null"]},"ownerSubjectId":{"type":"string"},"ownerName":{"type":["string","null"]},"ownerEmail":{"type":["string","null"]},"sourceConversationId":{"type":["string","null"]},"nextRunAt":{"type":["string","null"]},"lastRunAt":{"type":["string","null"]},"lastRunState":{"anyOf":[{"type":"string","enum":["ok","silent","error","skipped"]},{"type":"null"}]},"lastError":{"type":["string","null"]},"recentRuns":{"default":[],"type":"array","items":{"type":"object","properties":{"runKey":{"type":"string"},"cause":{"type":"string","enum":["schedule","manual","monitor_alert"]},"timestamp":{"type":"string"},"state":{"type":"string","enum":["ok","silent","error","skipped"]},"conversationId":{"type":["string","null"]},"delivered":{"type":"boolean"},"severity":{"anyOf":[{"type":"string","enum":["info","warning","critical"]},{"type":"null"}]},"title":{"type":["string","null"]},"error":{"type":["string","null"]},"durationMs":{"type":["number","null"]},"inputTokens":{"type":["number","null"]},"outputTokens":{"type":["number","null"]},"cacheReadInputTokens":{"type":["number","null"]},"alertId":{"type":["string","null"]},"errorSince":{"type":["string","null"]},"summary":{"type":["string","null"]}},"required":["runKey","cause","timestamp","state","conversationId","delivered"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":["string","null"]},"createdByName":{"type":["string","null"]},"createdByEmail":{"type":["string","null"]}},"required":["id","contextType","contextId","mode","agentId","name","instruction","trigger","notifyPolicy","minSeverity","destinationIds","destinations","recipe","model","effort","maxRunsPerDay","enabled","disabledReason","ownerSubjectId","sourceConversationId","nextRunAt","lastRunAt","lastRunState","lastError","recentRuns","createdAt","updatedAt","createdBy"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/agent-tasks/{id}":{"get":{"summary":"Get a scheduled agent task by ID","tags":["agentTasks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"agentId":{"type":"string"},"name":{"type":"string"},"instruction":{"type":"string"},"trigger":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"schedule"},"cron":{"type":"string","minLength":1,"maxLength":100},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["kind","cron","timezone"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"monitor_alert"},"monitorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["kind","monitorId"],"additionalProperties":false}]},"triggerMonitorName":{"type":["string","null"]},"notifyPolicy":{"type":"string","enum":["always","on_finding","never"]},"minSeverity":{"type":"string","enum":["info","warning","critical"]},"destinationIds":{"type":"array","items":{"type":"string"}},"destinations":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["email","sms","slack"]},"name":{"type":"string"}},"required":["id","kind","name"],"additionalProperties":false}},"recipe":{"type":"array","items":{"type":"object","properties":{"description":{"default":"","type":"string","maxLength":300},"dataset":{"type":"string","minLength":1,"maxLength":100},"query":{"type":"string","minLength":1,"maxLength":4000}},"required":["description","dataset","query"],"additionalProperties":false}},"model":{"type":["string","null"]},"effort":{"anyOf":[{"type":"string","enum":["low","medium","high","xhigh","max"]},{"type":"null"}]},"maxRunsPerDay":{"type":"number"},"enabled":{"type":"boolean"},"disabledReason":{"type":["string","null"]},"ownerSubjectId":{"type":"string"},"ownerName":{"type":["string","null"]},"ownerEmail":{"type":["string","null"]},"sourceConversationId":{"type":["string","null"]},"nextRunAt":{"type":["string","null"]},"lastRunAt":{"type":["string","null"]},"lastRunState":{"anyOf":[{"type":"string","enum":["ok","silent","error","skipped"]},{"type":"null"}]},"lastError":{"type":["string","null"]},"recentRuns":{"default":[],"type":"array","items":{"type":"object","properties":{"runKey":{"type":"string"},"cause":{"type":"string","enum":["schedule","manual","monitor_alert"]},"timestamp":{"type":"string"},"state":{"type":"string","enum":["ok","silent","error","skipped"]},"conversationId":{"type":["string","null"]},"delivered":{"type":"boolean"},"severity":{"anyOf":[{"type":"string","enum":["info","warning","critical"]},{"type":"null"}]},"title":{"type":["string","null"]},"error":{"type":["string","null"]},"durationMs":{"type":["number","null"]},"inputTokens":{"type":["number","null"]},"outputTokens":{"type":["number","null"]},"cacheReadInputTokens":{"type":["number","null"]},"alertId":{"type":["string","null"]},"errorSince":{"type":["string","null"]},"summary":{"type":["string","null"]}},"required":["runKey","cause","timestamp","state","conversationId","delivered"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":["string","null"]},"createdByName":{"type":["string","null"]},"createdByEmail":{"type":["string","null"]}},"required":["id","contextType","contextId","mode","agentId","name","instruction","trigger","notifyPolicy","minSeverity","destinationIds","destinations","recipe","model","effort","maxRunsPerDay","enabled","disabledReason","ownerSubjectId","sourceConversationId","nextRunAt","lastRunAt","lastRunState","lastError","recentRuns","createdAt","updatedAt","createdBy"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"patch":{"summary":"Change a scheduled agent task","tags":["agentTasks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"instruction":{"type":"string","minLength":1,"maxLength":4000},"trigger":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"schedule"},"cron":{"type":"string","minLength":1,"maxLength":100},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["kind","cron","timezone"]},{"type":"object","properties":{"kind":{"type":"string","const":"monitor_alert"},"monitorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["kind","monitorId"]}]},"notifyPolicy":{"type":"string","enum":["always","on_finding","never"]},"minSeverity":{"type":"string","enum":["info","warning","critical"]},"destinationIds":{"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"recipe":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"description":{"default":"","type":"string","maxLength":300},"dataset":{"type":"string","minLength":1,"maxLength":100},"query":{"type":"string","minLength":1,"maxLength":4000}},"required":["dataset","query"]}},"model":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"effort":{"anyOf":[{"type":"string","enum":["low","medium","high","xhigh","max"]},{"type":"null"}]},"maxRunsPerDay":{"type":"integer","minimum":1,"maximum":48},"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contextType":{"type":"string","enum":["organization","customer"]},"contextId":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"agentId":{"type":"string"},"name":{"type":"string"},"instruction":{"type":"string"},"trigger":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"schedule"},"cron":{"type":"string","minLength":1,"maxLength":100},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["kind","cron","timezone"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"monitor_alert"},"monitorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["kind","monitorId"],"additionalProperties":false}]},"triggerMonitorName":{"type":["string","null"]},"notifyPolicy":{"type":"string","enum":["always","on_finding","never"]},"minSeverity":{"type":"string","enum":["info","warning","critical"]},"destinationIds":{"type":"array","items":{"type":"string"}},"destinations":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["email","sms","slack"]},"name":{"type":"string"}},"required":["id","kind","name"],"additionalProperties":false}},"recipe":{"type":"array","items":{"type":"object","properties":{"description":{"default":"","type":"string","maxLength":300},"dataset":{"type":"string","minLength":1,"maxLength":100},"query":{"type":"string","minLength":1,"maxLength":4000}},"required":["description","dataset","query"],"additionalProperties":false}},"model":{"type":["string","null"]},"effort":{"anyOf":[{"type":"string","enum":["low","medium","high","xhigh","max"]},{"type":"null"}]},"maxRunsPerDay":{"type":"number"},"enabled":{"type":"boolean"},"disabledReason":{"type":["string","null"]},"ownerSubjectId":{"type":"string"},"ownerName":{"type":["string","null"]},"ownerEmail":{"type":["string","null"]},"sourceConversationId":{"type":["string","null"]},"nextRunAt":{"type":["string","null"]},"lastRunAt":{"type":["string","null"]},"lastRunState":{"anyOf":[{"type":"string","enum":["ok","silent","error","skipped"]},{"type":"null"}]},"lastError":{"type":["string","null"]},"recentRuns":{"default":[],"type":"array","items":{"type":"object","properties":{"runKey":{"type":"string"},"cause":{"type":"string","enum":["schedule","manual","monitor_alert"]},"timestamp":{"type":"string"},"state":{"type":"string","enum":["ok","silent","error","skipped"]},"conversationId":{"type":["string","null"]},"delivered":{"type":"boolean"},"severity":{"anyOf":[{"type":"string","enum":["info","warning","critical"]},{"type":"null"}]},"title":{"type":["string","null"]},"error":{"type":["string","null"]},"durationMs":{"type":["number","null"]},"inputTokens":{"type":["number","null"]},"outputTokens":{"type":["number","null"]},"cacheReadInputTokens":{"type":["number","null"]},"alertId":{"type":["string","null"]},"errorSince":{"type":["string","null"]},"summary":{"type":["string","null"]}},"required":["runKey","cause","timestamp","state","conversationId","delivered"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":["string","null"]},"createdByName":{"type":["string","null"]},"createdByEmail":{"type":["string","null"]}},"required":["id","contextType","contextId","mode","agentId","name","instruction","trigger","notifyPolicy","minSeverity","destinationIds","destinations","recipe","model","effort","maxRunsPerDay","enabled","disabledReason","ownerSubjectId","sourceConversationId","nextRunAt","lastRunAt","lastRunState","lastError","recentRuns","createdAt","updatedAt","createdBy"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a scheduled agent task","tags":["agentTasks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"204":{"description":"204","content":{"application/json":{"schema":{}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/agent-tasks/{id}/run":{"post":{"summary":"Run a scheduled agent task now","tags":["agentTasks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"202":{"description":"202","content":{"application/json":{"schema":{"type":"object","properties":{"runKey":{"type":"string"},"dispatch":{"type":"string","const":"scheduled"}},"required":["runKey","dispatch"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/analytics/query":{"post":{"description":"Structured query interface for Analytics Engine","summary":"Execute a query against the Analytics Engine","tags":["analytics"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"dataset":{"type":"string","minLength":1},"query":{"type":"string","minLength":1},"startDate":{"type":"string"},"endDate":{"type":"string"},"f":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"operator":{"type":"string"},"value":{}},"required":["field","operator","value"]}}},"required":["dataset","query"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"datasetNames":{"type":"array","items":{"type":"string"}},"status":{"type":"object","properties":{"elapsedTime":{"type":"number"},"blocksExamined":{"type":"number"},"rowsExamined":{"type":"number"},"rowsMatched":{"type":"number"},"numGroups":{"type":"number"},"isPartial":{"type":"boolean"},"cacheStatus":{"type":"number"},"minBlockTime":{"type":"string"},"maxBlockTime":{"type":"string"}},"required":["elapsedTime","blocksExamined","rowsExamined","rowsMatched","numGroups","isPartial","cacheStatus","minBlockTime","maxBlockTime"],"additionalProperties":false},"buckets":{"type":"object","properties":{"series":{"type":"array","items":{"type":"object","properties":{"interval":{"type":"string"},"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"group":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"aggregations":{"type":"array","items":{"type":"object","properties":{"alias":{"type":"string"},"value":{"type":"number"}},"required":["alias","value"],"additionalProperties":false}}},"required":["id","group","aggregations"],"additionalProperties":false}}},"required":["interval","groups"],"additionalProperties":false}},"totals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"group":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"aggregations":{"type":"array","items":{"type":"object","properties":{"alias":{"type":"string"},"value":{"type":"number"}},"required":["alias","value"],"additionalProperties":false}}},"required":["id","group","aggregations"],"additionalProperties":false}}},"required":["series","totals"],"additionalProperties":false},"fieldsMetaMap":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"type":{"type":"string"},"unit":{"type":"string"},"description":{"type":"string"}},"required":["type"],"additionalProperties":false}},"request":{"type":"object","properties":{"endTime":{"type":"string"},"resolution":{"type":"string"},"startTime":{"type":"string"},"aggregations":{"type":"array","items":{"type":"object","properties":{"alias":{"type":"string"},"argument":{"type":"string"},"field":{"type":"string"},"op":{"type":"string"}},"required":["alias","field","op"],"additionalProperties":false}},"filter":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"groupBy":{"type":"array","items":{"type":"string"}},"limit":{"type":"number"},"order":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"desc":{"type":"boolean"}},"required":["field","desc"],"additionalProperties":false}},"project":{"type":"array","items":{"type":"string"}},"virtualFields":{"type":"array","items":{"type":"object","properties":{"alias":{"type":"string"},"expr":{"type":"string"}},"required":["alias","expr"],"additionalProperties":false}}},"required":["endTime","resolution","startTime"],"additionalProperties":false},"tables":{"type":"array","items":{"type":"object","properties":{"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"agg":{"anyOf":[{"type":"boolean"},{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}]}},"required":["name","type"],"additionalProperties":false}},"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"group":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","group"],"additionalProperties":false}},"name":{"type":"string"},"order":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"desc":{"type":"boolean"}},"required":["field","desc"],"additionalProperties":false}},"sources":{"type":"array","items":{"type":"string"}},"columns":{"type":"array","items":{"type":"array","items":{}}},"range":{"type":"object","properties":{"field":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"}},"required":["field","start","end"],"additionalProperties":false}},"required":["fields","groups","name","order","sources","columns","range"],"additionalProperties":false}}},"required":["datasetNames","status","buckets","fieldsMetaMap","request","tables"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/analytics/schema":{"get":{"description":"Returns column metadata (name, type, ordinal, column type) for the specified datasets","summary":"Get schema for one or more datasets","tags":["analytics"],"parameters":[{"name":"datasets","in":"query","description":"Comma-separated list of dataset names","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"columnName":{"type":"string"},"dataType":{"type":"string"},"columnOrdinal":{"type":"number"},"columnType":{"type":"string"}},"required":["columnName","dataType","columnOrdinal","columnType"],"additionalProperties":false}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/analytics/datasets":{"get":{"description":"Retrieve a list of available datasets with their IDs and names","summary":"List available datasets","tags":["analytics"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/organizations/{organizationId}/customers/{customerId}/overview":{"get":{"summary":"Get customer overview dashboard data","tags":["customerOverview"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"object","properties":{"totalSpend":{"type":"number"},"currency":{"default":"USD","type":"string"},"activeApplications":{"type":"number"},"openSupportTickets":{"type":"number"},"activePricePlans":{"type":"number"},"customerSince":{"type":"string"},"status":{"type":"string","enum":["ONBOARDING","ACTIVE","DORMANT","SUSPENDED","INACTIVE","ARCHIVED"]},"healthScore":{"type":"number","minimum":0,"maximum":100}},"required":["totalSpend","currency","activeApplications","openSupportTickets","activePricePlans","customerSince","status","healthScore"],"additionalProperties":false},"usage":{"type":"object","properties":{"currentMonthUsage":{"type":"number"},"previousMonthUsage":{"type":"number"},"percentageChange":{"type":"number"},"currency":{"default":"USD","type":"string"},"trend":{"type":"string","enum":["up","down","stable"]},"topMetrics":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"usage":{"type":"number"},"limit":{"type":"number"},"percentageUsed":{"type":"number"}},"required":["name","usage","percentageUsed"],"additionalProperties":false}}},"required":["currentMonthUsage","previousMonthUsage","percentageChange","currency","trend","topMetrics"],"additionalProperties":false},"invoices":{"type":"object","properties":{"total":{"type":"number"},"paid":{"type":"number"},"overdue":{"type":"number"},"pending":{"type":"number"},"currency":{"default":"USD","type":"string"},"recentInvoices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"date":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"status":{"type":"string","enum":["Paid","Overdue","Pending"]}},"required":["id","date","amount","currency","status"],"additionalProperties":false}}},"required":["total","paid","overdue","pending","currency","recentInvoices"],"additionalProperties":false},"crm":{"type":"object","properties":{"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string"}},"required":["id","name","role","email"],"additionalProperties":false}},"recentInteractions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["Email","Call","Meeting"]},"date":{"type":"string"},"summary":{"type":"string"}},"required":["id","type","date","summary"],"additionalProperties":false}}},"required":["contacts","recentInteractions"],"additionalProperties":false},"support":{"type":"object","properties":{"activeTickets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"priority":{"type":"string","enum":["Low","Medium","High","Critical"]},"status":{"type":"string","enum":["Open","In Progress","Waiting"]},"created":{"type":"string"}},"required":["id","title","priority","status","created"],"additionalProperties":false}},"ticketMetrics":{"type":"object","properties":{"avgResponseTime":{"type":"string"},"avgResolutionTime":{"type":"string"},"satisfactionScore":{"type":"number"}},"required":["avgResponseTime","avgResolutionTime","satisfactionScore"],"additionalProperties":false}},"required":["activeTickets","ticketMetrics"],"additionalProperties":false},"pricePlans":{"type":"object","properties":{"active":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricePlanId":{"type":"string"},"name":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"monthlyValue":{"type":"number"},"planType":{"type":"string","enum":["STANDARD","CUSTOMER_OVERRIDE"]}},"required":["id","pricePlanId","name","startDate","monthlyValue"],"additionalProperties":false}}},"required":["active"],"additionalProperties":false},"applications":{"type":"object","properties":{"list":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["Active","Inactive","Pending"]},"usage":{"type":"number"},"lastActive":{"type":"string"}},"required":["id","name","status","usage","lastActive"],"additionalProperties":false}}},"required":["list"],"additionalProperties":false}},"required":["summary","usage","invoices","crm","support","pricePlans","applications"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/permissions":{"get":{"description":"Returns all resources and permissions available to the current user across all contexts","summary":"Get current user permissions for UI control","tags":["authorization"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"permissions":{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"conditions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"isRegex":{"type":"boolean"}},"required":["resourceId"],"additionalProperties":false}}},"required":["contextType","contextId","permissions"],"additionalProperties":false}}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/contexts":{"get":{"description":"Returns all contexts (organizations, customers, etc.) that the current user has access to, with their names","summary":"Get current user contexts","tags":["authorization"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"contexts":{"type":"array","items":{"type":"object","properties":{"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"providerDataVisible":{"type":"boolean"},"customerKind":{"type":"string","enum":["STANDARD","PROVIDER"]},"liveAllowed":{"type":"boolean"},"modeAccess":{"type":"string","enum":["both","test","live"]}},"required":["context","name"],"additionalProperties":false}},"testModeAvailable":{"type":"boolean"},"modes":{"type":"array","items":{"type":"string","enum":["live","test"]}},"defaultModeAccess":{"type":"object","properties":{"organization":{"type":"string","enum":["both","test","live"]},"customer":{"type":"string","enum":["both","test","live"]}},"additionalProperties":false},"testDataResetScopes":{"type":"array","items":{"type":"string","enum":["organization","customer"]}},"isRootUser":{"type":"boolean"},"favorites":{"type":"array","items":{"type":"object","properties":{"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"providerDataVisible":{"type":"boolean"},"customerKind":{"type":"string","enum":["STANDARD","PROVIDER"]},"liveAllowed":{"type":"boolean"},"modeAccess":{"type":"string","enum":["both","test","live"]}},"required":["context","name"],"additionalProperties":false}},"canActOnBehalf":{"type":"boolean"},"subjectId":{"type":"string"}},"required":["contexts"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/on-behalf-contexts":{"get":{"description":"Customers of every organization whose roles let the current user act on behalf of its customers, matched by name, as contexts ready to select. Independent of the selected context. A search term of at least 2 characters is required: the customers are never listed without one. Users only; empty for anyone else.","summary":"Search the customers the current user may act on behalf of","tags":["authorization"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":48}},{"name":"limit","in":"query","schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"contexts":{"type":"array","items":{"type":"object","properties":{"context":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"],"additionalProperties":false},"name":{"type":"string"},"description":{"type":"string"},"providerDataVisible":{"type":"boolean"},"customerKind":{"type":"string","enum":["STANDARD","PROVIDER"]},"liveAllowed":{"type":"boolean"},"modeAccess":{"type":"string","enum":["both","test","live"]}},"required":["context","name"],"additionalProperties":false}},"hasMore":{"type":"boolean"}},"required":["contexts","hasMore"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/contexts/{type}/{id}/roles":{"get":{"description":"Returns paginated list of roles available in the specified context","summary":"Get all roles for a context","tags":["authorization"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"path","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"path","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"path","schema":{"type":"boolean"}},{"name":"page","in":"query","schema":{"default":1,"type":"number"}},{"name":"limit","in":"query","schema":{"default":50,"type":"number","minimum":1,"maximum":100}},{"name":"search","in":"query","schema":{"type":"string"}},{"name":"includeDefaults","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"permissions":{"default":[],"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"conditions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"isRegex":{"type":"boolean"}},"required":["resourceId"],"additionalProperties":false}},"isSystemRole":{"type":"boolean"},"parentRoleId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","name","contextType","permissions","isSystemRole","createdAt","updatedAt"],"additionalProperties":false}},"total":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalPages":{"type":"number"}},"required":["roles","total","page","pageSize","totalPages"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"post":{"description":"Creates a new custom role with specified permissions in the context","summary":"Create a custom role","tags":["authorization"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"path","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"path","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"path","schema":{"type":"boolean"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"permissions":{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"conditions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"isRegex":{"type":"boolean"}},"required":["resourceId"]}},"parentRoleId":{"type":"string"},"targetContextType":{"type":"string","enum":["organization","partner","customer"]},"isSystemRole":{"type":"boolean"}},"required":["name"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"permissions":{"default":[],"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"conditions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"isRegex":{"type":"boolean"}},"required":["resourceId"],"additionalProperties":false}},"isSystemRole":{"type":"boolean"},"parentRoleId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","name","contextType","permissions","isSystemRole","createdAt","updatedAt"],"additionalProperties":false},"message":{"type":"string"}},"required":["role"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/contexts/{type}/{id}/subjects":{"get":{"description":"Returns paginated list of users and API keys with their assigned roles in the specified context","summary":"Get all subjects with roles in a context","tags":["authorization"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"path","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"path","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"path","schema":{"type":"boolean"}},{"name":"page","in":"query","schema":{"default":1,"type":"number"}},{"name":"limit","in":"query","schema":{"default":50,"type":"number","minimum":1,"maximum":100}},{"name":"search","in":"query","schema":{"type":"string"}},{"name":"subjectType","in":"query","schema":{"type":"string","enum":["user","api_key"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"subjects":{"type":"array","items":{"type":"object","properties":{"subjectType":{"type":"string","enum":["user","api_key"]},"subjectId":{"type":"string"},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"status":{"type":"string"},"disabledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"notes":{"type":["string","null"]},"roles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"modeAccess":{"type":"string","enum":["both","test","live"]},"assignedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"assignedBy":{"type":"string"}},"required":["subjectType","subjectId","roles","assignedAt","assignedBy"],"additionalProperties":false}},"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"}},"required":["subjects","page","pageSize","hasMore"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/contexts/{type}/{id}/roles/assign":{"post":{"description":"Assigns a predefined role to a user or API key in the specified context","summary":"Assign a role to a subject","tags":["authorization"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"path","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"path","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"path","schema":{"type":"boolean"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"subjectType":{"type":"string","enum":["user","api_key"]},"subjectId":{"type":"string"},"roleIds":{"type":"array","items":{"type":"string"}}},"required":["subjectType","subjectId","roleIds"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"assignment":{"type":"object","properties":{"id":{"type":"string"},"subjectType":{"type":"string","enum":["user","api_key"]},"subjectId":{"type":"string"},"roleId":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string"},"assignedBy":{"type":"string"},"assignedByType":{"anyOf":[{"type":"string","enum":["user","api_key"]},{"type":"string","const":"system"}]},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"modeAccess":{"type":"string","enum":["both","test","live"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","subjectType","subjectId","roleId","contextType","contextId","assignedBy","assignedByType","createdAt","updatedAt"],"additionalProperties":false}},"required":["success","message"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/contexts/{type}/{id}/users/add":{"post":{"description":"Adds users from Clerk by email and assigns specified roles to them in the context","summary":"Add users and assign roles","tags":["authorization"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"path","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"path","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"path","schema":{"type":"boolean"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"emails":{"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"roleIds":{"type":"array","items":{"type":"string"}},"modeAccess":{"type":"string","enum":["both","test","live"]}},"required":["emails","roleIds"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"success":{"type":"boolean"},"error":{"type":"string"},"subjectId":{"type":"string"},"roleAssignments":{"type":"array","items":{"type":"object","properties":{"roleId":{"type":"string"},"success":{"type":"boolean"},"error":{"type":"string"}},"required":["roleId","success"],"additionalProperties":false}}},"required":["email","success"],"additionalProperties":false}}},"required":["success","message","results"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/contexts/{type}/{id}/roles/revoke":{"post":{"description":"Revokes a role assignment from a user or API key in the specified context","summary":"Revoke a role from a subject","tags":["authorization"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"path","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"path","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"path","schema":{"type":"boolean"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"subjectType":{"type":"string","enum":["user","api_key"]},"subjectId":{"type":"string"},"roleIds":{"type":"array","items":{"type":"string"}}},"required":["subjectType","subjectId","roleIds"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/contexts/{type}/{id}/roles/bulk-assign":{"post":{"description":"Assigns roles to multiple users or API keys in a single operation","summary":"Bulk assign roles to multiple subjects","tags":["authorization"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"path","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"path","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"path","schema":{"type":"boolean"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"assignments":{"type":"array","items":{"type":"object","properties":{"subjectType":{"type":"string","enum":["user","api_key"]},"subjectId":{"type":"string"},"roleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["subjectType","subjectId","roleId"]}}},"required":["assignments"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"subjectType":{"type":"string","enum":["user","api_key"]},"subjectId":{"type":"string"},"roleId":{"type":"string"},"success":{"type":"boolean"},"error":{"type":"string"},"assignment":{"type":"object","properties":{"id":{"type":"string"},"subjectType":{"type":"string","enum":["user","api_key"]},"subjectId":{"type":"string"},"roleId":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string"},"assignedBy":{"type":"string"},"assignedByType":{"anyOf":[{"type":"string","enum":["user","api_key"]},{"type":"string","const":"system"}]},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"modeAccess":{"type":"string","enum":["both","test","live"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","subjectType","subjectId","roleId","contextType","contextId","assignedBy","assignedByType","createdAt","updatedAt"],"additionalProperties":false}},"required":["subjectType","subjectId","roleId","success"],"additionalProperties":false}}},"required":["success","message","results"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/contexts/{type}/{id}/roles/{roleId}":{"patch":{"description":"Updates an existing role's name, description, or permissions","summary":"Update a role","tags":["authorization"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"roleId","in":"path","required":true,"schema":{"type":"string"}},{"name":"organizationId","in":"path","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"path","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"path","schema":{"type":"boolean"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"permissions":{"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"conditions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"isRegex":{"type":"boolean"}},"required":["resourceId"]}},"parentRoleId":{"type":"string"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"permissions":{"default":[],"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string"},"conditions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"isRegex":{"type":"boolean"}},"required":["resourceId"],"additionalProperties":false}},"isSystemRole":{"type":"boolean"},"parentRoleId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","name","contextType","permissions","isSystemRole","createdAt","updatedAt"],"additionalProperties":false},"message":{"type":"string"}},"required":["role"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"delete":{"description":"Deletes a custom role (system roles cannot be deleted)","summary":"Delete a role","tags":["authorization"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"roleId","in":"path","required":true,"schema":{"type":"string"}},{"name":"organizationId","in":"path","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"path","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"path","schema":{"type":"boolean"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/permissions/check":{"post":{"description":"Checks if a specific subject has permission to perform an action on a resource in a context","summary":"Check if a subject has permission for an action","tags":["authorization"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"resourceId":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string"}},"required":["resourceId","contextType","contextId"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"allowed":{"type":"boolean"}},"required":["allowed"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/audit":{"get":{"description":"Returns paginated audit log of all permission-related changes","summary":"Get audit log for permission changes","tags":["authorization"],"parameters":[{"name":"page","in":"query","schema":{"default":1,"type":"number"}},{"name":"limit","in":"query","schema":{"default":50,"type":"number","minimum":1,"maximum":100}},{"name":"ctx","in":"query","style":"deepObject","schema":{"type":"object","properties":{"type":{"type":"string","enum":["organization","partner","customer"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["live","test"]},"onBehalf":{"type":"boolean"}},"required":["type","id"]}},{"name":"subjectType","in":"query","schema":{"type":"string","enum":["user","api_key"]}},{"name":"subjectId","in":"query","schema":{"type":"string"}},{"name":"action","in":"query","schema":{"type":"string","enum":["assigned","revoked","role_created","role_deleted","permission_granted","permission_revoked"]}},{"name":"performedBy","in":"query","schema":{"type":"string"}},{"name":"startDate","in":"query","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},{"name":"endDate","in":"query","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"action":{"type":"string","enum":["assigned","revoked","role_created","role_deleted","permission_granted","permission_revoked"]},"subjectType":{"type":"string","enum":["user","api_key"]},"subjectId":{"type":"string"},"roleId":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string"},"performedBy":{"type":"string"},"performedByType":{"anyOf":[{"type":"string","enum":["user","api_key"]},{"type":"string","const":"system"}]},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","action","performedBy","performedByType","createdAt"],"additionalProperties":false}},"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"}},"required":["entries","page","pageSize","hasMore"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/resources":{"get":{"description":"Returns paginated list of all resources stored in the authorization system","summary":"Get all stored resources","tags":["authorization"],"parameters":[{"name":"page","in":"query","schema":{"default":1,"type":"number"}},{"name":"limit","in":"query","schema":{"default":100,"type":"number","minimum":1,"maximum":1000}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"method":{"type":"string"},"path":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"parameters":{"type":"array","items":{"type":"string"}},"group":{"type":"string"},"paymentApi":{"type":"boolean"}},"required":["id","method","path","contextType"],"additionalProperties":false}},"total":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalPages":{"type":"number"}},"required":["resources","total","page","pageSize","totalPages"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/subjects/{subjectType}/{subjectId}/assignments":{"get":{"description":"Returns all role assignments for a specific user or API key","summary":"Get all role assignments for a subject","tags":["authorization"],"parameters":[{"name":"subjectType","in":"path","required":true,"schema":{"type":"string","enum":["user","api_key"]}},{"name":"subjectId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"type","in":"query","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"query","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"assignments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subjectType":{"type":"string","enum":["user","api_key"]},"subjectId":{"type":"string"},"roleId":{"type":"string"},"contextType":{"type":"string","enum":["organization","partner","customer"]},"contextId":{"type":"string"},"assignedBy":{"type":"string"},"assignedByType":{"anyOf":[{"type":"string","enum":["user","api_key"]},{"type":"string","const":"system"}]},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"modeAccess":{"type":"string","enum":["both","test","live"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","subjectType","subjectId","roleId","contextType","contextId","assignedBy","assignedByType","createdAt","updatedAt"],"additionalProperties":false}},"subject":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"default":"user","type":"string","enum":["user","api_key"]},"externalUserId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Clerk user ID - null for invited users"},"firstName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"primaryEmail":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Required for invitations"},"status":{"default":"active","type":"string","enum":["invited","active","disabled","revoked","expired"]},"clerkInvitationId":{"description":"Clerk invitation ID for tracking","type":["string","null"]},"invitedBy":{"description":"Subject ID of the inviter","type":["string","null"]},"invitedAt":{"description":"When invitation was sent","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"expiresAt":{"description":"Invitation expiration","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"disabledAt":{"description":"When user was disabled","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"disabledBy":{"description":"Subject ID of admin who disabled","type":["string","null"]},"notes":{"description":"Notes such as disable reason","type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","type","externalUserId","firstName","lastName","primaryEmail","status","createdAt","updatedAt"],"additionalProperties":false}},"required":["assignments","subject"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/subjects/{id}":{"get":{"description":"Returns subject metadata by internal subject ID","summary":"Get subject by ID","tags":["authorization"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"default":"user","type":"string","enum":["user","api_key"]},"externalUserId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Clerk user ID - null for invited users"},"firstName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"primaryEmail":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Required for invitations"},"status":{"default":"active","type":"string","enum":["invited","active","disabled","revoked","expired"]},"clerkInvitationId":{"description":"Clerk invitation ID for tracking","type":["string","null"]},"invitedBy":{"description":"Subject ID of the inviter","type":["string","null"]},"invitedAt":{"description":"When invitation was sent","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"expiresAt":{"description":"Invitation expiration","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"disabledAt":{"description":"When user was disabled","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"disabledBy":{"description":"Subject ID of admin who disabled","type":["string","null"]},"notes":{"description":"Notes such as disable reason","type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","type","externalUserId","firstName","lastName","primaryEmail","status","createdAt","updatedAt"],"additionalProperties":false}},"required":["subject"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"patch":{"description":"Updates subject metadata fields","summary":"Update subject metadata","tags":["authorization"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"externalUserId":{"type":"string","minLength":1},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"primaryEmail":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"default":"user","type":"string","enum":["user","api_key"]},"externalUserId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Clerk user ID - null for invited users"},"firstName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"primaryEmail":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Required for invitations"},"status":{"default":"active","type":"string","enum":["invited","active","disabled","revoked","expired"]},"clerkInvitationId":{"description":"Clerk invitation ID for tracking","type":["string","null"]},"invitedBy":{"description":"Subject ID of the inviter","type":["string","null"]},"invitedAt":{"description":"When invitation was sent","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"expiresAt":{"description":"Invitation expiration","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"disabledAt":{"description":"When user was disabled","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"disabledBy":{"description":"Subject ID of admin who disabled","type":["string","null"]},"notes":{"description":"Notes such as disable reason","type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","type","externalUserId","firstName","lastName","primaryEmail","status","createdAt","updatedAt"],"additionalProperties":false},"message":{"type":"string"}},"required":["subject","message"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"delete":{"description":"Deletes a subject record (only if no assignments exist)","summary":"Delete a subject","tags":["authorization"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/subjects/external/{externalUserId}":{"get":{"description":"Returns subject metadata by Clerk user ID","summary":"Get subject by external user ID","tags":["authorization"],"parameters":[{"name":"externalUserId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"default":"user","type":"string","enum":["user","api_key"]},"externalUserId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Clerk user ID - null for invited users"},"firstName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"primaryEmail":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Required for invitations"},"status":{"default":"active","type":"string","enum":["invited","active","disabled","revoked","expired"]},"clerkInvitationId":{"description":"Clerk invitation ID for tracking","type":["string","null"]},"invitedBy":{"description":"Subject ID of the inviter","type":["string","null"]},"invitedAt":{"description":"When invitation was sent","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"expiresAt":{"description":"Invitation expiration","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"disabledAt":{"description":"When user was disabled","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"disabledBy":{"description":"Subject ID of admin who disabled","type":["string","null"]},"notes":{"description":"Notes such as disable reason","type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","type","externalUserId","firstName","lastName","primaryEmail","status","createdAt","updatedAt"],"additionalProperties":false}},"required":["subject"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/subjects/search":{"get":{"description":"Search subjects by name, email, or external user ID","summary":"Search subjects","tags":["authorization"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"default":1,"type":"number"}},{"name":"limit","in":"query","schema":{"default":50,"type":"number","minimum":1,"maximum":100}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"subjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"default":"user","type":"string","enum":["user","api_key"]},"externalUserId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Clerk user ID - null for invited users"},"firstName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"primaryEmail":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Required for invitations"},"status":{"default":"active","type":"string","enum":["invited","active","disabled","revoked","expired"]},"clerkInvitationId":{"description":"Clerk invitation ID for tracking","type":["string","null"]},"invitedBy":{"description":"Subject ID of the inviter","type":["string","null"]},"invitedAt":{"description":"When invitation was sent","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"expiresAt":{"description":"Invitation expiration","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"disabledAt":{"description":"When user was disabled","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"disabledBy":{"description":"Subject ID of admin who disabled","type":["string","null"]},"notes":{"description":"Notes such as disable reason","type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","type","externalUserId","firstName","lastName","primaryEmail","status","createdAt","updatedAt"],"additionalProperties":false}},"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"}},"required":["subjects","page","pageSize","hasMore"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/subjects/sync/clerk-user":{"post":{"description":"Sync user data from Clerk to the subjects table","summary":"Sync a single Clerk user","tags":["authorization"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"clerkUserId":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"primaryEmail":{"type":"string"}},"required":["clerkUserId"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"subject":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"default":"user","type":"string","enum":["user","api_key"]},"externalUserId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Clerk user ID - null for invited users"},"firstName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"primaryEmail":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Required for invitations"},"status":{"default":"active","type":"string","enum":["invited","active","disabled","revoked","expired"]},"clerkInvitationId":{"description":"Clerk invitation ID for tracking","type":["string","null"]},"invitedBy":{"description":"Subject ID of the inviter","type":["string","null"]},"invitedAt":{"description":"When invitation was sent","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"expiresAt":{"description":"Invitation expiration","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"disabledAt":{"description":"When user was disabled","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"disabledBy":{"description":"Subject ID of admin who disabled","type":["string","null"]},"notes":{"description":"Notes such as disable reason","type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","type","externalUserId","firstName","lastName","primaryEmail","status","createdAt","updatedAt"],"additionalProperties":false},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/subjects/sync/all-clerk-users":{"post":{"description":"Trigger a full sync of all users from Clerk (placeholder implementation)","summary":"Sync all Clerk users","tags":["authorization"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"stats":{"type":"object","properties":{"totalSubjects":{"type":"number"},"subjectsWithEmail":{"type":"number"},"subjectsWithNames":{"type":"number"}},"required":["totalSubjects","subjectsWithEmail","subjectsWithNames"],"additionalProperties":false}},"required":["success","message","stats"],"additionalProperties":false}}}}}}},"/api/v1/authz/subjects/sync/stats":{"get":{"description":"Get statistics about subject data synchronization","summary":"Get sync statistics","tags":["authorization"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"totalSubjects":{"type":"number"},"subjectsWithEmail":{"type":"number"},"subjectsWithNames":{"type":"number"},"lastSyncDate":{"type":"string"}},"required":["totalSubjects","subjectsWithEmail","subjectsWithNames"],"additionalProperties":false}}}}}}},"/api/v1/authz/contexts/{type}/{id}/invitations":{"get":{"description":"Returns paginated list of pending user invitations for the specified context","summary":"List pending invitations","tags":["authorization"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"path","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"path","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"path","schema":{"type":"boolean"}},{"name":"page","in":"query","schema":{"default":1,"type":"number"}},{"name":"limit","in":"query","schema":{"default":50,"type":"number","minimum":1,"maximum":100}},{"name":"status","in":"query","schema":{"default":"pending","type":"string","enum":["pending","expired","all"]}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"invitations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"status":{"type":"string"},"roles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"invitedBySubjectId":{"type":["string","null"]},"invitedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]}},"required":["id","email","status","roles"],"additionalProperties":false}},"total":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalPages":{"type":"number"}},"required":["invitations","total","page","pageSize","totalPages"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/contexts/{type}/{id}/invitations/{subjectId}/resend":{"post":{"description":"Resends an invitation email to a user with a pending invitation","summary":"Resend invitation","tags":["authorization"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"subjectId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"path","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"path","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"path","schema":{"type":"boolean"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"newExpiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["success","message"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/contexts/{type}/{id}/invitations/{subjectId}":{"delete":{"description":"Revokes a pending invitation and removes the subject from the context","summary":"Revoke invitation","tags":["authorization"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"subjectId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"path","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"path","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"path","schema":{"type":"boolean"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/contexts/{type}/{id}/users/{subjectId}/disable":{"post":{"description":"Disables a user in this context: they lose access to it and keep every other context. With scope \"global\" (root and platform admins only), disables them on the whole platform, preventing them from logging in","summary":"Disable user","tags":["authorization"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"subjectId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"path","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"path","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"path","schema":{"type":"boolean"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"},"scope":{"type":"string","enum":["context","global"]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"disabledAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["success","message"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/contexts/{type}/{id}/users/{subjectId}/mode-access":{"put":{"description":"Sets which modes the user's roles in this context hold in: test and live, test only or live only. Applies to every role the user holds here, and to roles assigned to them here later. A caller can give only the modes it holds itself.","summary":"Set a user's access to test and live mode","tags":["authorization"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"subjectId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"path","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"path","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"path","schema":{"type":"boolean"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"modeAccess":{"type":"string","enum":["both","test","live"]}},"required":["modeAccess"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"modeAccess":{"type":"string","enum":["both","test","live"]},"assignments":{"type":"number"}},"required":["modeAccess","assignments"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/authz/contexts/{type}/{id}/users/{subjectId}/enable":{"post":{"description":"Re-enables a user disabled in this context, with the roles they had in it. With scope \"global\" (root and platform admins only), lifts a platform-wide disable","summary":"Enable user","tags":["authorization"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["organization","partner","customer"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"subjectId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"organizationId","in":"path","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"path","schema":{"type":"string","enum":["live","test"]}},{"name":"onBehalf","in":"path","schema":{"type":"boolean"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["context","global"]}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/transactions":{"get":{"description":"Search and retrieve transactions with pagination and filtering.","summary":"Search transactions","tags":["transactions"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"customerId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"page","in":"query","schema":{"default":1,"type":"number","minimum":1}},{"name":"limit","in":"query","schema":{"default":100,"type":"number","minimum":1}},{"name":"dateRange","in":"query","style":"deepObject","schema":{"type":"object","properties":{"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}}}},{"name":"refresh","in":"query","schema":{"type":"boolean"}},{"name":"manual","in":"query","schema":{"type":"boolean"}},{"name":"reconciliation","in":"query","description":"Filter transactions by their reconciliation outcome","schema":{"type":"string","enum":["open","mismatch","unresolved","matched"]}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["state","statusCode","extStatusCode","statusMessage","paymentType","paymentOption","transactionType","rail","custodian","deviceType","importBatchId","appSlugId","customerName","txRefId","user.email","user.maskedAccount","user.countryCode","user.customerRefId","amount.amt","amount.cy","txAmount.amt","baseAmount.amt","txFee.amt","provider","providerAccount","providerTxId","providerFee.amt"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerName":{"type":"string"},"applicationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"appSlugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"txRefId":{"type":"string","maxLength":255},"originTxId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"paymentType":{"type":"string","enum":["card","bank","ewallet","crypto","invoice","other"]},"paymentOption":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"transactionType":{"type":"string","enum":["debit","credit","refund","auth","capture","void","cancel","chargeback","3ds"]},"state":{"type":"string","enum":["success","processing","waiting","approval","declined","unknown","error","cancelled"],"description":"Payment transaction state"},"statusCode":{"type":"string","enum":["approved","manually_approved","do_not_honor","suspected_fraud","invalid_trx","invalid_amt","invalid_account","invalid_response","no_transaction","restricted_card","insufficient_funds","expired_card","trx_not_permitted","exceeds_limit","exceeds_frequency","invalid_cvv","issuer_err","dest_not_found","psp_malfunction","psp_routing_error","unable_to_authorize","3ds_auth_failure","psp_limits_reached","psp_timeout","user_aborted_trx","avs_response","no_auth_corresponding","already_captured","already_cancelled","already_refunded","unknown_card","currency_not_supported","amt_over_max","amt_under_min","mobile_block","email_block","ip_block","bin_block","device_block","user_block","account_block","risk_block","duplicate_trx","already_chargedback","too_old_to_refund","no_partial_refund","partial_refund_over","redirect","redirect_timeout","blocked","processing","routing_error","system_error","psp_error","bad_request","other"],"description":"Harmonized response codes"},"extStatusCode":{"type":"string"},"statusMessage":{"type":"string"},"amount":{"type":"object","properties":{"amt":{"type":"string","pattern":"^-?(?:0|[1-9][0-9]{0,17})(?:\\.[0-9]{0,17}[1-9])?$","description":"Decimal amount as a canonical string"},"cy":{"type":"string","enum":["USD","EUR","GBP","JPY","CHF","CAD","AUD","SEK","NOK","DKK","PLN","CZK","HUF","RUB","CNY","INR","KRW","SGD","HKD","NZD","MXN","BRL","ZAR","TRY","ILS","THB","MYR","IDR","PHP","VND","JOD","KWD","BHD","OMR","TND","LYD","CLP","COP","PEN","ARS","UYU","EGP","MAD","NGN","KES","GHS","BWP","ZMW","UGX","TZS","ETB","RWF","MUR","SCR","BTC","ETH","LTC","BCH","XRP","ADA","DOT","LINK","XLM","DOGE","BNB","SOL","MATIC","AVAX","ATOM","ALGO","TRX","USDT","USDC","DAI"]}},"required":["amt","cy"],"additionalProperties":false,"description":"Monetary amount with currency, amount as a canonical decimal string"},"txAmount":{"type":"object","properties":{"amt":{"type":"string","pattern":"^-?(?:0|[1-9][0-9]{0,17})(?:\\.[0-9]{0,17}[1-9])?$","description":"Decimal amount as a canonical string"},"cy":{"type":"string","enum":["USD","EUR","GBP","JPY","CHF","CAD","AUD","SEK","NOK","DKK","PLN","CZK","HUF","RUB","CNY","INR","KRW","SGD","HKD","NZD","MXN","BRL","ZAR","TRY","ILS","THB","MYR","IDR","PHP","VND","JOD","KWD","BHD","OMR","TND","LYD","CLP","COP","PEN","ARS","UYU","EGP","MAD","NGN","KES","GHS","BWP","ZMW","UGX","TZS","ETB","RWF","MUR","SCR","BTC","ETH","LTC","BCH","XRP","ADA","DOT","LINK","XLM","DOGE","BNB","SOL","MATIC","AVAX","ATOM","ALGO","TRX","USDT","USDC","DAI"]}},"required":["amt","cy"],"additionalProperties":false,"description":"Monetary amount with currency, amount as a canonical decimal string"},"txFee":{"type":"object","properties":{"amt":{"type":"string","pattern":"^-?(?:0|[1-9][0-9]{0,17})(?:\\.[0-9]{0,17}[1-9])?$","description":"Decimal amount as a canonical string"},"cy":{"type":"string","enum":["USD","EUR","GBP","JPY","CHF","CAD","AUD","SEK","NOK","DKK","PLN","CZK","HUF","RUB","CNY","INR","KRW","SGD","HKD","NZD","MXN","BRL","ZAR","TRY","ILS","THB","MYR","IDR","PHP","VND","JOD","KWD","BHD","OMR","TND","LYD","CLP","COP","PEN","ARS","UYU","EGP","MAD","NGN","KES","GHS","BWP","ZMW","UGX","TZS","ETB","RWF","MUR","SCR","BTC","ETH","LTC","BCH","XRP","ADA","DOT","LINK","XLM","DOGE","BNB","SOL","MATIC","AVAX","ATOM","ALGO","TRX","USDT","USDC","DAI"]}},"required":["amt","cy"],"additionalProperties":false,"description":"Monetary amount with currency, amount as a canonical decimal string"},"providerFee":{"type":"object","properties":{"amt":{"type":"string","pattern":"^-?(?:0|[1-9][0-9]{0,17})(?:\\.[0-9]{0,17}[1-9])?$","description":"Decimal amount as a canonical string"},"cy":{"type":"string","enum":["USD","EUR","GBP","JPY","CHF","CAD","AUD","SEK","NOK","DKK","PLN","CZK","HUF","RUB","CNY","INR","KRW","SGD","HKD","NZD","MXN","BRL","ZAR","TRY","ILS","THB","MYR","IDR","PHP","VND","JOD","KWD","BHD","OMR","TND","LYD","CLP","COP","PEN","ARS","UYU","EGP","MAD","NGN","KES","GHS","BWP","ZMW","UGX","TZS","ETB","RWF","MUR","SCR","BTC","ETH","LTC","BCH","XRP","ADA","DOT","LINK","XLM","DOGE","BNB","SOL","MATIC","AVAX","ATOM","ALGO","TRX","USDT","USDC","DAI"]}},"required":["amt","cy"],"additionalProperties":false,"description":"Monetary amount with currency, amount as a canonical decimal string"},"baseAmount":{"type":"object","properties":{"amt":{"type":"string","pattern":"^-?(?:0|[1-9][0-9]{0,17})(?:\\.[0-9]{0,17}[1-9])?$","description":"Decimal amount as a canonical string"},"cy":{"type":"string","enum":["USD","EUR","GBP","JPY","CHF","CAD","AUD","SEK","NOK","DKK","PLN","CZK","HUF","RUB","CNY","INR","KRW","SGD","HKD","NZD","MXN","BRL","ZAR","TRY","ILS","THB","MYR","IDR","PHP","VND","JOD","KWD","BHD","OMR","TND","LYD","CLP","COP","PEN","ARS","UYU","EGP","MAD","NGN","KES","GHS","BWP","ZMW","UGX","TZS","ETB","RWF","MUR","SCR","BTC","ETH","LTC","BCH","XRP","ADA","DOT","LINK","XLM","DOGE","BNB","SOL","MATIC","AVAX","ATOM","ALGO","TRX","USDT","USDC","DAI"]}},"required":["amt","cy"],"additionalProperties":false,"description":"Monetary amount with currency, amount as a canonical decimal string"},"user":{"type":"object","properties":{"userId":{"type":"string"},"email":{"type":"string"},"maskedAccount":{"type":"string"},"countryCode":{"type":"string"},"customerRefId":{"type":"string"}},"additionalProperties":false},"provider":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerAccount":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerTxId":{"type":"string"},"providerUserId":{"type":"string"},"card":{"type":"object","properties":{"cardNumber":{"type":"string"},"cvv":{"type":"string"},"expiryMonth":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"expiryYear":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cardHolderName":{"type":"string"}},"required":["cardNumber"],"additionalProperties":false},"callbackUrl":{"type":"string","format":"uri"},"deviceType":{"type":"string","enum":["desktop","mobile","tablet","unknown"]},"rail":{"type":"string","enum":["visa","mastercard","amex","diners","discover","jcb","unionpay","maestro","elo","mir","hipercard","hiper","dankort","rupay","electron","sepa-ct","sepa-dd","sepa-inst","iban","swift","ideal","bancontact","swish","faster-payments","bacs","ach","fedwire","paypal","klarna","apple-pay","google-pay","bitcoin","bitcoin-cash","litecoin","dogecoin","ethereum","arbitrum","base","polygon","optimism","bnb-smart-chain","avalanche","solana","tron","xrp-ledger","stellar","cardano","unknown"]},"custodian":{"type":"string","maxLength":100},"subjectId":{"type":"string"},"importBatchId":{"type":"string"},"workflowId":{"type":"string"},"pendingRedirectUrl":{"type":"string"},"checkoutId":{"type":"string"},"checkoutVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"checkoutVariantId":{"type":"string"},"checkoutExperimentId":{"type":"string"},"checkoutArmId":{"type":"string"},"checkoutTokenId":{"type":"string"},"checkoutSessionId":{"type":"string"},"routingAttempts":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string"},"slugId":{"type":"string"},"provider":{"type":"string"},"state":{"type":"string"},"statusCode":{"type":"string"},"statusMessage":{"type":"string"},"failedOver":{"type":"boolean"},"skipped":{"type":"boolean"},"providerTxId":{"type":"string"}},"required":["service","slugId"],"additionalProperties":false}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["organizationId","customerId","id","createdAt","updatedAt"],"additionalProperties":false,"description":"Transaction data"}},"meta":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"},"total":{"type":"number"}},"required":["page","pageSize","hasMore"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/transactions/{id}":{"get":{"description":"Retrieve a single transaction by its ID.","summary":"Get transaction by ID","tags":["transactions"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Transaction data","content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerName":{"type":"string"},"applicationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"appSlugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"txRefId":{"type":"string","maxLength":255},"originTxId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"paymentType":{"type":"string","enum":["card","bank","ewallet","crypto","invoice","other"]},"paymentOption":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"transactionType":{"type":"string","enum":["debit","credit","refund","auth","capture","void","cancel","chargeback","3ds"]},"state":{"type":"string","enum":["success","processing","waiting","approval","declined","unknown","error","cancelled"],"description":"Payment transaction state"},"statusCode":{"type":"string","enum":["approved","manually_approved","do_not_honor","suspected_fraud","invalid_trx","invalid_amt","invalid_account","invalid_response","no_transaction","restricted_card","insufficient_funds","expired_card","trx_not_permitted","exceeds_limit","exceeds_frequency","invalid_cvv","issuer_err","dest_not_found","psp_malfunction","psp_routing_error","unable_to_authorize","3ds_auth_failure","psp_limits_reached","psp_timeout","user_aborted_trx","avs_response","no_auth_corresponding","already_captured","already_cancelled","already_refunded","unknown_card","currency_not_supported","amt_over_max","amt_under_min","mobile_block","email_block","ip_block","bin_block","device_block","user_block","account_block","risk_block","duplicate_trx","already_chargedback","too_old_to_refund","no_partial_refund","partial_refund_over","redirect","redirect_timeout","blocked","processing","routing_error","system_error","psp_error","bad_request","other"],"description":"Harmonized response codes"},"extStatusCode":{"type":"string"},"statusMessage":{"type":"string"},"amount":{"type":"object","properties":{"amt":{"type":"string","pattern":"^-?(?:0|[1-9][0-9]{0,17})(?:\\.[0-9]{0,17}[1-9])?$","description":"Decimal amount as a canonical string"},"cy":{"type":"string","enum":["USD","EUR","GBP","JPY","CHF","CAD","AUD","SEK","NOK","DKK","PLN","CZK","HUF","RUB","CNY","INR","KRW","SGD","HKD","NZD","MXN","BRL","ZAR","TRY","ILS","THB","MYR","IDR","PHP","VND","JOD","KWD","BHD","OMR","TND","LYD","CLP","COP","PEN","ARS","UYU","EGP","MAD","NGN","KES","GHS","BWP","ZMW","UGX","TZS","ETB","RWF","MUR","SCR","BTC","ETH","LTC","BCH","XRP","ADA","DOT","LINK","XLM","DOGE","BNB","SOL","MATIC","AVAX","ATOM","ALGO","TRX","USDT","USDC","DAI"]}},"required":["amt","cy"],"additionalProperties":false,"description":"Monetary amount with currency, amount as a canonical decimal string"},"txAmount":{"type":"object","properties":{"amt":{"type":"string","pattern":"^-?(?:0|[1-9][0-9]{0,17})(?:\\.[0-9]{0,17}[1-9])?$","description":"Decimal amount as a canonical string"},"cy":{"type":"string","enum":["USD","EUR","GBP","JPY","CHF","CAD","AUD","SEK","NOK","DKK","PLN","CZK","HUF","RUB","CNY","INR","KRW","SGD","HKD","NZD","MXN","BRL","ZAR","TRY","ILS","THB","MYR","IDR","PHP","VND","JOD","KWD","BHD","OMR","TND","LYD","CLP","COP","PEN","ARS","UYU","EGP","MAD","NGN","KES","GHS","BWP","ZMW","UGX","TZS","ETB","RWF","MUR","SCR","BTC","ETH","LTC","BCH","XRP","ADA","DOT","LINK","XLM","DOGE","BNB","SOL","MATIC","AVAX","ATOM","ALGO","TRX","USDT","USDC","DAI"]}},"required":["amt","cy"],"additionalProperties":false,"description":"Monetary amount with currency, amount as a canonical decimal string"},"txFee":{"type":"object","properties":{"amt":{"type":"string","pattern":"^-?(?:0|[1-9][0-9]{0,17})(?:\\.[0-9]{0,17}[1-9])?$","description":"Decimal amount as a canonical string"},"cy":{"type":"string","enum":["USD","EUR","GBP","JPY","CHF","CAD","AUD","SEK","NOK","DKK","PLN","CZK","HUF","RUB","CNY","INR","KRW","SGD","HKD","NZD","MXN","BRL","ZAR","TRY","ILS","THB","MYR","IDR","PHP","VND","JOD","KWD","BHD","OMR","TND","LYD","CLP","COP","PEN","ARS","UYU","EGP","MAD","NGN","KES","GHS","BWP","ZMW","UGX","TZS","ETB","RWF","MUR","SCR","BTC","ETH","LTC","BCH","XRP","ADA","DOT","LINK","XLM","DOGE","BNB","SOL","MATIC","AVAX","ATOM","ALGO","TRX","USDT","USDC","DAI"]}},"required":["amt","cy"],"additionalProperties":false,"description":"Monetary amount with currency, amount as a canonical decimal string"},"providerFee":{"type":"object","properties":{"amt":{"type":"string","pattern":"^-?(?:0|[1-9][0-9]{0,17})(?:\\.[0-9]{0,17}[1-9])?$","description":"Decimal amount as a canonical string"},"cy":{"type":"string","enum":["USD","EUR","GBP","JPY","CHF","CAD","AUD","SEK","NOK","DKK","PLN","CZK","HUF","RUB","CNY","INR","KRW","SGD","HKD","NZD","MXN","BRL","ZAR","TRY","ILS","THB","MYR","IDR","PHP","VND","JOD","KWD","BHD","OMR","TND","LYD","CLP","COP","PEN","ARS","UYU","EGP","MAD","NGN","KES","GHS","BWP","ZMW","UGX","TZS","ETB","RWF","MUR","SCR","BTC","ETH","LTC","BCH","XRP","ADA","DOT","LINK","XLM","DOGE","BNB","SOL","MATIC","AVAX","ATOM","ALGO","TRX","USDT","USDC","DAI"]}},"required":["amt","cy"],"additionalProperties":false,"description":"Monetary amount with currency, amount as a canonical decimal string"},"baseAmount":{"type":"object","properties":{"amt":{"type":"string","pattern":"^-?(?:0|[1-9][0-9]{0,17})(?:\\.[0-9]{0,17}[1-9])?$","description":"Decimal amount as a canonical string"},"cy":{"type":"string","enum":["USD","EUR","GBP","JPY","CHF","CAD","AUD","SEK","NOK","DKK","PLN","CZK","HUF","RUB","CNY","INR","KRW","SGD","HKD","NZD","MXN","BRL","ZAR","TRY","ILS","THB","MYR","IDR","PHP","VND","JOD","KWD","BHD","OMR","TND","LYD","CLP","COP","PEN","ARS","UYU","EGP","MAD","NGN","KES","GHS","BWP","ZMW","UGX","TZS","ETB","RWF","MUR","SCR","BTC","ETH","LTC","BCH","XRP","ADA","DOT","LINK","XLM","DOGE","BNB","SOL","MATIC","AVAX","ATOM","ALGO","TRX","USDT","USDC","DAI"]}},"required":["amt","cy"],"additionalProperties":false,"description":"Monetary amount with currency, amount as a canonical decimal string"},"user":{"type":"object","properties":{"userId":{"type":"string"},"email":{"type":"string"},"maskedAccount":{"type":"string"},"countryCode":{"type":"string"},"customerRefId":{"type":"string"}},"additionalProperties":false},"provider":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerAccount":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerTxId":{"type":"string"},"providerUserId":{"type":"string"},"card":{"type":"object","properties":{"cardNumber":{"type":"string"},"cvv":{"type":"string"},"expiryMonth":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"expiryYear":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cardHolderName":{"type":"string"}},"required":["cardNumber"],"additionalProperties":false},"callbackUrl":{"type":"string","format":"uri"},"deviceType":{"type":"string","enum":["desktop","mobile","tablet","unknown"]},"rail":{"type":"string","enum":["visa","mastercard","amex","diners","discover","jcb","unionpay","maestro","elo","mir","hipercard","hiper","dankort","rupay","electron","sepa-ct","sepa-dd","sepa-inst","iban","swift","ideal","bancontact","swish","faster-payments","bacs","ach","fedwire","paypal","klarna","apple-pay","google-pay","bitcoin","bitcoin-cash","litecoin","dogecoin","ethereum","arbitrum","base","polygon","optimism","bnb-smart-chain","avalanche","solana","tron","xrp-ledger","stellar","cardano","unknown"]},"custodian":{"type":"string","maxLength":100},"subjectId":{"type":"string"},"importBatchId":{"type":"string"},"workflowId":{"type":"string"},"pendingRedirectUrl":{"type":"string"},"checkoutId":{"type":"string"},"checkoutVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"checkoutVariantId":{"type":"string"},"checkoutExperimentId":{"type":"string"},"checkoutArmId":{"type":"string"},"checkoutTokenId":{"type":"string"},"checkoutSessionId":{"type":"string"},"routingAttempts":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string"},"slugId":{"type":"string"},"provider":{"type":"string"},"state":{"type":"string"},"statusCode":{"type":"string"},"statusMessage":{"type":"string"},"failedOver":{"type":"boolean"},"skipped":{"type":"boolean"},"providerTxId":{"type":"string"}},"required":["service","slugId"],"additionalProperties":false}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["organizationId","customerId","id","createdAt","updatedAt"],"additionalProperties":false,"description":"Transaction data"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/transactions/{id}/workflow-steps":{"get":{"description":"Retrieve workflow step events for a specific transaction. Withheld in a customer context unless the organization runs as a gateway: the trace is the platform's internal processing record and names every provider it touched.","summary":"Get workflow steps for a transaction","tags":["transactions"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string"},"workflowId":{"type":"string"},"workflowName":{"type":"string"},"stepName":{"type":"string"},"status":{"type":"string"},"data":{},"error":{"type":"string"},"completedAt":{"type":"string"},"durationMs":{"type":"number"},"order":{"type":"number"}},"required":["timestamp","workflowId","workflowName","stepName","status"],"additionalProperties":{},"description":"Workflow step event"}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/transactions/export/csv":{"get":{"description":"Stream a CSV export of transactions matching the given filters.","summary":"Export transactions as CSV","tags":["transactions"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"customerId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"manual","in":"query","schema":{"type":"boolean"}},{"name":"dateRange","in":"query","style":"deepObject","schema":{"type":"object","properties":{"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}}}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["state","statusCode","extStatusCode","statusMessage","paymentType","paymentOption","transactionType","rail","custodian","deviceType","importBatchId","appSlugId","customerName","txRefId","user.email","user.maskedAccount","user.countryCode","user.customerRefId","amount.amt","amount.cy","txAmount.amt","baseAmount.amt","txFee.amt","provider","providerAccount","providerTxId","providerFee.amt"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/reconciliations":{"get":{"description":"Search transaction reconciliation records. Defaults to open findings (mismatch/unresolved with no resolution) when `openOnly` is set.","summary":"Search reconciliation records","tags":["reconciliations"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"customerId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"page","in":"query","schema":{"default":1,"type":"number","minimum":1}},{"name":"limit","in":"query","schema":{"default":100,"type":"number","minimum":1}},{"name":"dateRange","in":"query","style":"deepObject","schema":{"type":"object","properties":{"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}}}},{"name":"refresh","in":"query","schema":{"type":"boolean"}},{"name":"openOnly","in":"query","schema":{"type":"boolean"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["status","severity","mismatchKind","resolution","transactionType","provider","providerAccount","providerTxId","transactionId","appSlugId","customerName","localState","localStatusCode","providerState","providerStatusCode","providerExtStatusCode","duplicateGroup","lastError","attempts","amount.amt","amount.cy"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"attemptNo":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"appSlugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"provider":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerAccount":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerTxId":{"type":"string"},"localState":{"type":"string","enum":["success","processing","waiting","approval","declined","unknown","error","cancelled"],"description":"Payment transaction state"},"localStatusCode":{"type":"string","enum":["approved","manually_approved","do_not_honor","suspected_fraud","invalid_trx","invalid_amt","invalid_account","invalid_response","no_transaction","restricted_card","insufficient_funds","expired_card","trx_not_permitted","exceeds_limit","exceeds_frequency","invalid_cvv","issuer_err","dest_not_found","psp_malfunction","psp_routing_error","unable_to_authorize","3ds_auth_failure","psp_limits_reached","psp_timeout","user_aborted_trx","avs_response","no_auth_corresponding","already_captured","already_cancelled","already_refunded","unknown_card","currency_not_supported","amt_over_max","amt_under_min","mobile_block","email_block","ip_block","bin_block","device_block","user_block","account_block","risk_block","duplicate_trx","already_chargedback","too_old_to_refund","no_partial_refund","partial_refund_over","redirect","redirect_timeout","blocked","processing","routing_error","system_error","psp_error","bad_request","other"],"description":"Harmonized response codes"},"providerState":{"type":"string","enum":["success","processing","waiting","approval","declined","unknown","error","cancelled"],"description":"Payment transaction state"},"providerStatusCode":{"type":"string","enum":["approved","manually_approved","do_not_honor","suspected_fraud","invalid_trx","invalid_amt","invalid_account","invalid_response","no_transaction","restricted_card","insufficient_funds","expired_card","trx_not_permitted","exceeds_limit","exceeds_frequency","invalid_cvv","issuer_err","dest_not_found","psp_malfunction","psp_routing_error","unable_to_authorize","3ds_auth_failure","psp_limits_reached","psp_timeout","user_aborted_trx","avs_response","no_auth_corresponding","already_captured","already_cancelled","already_refunded","unknown_card","currency_not_supported","amt_over_max","amt_under_min","mobile_block","email_block","ip_block","bin_block","device_block","user_block","account_block","risk_block","duplicate_trx","already_chargedback","too_old_to_refund","no_partial_refund","partial_refund_over","redirect","redirect_timeout","blocked","processing","routing_error","system_error","psp_error","bad_request","other"],"description":"Harmonized response codes"},"providerExtStatusCode":{"type":"string"},"providerResponse":{},"providerTimestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"providerOrderId":{"type":"string"},"duplicateGroup":{"type":"string"},"localRecordCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"providerRecordCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"amount":{"type":"object","properties":{"amt":{"type":"string","pattern":"^-?(?:0|[1-9][0-9]{0,17})(?:\\.[0-9]{0,17}[1-9])?$","description":"Decimal amount as a canonical string"},"cy":{"type":"string","enum":["USD","EUR","GBP","JPY","CHF","CAD","AUD","SEK","NOK","DKK","PLN","CZK","HUF","RUB","CNY","INR","KRW","SGD","HKD","NZD","MXN","BRL","ZAR","TRY","ILS","THB","MYR","IDR","PHP","VND","JOD","KWD","BHD","OMR","TND","LYD","CLP","COP","PEN","ARS","UYU","EGP","MAD","NGN","KES","GHS","BWP","ZMW","UGX","TZS","ETB","RWF","MUR","SCR","BTC","ETH","LTC","BCH","XRP","ADA","DOT","LINK","XLM","DOGE","BNB","SOL","MATIC","AVAX","ATOM","ALGO","TRX","USDT","USDC","DAI"]}},"required":["amt","cy"],"additionalProperties":false,"description":"Monetary amount with currency, amount as a canonical decimal string"},"transactionCreatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"transactionType":{"type":"string","enum":["debit","credit","refund","auth","capture","void","cancel","chargeback","3ds"]},"customerName":{"type":"string"},"status":{"type":"string","enum":["pending","matched","repaired","mismatch","unresolved","skipped","error"],"description":"Reconciliation record status"},"mismatchKind":{"type":"string","enum":["local_success_provider_failed","local_success_provider_stuck","local_failed_provider_success","local_pending_provider_final","state_drift","duplicate_local","duplicate_provider","abandoned_attempt_double_charge","abandoned_attempt_stranded"],"description":"Kind of disagreement between our record and the provider's"},"severity":{"type":"string","enum":["critical","high","low"],"description":"Operational severity of a mismatch"},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"nextCheckAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastCheckedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastError":{"type":"string"},"resolution":{"type":"string","enum":["auto_repaired","corrected","dismissed"],"description":"How a reconciliation finding was resolved"},"resolvedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"resolvedBy":{"type":"string"},"resolutionNote":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","transactionId","attemptNo","status","attempts","createdAt","updatedAt"],"additionalProperties":false,"description":"Reconciliation record for a single transaction"}},"meta":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"},"total":{"type":"number"}},"required":["page","pageSize","hasMore"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/reconciliations/summary":{"get":{"description":"Aggregate open-finding counts by severity for the caller's context.","summary":"Reconciliation summary counts","tags":["reconciliations"],"parameters":[],"responses":{"200":{"description":"Aggregate reconciliation counts for the caller's context","content":{"application/json":{"schema":{"type":"object","properties":{"critical":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"high":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"low":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"open":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastSweptAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["critical","high","low","open"],"additionalProperties":false,"description":"Aggregate reconciliation counts for the caller's context"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/reconciliations/flags":{"post":{"description":"Return reconciliation flags for the given transaction ids, for decorating a transactions list page.","summary":"Batch reconciliation flags","tags":["reconciliations"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"transactionIds":{"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["transactionIds"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["pending","matched","repaired","mismatch","unresolved","skipped","error"],"description":"Reconciliation record status"},"mismatchKind":{"type":"string","enum":["local_success_provider_failed","local_success_provider_stuck","local_failed_provider_success","local_pending_provider_final","state_drift","duplicate_local","duplicate_provider","abandoned_attempt_double_charge","abandoned_attempt_stranded"],"description":"Kind of disagreement between our record and the provider's"},"severity":{"type":"string","enum":["critical","high","low"],"description":"Operational severity of a mismatch"},"providerState":{"type":"string","enum":["success","processing","waiting","approval","declined","unknown","error","cancelled"],"description":"Payment transaction state"}},"required":["transactionId","status"],"additionalProperties":false}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/reconciliations/transaction/{transactionId}":{"get":{"summary":"Get a transaction's reconciliation findings, one per attempt","tags":["reconciliations"],"parameters":[{"name":"transactionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"attemptNo":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"appSlugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"provider":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerAccount":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerTxId":{"type":"string"},"localState":{"type":"string","enum":["success","processing","waiting","approval","declined","unknown","error","cancelled"],"description":"Payment transaction state"},"localStatusCode":{"type":"string","enum":["approved","manually_approved","do_not_honor","suspected_fraud","invalid_trx","invalid_amt","invalid_account","invalid_response","no_transaction","restricted_card","insufficient_funds","expired_card","trx_not_permitted","exceeds_limit","exceeds_frequency","invalid_cvv","issuer_err","dest_not_found","psp_malfunction","psp_routing_error","unable_to_authorize","3ds_auth_failure","psp_limits_reached","psp_timeout","user_aborted_trx","avs_response","no_auth_corresponding","already_captured","already_cancelled","already_refunded","unknown_card","currency_not_supported","amt_over_max","amt_under_min","mobile_block","email_block","ip_block","bin_block","device_block","user_block","account_block","risk_block","duplicate_trx","already_chargedback","too_old_to_refund","no_partial_refund","partial_refund_over","redirect","redirect_timeout","blocked","processing","routing_error","system_error","psp_error","bad_request","other"],"description":"Harmonized response codes"},"providerState":{"type":"string","enum":["success","processing","waiting","approval","declined","unknown","error","cancelled"],"description":"Payment transaction state"},"providerStatusCode":{"type":"string","enum":["approved","manually_approved","do_not_honor","suspected_fraud","invalid_trx","invalid_amt","invalid_account","invalid_response","no_transaction","restricted_card","insufficient_funds","expired_card","trx_not_permitted","exceeds_limit","exceeds_frequency","invalid_cvv","issuer_err","dest_not_found","psp_malfunction","psp_routing_error","unable_to_authorize","3ds_auth_failure","psp_limits_reached","psp_timeout","user_aborted_trx","avs_response","no_auth_corresponding","already_captured","already_cancelled","already_refunded","unknown_card","currency_not_supported","amt_over_max","amt_under_min","mobile_block","email_block","ip_block","bin_block","device_block","user_block","account_block","risk_block","duplicate_trx","already_chargedback","too_old_to_refund","no_partial_refund","partial_refund_over","redirect","redirect_timeout","blocked","processing","routing_error","system_error","psp_error","bad_request","other"],"description":"Harmonized response codes"},"providerExtStatusCode":{"type":"string"},"providerResponse":{},"providerTimestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"providerOrderId":{"type":"string"},"duplicateGroup":{"type":"string"},"localRecordCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"providerRecordCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"amount":{"type":"object","properties":{"amt":{"type":"string","pattern":"^-?(?:0|[1-9][0-9]{0,17})(?:\\.[0-9]{0,17}[1-9])?$","description":"Decimal amount as a canonical string"},"cy":{"type":"string","enum":["USD","EUR","GBP","JPY","CHF","CAD","AUD","SEK","NOK","DKK","PLN","CZK","HUF","RUB","CNY","INR","KRW","SGD","HKD","NZD","MXN","BRL","ZAR","TRY","ILS","THB","MYR","IDR","PHP","VND","JOD","KWD","BHD","OMR","TND","LYD","CLP","COP","PEN","ARS","UYU","EGP","MAD","NGN","KES","GHS","BWP","ZMW","UGX","TZS","ETB","RWF","MUR","SCR","BTC","ETH","LTC","BCH","XRP","ADA","DOT","LINK","XLM","DOGE","BNB","SOL","MATIC","AVAX","ATOM","ALGO","TRX","USDT","USDC","DAI"]}},"required":["amt","cy"],"additionalProperties":false,"description":"Monetary amount with currency, amount as a canonical decimal string"},"transactionCreatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"transactionType":{"type":"string","enum":["debit","credit","refund","auth","capture","void","cancel","chargeback","3ds"]},"customerName":{"type":"string"},"status":{"type":"string","enum":["pending","matched","repaired","mismatch","unresolved","skipped","error"],"description":"Reconciliation record status"},"mismatchKind":{"type":"string","enum":["local_success_provider_failed","local_success_provider_stuck","local_failed_provider_success","local_pending_provider_final","state_drift","duplicate_local","duplicate_provider","abandoned_attempt_double_charge","abandoned_attempt_stranded"],"description":"Kind of disagreement between our record and the provider's"},"severity":{"type":"string","enum":["critical","high","low"],"description":"Operational severity of a mismatch"},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"nextCheckAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastCheckedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastError":{"type":"string"},"resolution":{"type":"string","enum":["auto_repaired","corrected","dismissed"],"description":"How a reconciliation finding was resolved"},"resolvedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"resolvedBy":{"type":"string"},"resolutionNote":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","transactionId","attemptNo","status","attempts","createdAt","updatedAt"],"additionalProperties":false,"description":"Reconciliation record for a single transaction"}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/reconciliations/transaction/{transactionId}/check":{"post":{"description":"Performs an immediate provider status lookup for each of the transaction's routing attempts — the winning one and any the failover cascade walked away from — and records the outcomes. Returns one finding per attempt, winner first. Safe: never applies a final-state correction, and an abandoned attempt never writes to the transaction at all.","summary":"Check every attempt of a transaction against its provider now","tags":["reconciliations"],"parameters":[{"name":"transactionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"attemptNo":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"appSlugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"provider":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerAccount":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerTxId":{"type":"string"},"localState":{"type":"string","enum":["success","processing","waiting","approval","declined","unknown","error","cancelled"],"description":"Payment transaction state"},"localStatusCode":{"type":"string","enum":["approved","manually_approved","do_not_honor","suspected_fraud","invalid_trx","invalid_amt","invalid_account","invalid_response","no_transaction","restricted_card","insufficient_funds","expired_card","trx_not_permitted","exceeds_limit","exceeds_frequency","invalid_cvv","issuer_err","dest_not_found","psp_malfunction","psp_routing_error","unable_to_authorize","3ds_auth_failure","psp_limits_reached","psp_timeout","user_aborted_trx","avs_response","no_auth_corresponding","already_captured","already_cancelled","already_refunded","unknown_card","currency_not_supported","amt_over_max","amt_under_min","mobile_block","email_block","ip_block","bin_block","device_block","user_block","account_block","risk_block","duplicate_trx","already_chargedback","too_old_to_refund","no_partial_refund","partial_refund_over","redirect","redirect_timeout","blocked","processing","routing_error","system_error","psp_error","bad_request","other"],"description":"Harmonized response codes"},"providerState":{"type":"string","enum":["success","processing","waiting","approval","declined","unknown","error","cancelled"],"description":"Payment transaction state"},"providerStatusCode":{"type":"string","enum":["approved","manually_approved","do_not_honor","suspected_fraud","invalid_trx","invalid_amt","invalid_account","invalid_response","no_transaction","restricted_card","insufficient_funds","expired_card","trx_not_permitted","exceeds_limit","exceeds_frequency","invalid_cvv","issuer_err","dest_not_found","psp_malfunction","psp_routing_error","unable_to_authorize","3ds_auth_failure","psp_limits_reached","psp_timeout","user_aborted_trx","avs_response","no_auth_corresponding","already_captured","already_cancelled","already_refunded","unknown_card","currency_not_supported","amt_over_max","amt_under_min","mobile_block","email_block","ip_block","bin_block","device_block","user_block","account_block","risk_block","duplicate_trx","already_chargedback","too_old_to_refund","no_partial_refund","partial_refund_over","redirect","redirect_timeout","blocked","processing","routing_error","system_error","psp_error","bad_request","other"],"description":"Harmonized response codes"},"providerExtStatusCode":{"type":"string"},"providerResponse":{},"providerTimestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"providerOrderId":{"type":"string"},"duplicateGroup":{"type":"string"},"localRecordCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"providerRecordCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"amount":{"type":"object","properties":{"amt":{"type":"string","pattern":"^-?(?:0|[1-9][0-9]{0,17})(?:\\.[0-9]{0,17}[1-9])?$","description":"Decimal amount as a canonical string"},"cy":{"type":"string","enum":["USD","EUR","GBP","JPY","CHF","CAD","AUD","SEK","NOK","DKK","PLN","CZK","HUF","RUB","CNY","INR","KRW","SGD","HKD","NZD","MXN","BRL","ZAR","TRY","ILS","THB","MYR","IDR","PHP","VND","JOD","KWD","BHD","OMR","TND","LYD","CLP","COP","PEN","ARS","UYU","EGP","MAD","NGN","KES","GHS","BWP","ZMW","UGX","TZS","ETB","RWF","MUR","SCR","BTC","ETH","LTC","BCH","XRP","ADA","DOT","LINK","XLM","DOGE","BNB","SOL","MATIC","AVAX","ATOM","ALGO","TRX","USDT","USDC","DAI"]}},"required":["amt","cy"],"additionalProperties":false,"description":"Monetary amount with currency, amount as a canonical decimal string"},"transactionCreatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"transactionType":{"type":"string","enum":["debit","credit","refund","auth","capture","void","cancel","chargeback","3ds"]},"customerName":{"type":"string"},"status":{"type":"string","enum":["pending","matched","repaired","mismatch","unresolved","skipped","error"],"description":"Reconciliation record status"},"mismatchKind":{"type":"string","enum":["local_success_provider_failed","local_success_provider_stuck","local_failed_provider_success","local_pending_provider_final","state_drift","duplicate_local","duplicate_provider","abandoned_attempt_double_charge","abandoned_attempt_stranded"],"description":"Kind of disagreement between our record and the provider's"},"severity":{"type":"string","enum":["critical","high","low"],"description":"Operational severity of a mismatch"},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"nextCheckAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastCheckedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastError":{"type":"string"},"resolution":{"type":"string","enum":["auto_repaired","corrected","dismissed"],"description":"How a reconciliation finding was resolved"},"resolvedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"resolvedBy":{"type":"string"},"resolutionNote":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","transactionId","attemptNo","status","attempts","createdAt","updatedAt"],"additionalProperties":false,"description":"Reconciliation record for a single transaction"}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/reconciliations/check":{"post":{"summary":"Check several transactions against their providers now","tags":["reconciliations"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"transactionIds":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["transactionIds"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"checked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"attemptNo":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"appSlugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"provider":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerAccount":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerTxId":{"type":"string"},"localState":{"type":"string","enum":["success","processing","waiting","approval","declined","unknown","error","cancelled"],"description":"Payment transaction state"},"localStatusCode":{"type":"string","enum":["approved","manually_approved","do_not_honor","suspected_fraud","invalid_trx","invalid_amt","invalid_account","invalid_response","no_transaction","restricted_card","insufficient_funds","expired_card","trx_not_permitted","exceeds_limit","exceeds_frequency","invalid_cvv","issuer_err","dest_not_found","psp_malfunction","psp_routing_error","unable_to_authorize","3ds_auth_failure","psp_limits_reached","psp_timeout","user_aborted_trx","avs_response","no_auth_corresponding","already_captured","already_cancelled","already_refunded","unknown_card","currency_not_supported","amt_over_max","amt_under_min","mobile_block","email_block","ip_block","bin_block","device_block","user_block","account_block","risk_block","duplicate_trx","already_chargedback","too_old_to_refund","no_partial_refund","partial_refund_over","redirect","redirect_timeout","blocked","processing","routing_error","system_error","psp_error","bad_request","other"],"description":"Harmonized response codes"},"providerState":{"type":"string","enum":["success","processing","waiting","approval","declined","unknown","error","cancelled"],"description":"Payment transaction state"},"providerStatusCode":{"type":"string","enum":["approved","manually_approved","do_not_honor","suspected_fraud","invalid_trx","invalid_amt","invalid_account","invalid_response","no_transaction","restricted_card","insufficient_funds","expired_card","trx_not_permitted","exceeds_limit","exceeds_frequency","invalid_cvv","issuer_err","dest_not_found","psp_malfunction","psp_routing_error","unable_to_authorize","3ds_auth_failure","psp_limits_reached","psp_timeout","user_aborted_trx","avs_response","no_auth_corresponding","already_captured","already_cancelled","already_refunded","unknown_card","currency_not_supported","amt_over_max","amt_under_min","mobile_block","email_block","ip_block","bin_block","device_block","user_block","account_block","risk_block","duplicate_trx","already_chargedback","too_old_to_refund","no_partial_refund","partial_refund_over","redirect","redirect_timeout","blocked","processing","routing_error","system_error","psp_error","bad_request","other"],"description":"Harmonized response codes"},"providerExtStatusCode":{"type":"string"},"providerResponse":{},"providerTimestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"providerOrderId":{"type":"string"},"duplicateGroup":{"type":"string"},"localRecordCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"providerRecordCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"amount":{"type":"object","properties":{"amt":{"type":"string","pattern":"^-?(?:0|[1-9][0-9]{0,17})(?:\\.[0-9]{0,17}[1-9])?$","description":"Decimal amount as a canonical string"},"cy":{"type":"string","enum":["USD","EUR","GBP","JPY","CHF","CAD","AUD","SEK","NOK","DKK","PLN","CZK","HUF","RUB","CNY","INR","KRW","SGD","HKD","NZD","MXN","BRL","ZAR","TRY","ILS","THB","MYR","IDR","PHP","VND","JOD","KWD","BHD","OMR","TND","LYD","CLP","COP","PEN","ARS","UYU","EGP","MAD","NGN","KES","GHS","BWP","ZMW","UGX","TZS","ETB","RWF","MUR","SCR","BTC","ETH","LTC","BCH","XRP","ADA","DOT","LINK","XLM","DOGE","BNB","SOL","MATIC","AVAX","ATOM","ALGO","TRX","USDT","USDC","DAI"]}},"required":["amt","cy"],"additionalProperties":false,"description":"Monetary amount with currency, amount as a canonical decimal string"},"transactionCreatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"transactionType":{"type":"string","enum":["debit","credit","refund","auth","capture","void","cancel","chargeback","3ds"]},"customerName":{"type":"string"},"status":{"type":"string","enum":["pending","matched","repaired","mismatch","unresolved","skipped","error"],"description":"Reconciliation record status"},"mismatchKind":{"type":"string","enum":["local_success_provider_failed","local_success_provider_stuck","local_failed_provider_success","local_pending_provider_final","state_drift","duplicate_local","duplicate_provider","abandoned_attempt_double_charge","abandoned_attempt_stranded"],"description":"Kind of disagreement between our record and the provider's"},"severity":{"type":"string","enum":["critical","high","low"],"description":"Operational severity of a mismatch"},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"nextCheckAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastCheckedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastError":{"type":"string"},"resolution":{"type":"string","enum":["auto_repaired","corrected","dismissed"],"description":"How a reconciliation finding was resolved"},"resolvedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"resolvedBy":{"type":"string"},"resolutionNote":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","transactionId","attemptNo","status","attempts","createdAt","updatedAt"],"additionalProperties":false,"description":"Reconciliation record for a single transaction"}}},"required":["checked","failed","records"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/reconciliations/resolve":{"post":{"summary":"Dismiss several reconciliation findings","tags":["reconciliations"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"action":{"type":"string","const":"dismiss"},"note":{"type":"string","minLength":1,"maxLength":1000}},"required":["ids","action","note"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"resolved":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["resolved"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/reconciliations/{id}/resolve":{"post":{"summary":"Resolve a reconciliation finding","tags":["reconciliations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["dismiss","apply"]},"note":{"type":"string","minLength":1,"maxLength":1000}},"required":["action","note"]}}}},"responses":{"200":{"description":"Reconciliation record for a single transaction","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"attemptNo":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"appSlugId":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"provider":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerAccount":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"providerTxId":{"type":"string"},"localState":{"type":"string","enum":["success","processing","waiting","approval","declined","unknown","error","cancelled"],"description":"Payment transaction state"},"localStatusCode":{"type":"string","enum":["approved","manually_approved","do_not_honor","suspected_fraud","invalid_trx","invalid_amt","invalid_account","invalid_response","no_transaction","restricted_card","insufficient_funds","expired_card","trx_not_permitted","exceeds_limit","exceeds_frequency","invalid_cvv","issuer_err","dest_not_found","psp_malfunction","psp_routing_error","unable_to_authorize","3ds_auth_failure","psp_limits_reached","psp_timeout","user_aborted_trx","avs_response","no_auth_corresponding","already_captured","already_cancelled","already_refunded","unknown_card","currency_not_supported","amt_over_max","amt_under_min","mobile_block","email_block","ip_block","bin_block","device_block","user_block","account_block","risk_block","duplicate_trx","already_chargedback","too_old_to_refund","no_partial_refund","partial_refund_over","redirect","redirect_timeout","blocked","processing","routing_error","system_error","psp_error","bad_request","other"],"description":"Harmonized response codes"},"providerState":{"type":"string","enum":["success","processing","waiting","approval","declined","unknown","error","cancelled"],"description":"Payment transaction state"},"providerStatusCode":{"type":"string","enum":["approved","manually_approved","do_not_honor","suspected_fraud","invalid_trx","invalid_amt","invalid_account","invalid_response","no_transaction","restricted_card","insufficient_funds","expired_card","trx_not_permitted","exceeds_limit","exceeds_frequency","invalid_cvv","issuer_err","dest_not_found","psp_malfunction","psp_routing_error","unable_to_authorize","3ds_auth_failure","psp_limits_reached","psp_timeout","user_aborted_trx","avs_response","no_auth_corresponding","already_captured","already_cancelled","already_refunded","unknown_card","currency_not_supported","amt_over_max","amt_under_min","mobile_block","email_block","ip_block","bin_block","device_block","user_block","account_block","risk_block","duplicate_trx","already_chargedback","too_old_to_refund","no_partial_refund","partial_refund_over","redirect","redirect_timeout","blocked","processing","routing_error","system_error","psp_error","bad_request","other"],"description":"Harmonized response codes"},"providerExtStatusCode":{"type":"string"},"providerResponse":{},"providerTimestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"providerOrderId":{"type":"string"},"duplicateGroup":{"type":"string"},"localRecordCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"providerRecordCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"amount":{"type":"object","properties":{"amt":{"type":"string","pattern":"^-?(?:0|[1-9][0-9]{0,17})(?:\\.[0-9]{0,17}[1-9])?$","description":"Decimal amount as a canonical string"},"cy":{"type":"string","enum":["USD","EUR","GBP","JPY","CHF","CAD","AUD","SEK","NOK","DKK","PLN","CZK","HUF","RUB","CNY","INR","KRW","SGD","HKD","NZD","MXN","BRL","ZAR","TRY","ILS","THB","MYR","IDR","PHP","VND","JOD","KWD","BHD","OMR","TND","LYD","CLP","COP","PEN","ARS","UYU","EGP","MAD","NGN","KES","GHS","BWP","ZMW","UGX","TZS","ETB","RWF","MUR","SCR","BTC","ETH","LTC","BCH","XRP","ADA","DOT","LINK","XLM","DOGE","BNB","SOL","MATIC","AVAX","ATOM","ALGO","TRX","USDT","USDC","DAI"]}},"required":["amt","cy"],"additionalProperties":false,"description":"Monetary amount with currency, amount as a canonical decimal string"},"transactionCreatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"transactionType":{"type":"string","enum":["debit","credit","refund","auth","capture","void","cancel","chargeback","3ds"]},"customerName":{"type":"string"},"status":{"type":"string","enum":["pending","matched","repaired","mismatch","unresolved","skipped","error"],"description":"Reconciliation record status"},"mismatchKind":{"type":"string","enum":["local_success_provider_failed","local_success_provider_stuck","local_failed_provider_success","local_pending_provider_final","state_drift","duplicate_local","duplicate_provider","abandoned_attempt_double_charge","abandoned_attempt_stranded"],"description":"Kind of disagreement between our record and the provider's"},"severity":{"type":"string","enum":["critical","high","low"],"description":"Operational severity of a mismatch"},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"nextCheckAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastCheckedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastError":{"type":"string"},"resolution":{"type":"string","enum":["auto_repaired","corrected","dismissed"],"description":"How a reconciliation finding was resolved"},"resolvedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"resolvedBy":{"type":"string"},"resolutionNote":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","transactionId","attemptNo","status","attempts","createdAt","updatedAt"],"additionalProperties":false,"description":"Reconciliation record for a single transaction"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/platform-logs/transaction/{id}":{"get":{"description":"Every log line correlated to this transaction, within the log store's retention window.","summary":"Get the log trace for a transaction","tags":["platformLogs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string"}},{"name":"to","in":"query","schema":{"type":"string"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["traceEvent","traceOutcome","level","service","trigger","requestId","outcome","mode"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":2000}},{"name":"offset","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"string"},"level":{"type":"string"},"message":{"type":"string"},"service":{"type":"string"},"requestId":{"type":"string"},"trigger":{"type":"string"},"outcome":{"type":"string"},"error":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","timestamp","fields"],"additionalProperties":false}},"clamped":{"type":"boolean"},"from":{"type":"string"},"to":{"type":"string"},"retentionDays":{"type":"number"},"nextOffset":{"type":"string"}},"required":["events","clamped","from","to","retentionDays"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/platform-logs/search":{"get":{"summary":"Search platform logs","tags":["platformLogs"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string"}},{"name":"to","in":"query","schema":{"type":"string"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["traceEvent","traceOutcome","level","service","trigger","requestId","outcome","mode"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":2000}},{"name":"offset","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"string"},"level":{"type":"string"},"message":{"type":"string"},"service":{"type":"string"},"requestId":{"type":"string"},"trigger":{"type":"string"},"outcome":{"type":"string"},"error":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","timestamp","fields"],"additionalProperties":false}},"clamped":{"type":"boolean"},"from":{"type":"string"},"to":{"type":"string"},"retentionDays":{"type":"number"},"nextOffset":{"type":"string"}},"required":["events","clamped","from","to","retentionDays"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/platform-logs/keys":{"get":{"summary":"List available log fields","tags":["platformLogs"],"parameters":[{"name":"from","in":"query","schema":{"type":"string"}},{"name":"to","in":"query","schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean"]},"lastSeenAt":{"type":"number"}},"required":["key","type"],"additionalProperties":false}}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/transaction-imports/customers":{"get":{"description":"Customers across every organization, matched on name. Platform operator only.","summary":"Find customers to import between","tags":["transactionImports"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"organizationId":{"type":"string"},"organizationName":{"type":"string"},"businessModel":{"type":"string"}},"required":["id","name","organizationId","organizationName","businessModel"],"additionalProperties":false}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/transaction-imports/customers/{customerId}":{"get":{"description":"What an import can use at this customer. Platform operator only.","summary":"Applications and gateway accounts of a customer","tags":["transactionImports"],"parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"applications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slugId":{"type":"string"}},"required":["id","name","slugId"],"additionalProperties":false}},"accounts":{"type":"array","items":{"type":"object","properties":{"slugId":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"contextType":{"type":"string","enum":["organization","customer"]},"upstreamCustomerId":{"type":"string"},"upstreamCustomerName":{"type":"string"}},"required":["slugId","name","provider","contextType"],"additionalProperties":false}}},"required":["applications","accounts"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/transaction-imports/preview":{"post":{"description":"Counts and totals of what a batch with these settings would import. Writes nothing.","summary":"Dry run of an import","tags":["transactionImports"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"sourceCustomerId":{"type":"string","minLength":1},"targetCustomerId":{"type":"string","minLength":1},"applicationMap":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","null"]}},"createMissingApplications":{"type":"boolean"},"providerAccount":{"type":"string"},"cutoverAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["sourceCustomerId","targetCustomerId","cutoverAt"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"applications":{"type":"array","items":{"type":"object","properties":{"sourceApplicationId":{"type":"string"},"sourceName":{"type":"string"},"slugId":{"type":"string"},"action":{"type":"string","enum":["existing","create","explicit","skip","link","conflict","unmapped"]},"targetApplicationId":{"type":"string"},"targetName":{"type":"string"},"reason":{"type":"string"},"rows":{"type":"number"}},"required":["sourceApplicationId","sourceName","slugId","action"],"additionalProperties":false}},"eligible":{"type":"number"},"alreadyImported":{"type":"number"},"notFinal":{"type":"number"},"byState":{"type":"array","items":{"type":"object","properties":{"state":{"type":"string","enum":["success","processing","waiting","approval","declined","unknown","error","cancelled"],"description":"Payment transaction state"},"count":{"type":"number"}},"required":["state","count"],"additionalProperties":false}},"byCurrency":{"type":"array","items":{"type":"object","properties":{"cy":{"type":"string"},"count":{"type":"number"},"approxTotal":{"type":"number"}},"required":["cy","count","approxTotal"],"additionalProperties":false}},"earliest":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"latest":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"provider":{"type":"string"},"refundable":{"type":"boolean"},"refundableReason":{"type":"string"}},"required":["applications","eligible","alreadyImported","notFinal","byState","byCurrency","refundable"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/transaction-imports":{"get":{"description":"Every import batch, newest first. Platform operator only.","summary":"List import batches","tags":["transactionImports"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceOrganizationId":{"type":"string"},"sourceOrganizationName":{"type":"string"},"sourceCustomerId":{"type":"string"},"sourceCustomerName":{"type":"string"},"targetOrganizationId":{"type":"string"},"targetOrganizationName":{"type":"string"},"targetCustomerId":{"type":"string"},"targetCustomerName":{"type":"string"},"applicationMap":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"providerAccount":{"type":"string"},"provider":{"type":"string"},"cutoverAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"state":{"type":"string","enum":["PENDING","RUNNING","COMPLETED","FAILED","REVERTED"]},"importedCount":{"type":"number"},"skippedDuplicateCount":{"type":"number"},"skippedOrphanCount":{"type":"number"},"cursorCreatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"error":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","sourceOrganizationId","sourceCustomerId","targetOrganizationId","targetCustomerId","applicationMap","cutoverAt","state","importedCount","skippedDuplicateCount","skippedOrphanCount","createdBy","createdAt","updatedAt"],"additionalProperties":false}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"post":{"description":"Validates the settings and creates a PENDING batch. Nothing is copied until it is run.","summary":"Create an import batch","tags":["transactionImports"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"sourceCustomerId":{"type":"string","minLength":1},"targetCustomerId":{"type":"string","minLength":1},"applicationMap":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","null"]}},"createMissingApplications":{"type":"boolean"},"providerAccount":{"type":"string"},"cutoverAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["sourceCustomerId","targetCustomerId","cutoverAt"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"sourceOrganizationId":{"type":"string"},"sourceOrganizationName":{"type":"string"},"sourceCustomerId":{"type":"string"},"sourceCustomerName":{"type":"string"},"targetOrganizationId":{"type":"string"},"targetOrganizationName":{"type":"string"},"targetCustomerId":{"type":"string"},"targetCustomerName":{"type":"string"},"applicationMap":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"providerAccount":{"type":"string"},"provider":{"type":"string"},"cutoverAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"state":{"type":"string","enum":["PENDING","RUNNING","COMPLETED","FAILED","REVERTED"]},"importedCount":{"type":"number"},"skippedDuplicateCount":{"type":"number"},"skippedOrphanCount":{"type":"number"},"cursorCreatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"error":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","sourceOrganizationId","sourceCustomerId","targetOrganizationId","targetCustomerId","applicationMap","cutoverAt","state","importedCount","skippedDuplicateCount","skippedOrphanCount","createdBy","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/transaction-imports/{id}/run":{"post":{"description":"Copies the next chunk of source rows and returns the batch. Call again until its state is COMPLETED; a failed or interrupted run resumes where it stopped.","summary":"Import the next chunk of a batch","tags":["transactionImports"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"sourceOrganizationId":{"type":"string"},"sourceOrganizationName":{"type":"string"},"sourceCustomerId":{"type":"string"},"sourceCustomerName":{"type":"string"},"targetOrganizationId":{"type":"string"},"targetOrganizationName":{"type":"string"},"targetCustomerId":{"type":"string"},"targetCustomerName":{"type":"string"},"applicationMap":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"providerAccount":{"type":"string"},"provider":{"type":"string"},"cutoverAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"state":{"type":"string","enum":["PENDING","RUNNING","COMPLETED","FAILED","REVERTED"]},"importedCount":{"type":"number"},"skippedDuplicateCount":{"type":"number"},"skippedOrphanCount":{"type":"number"},"cursorCreatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"error":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","sourceOrganizationId","sourceCustomerId","targetOrganizationId","targetCustomerId","applicationMap","cutoverAt","state","importedCount","skippedDuplicateCount","skippedOrphanCount","createdBy","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/transaction-imports/{id}/revert":{"post":{"description":"Deletes the batch's rows from the transaction store. Refused once a live refund, void or capture points at one of them. Events already sent to Axiom stay there.","summary":"Remove a batch's rows","tags":["transactionImports"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"sourceOrganizationId":{"type":"string"},"sourceOrganizationName":{"type":"string"},"sourceCustomerId":{"type":"string"},"sourceCustomerName":{"type":"string"},"targetOrganizationId":{"type":"string"},"targetOrganizationName":{"type":"string"},"targetCustomerId":{"type":"string"},"targetCustomerName":{"type":"string"},"applicationMap":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"providerAccount":{"type":"string"},"provider":{"type":"string"},"cutoverAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"state":{"type":"string","enum":["PENDING","RUNNING","COMPLETED","FAILED","REVERTED"]},"importedCount":{"type":"number"},"skippedDuplicateCount":{"type":"number"},"skippedOrphanCount":{"type":"number"},"cursorCreatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"error":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","sourceOrganizationId","sourceCustomerId","targetOrganizationId","targetCustomerId","applicationMap","cutoverAt","state","importedCount","skippedDuplicateCount","skippedOrphanCount","createdBy","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/customer-migration/organizations":{"get":{"description":"Platform operator only.","summary":"Find organizations to move a customer to","tags":["customerMigration"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"businessModel":{"type":"string"}},"required":["id","name","businessModel"],"additionalProperties":false}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/customer-migration/organizations/{organizationId}/customers":{"get":{"description":"Every customer of the organization, with the organizations it was already re-created in.","summary":"Customers of an organization","tags":["customerMigration"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"copies":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string"},"customerId":{"type":"string"}},"required":["organizationId","customerId"],"additionalProperties":false}}},"required":["id","name","status","copies"],"additionalProperties":false}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/customer-migration/recreate":{"post":{"description":"Copies each selected customer of the source organization into the destination organization, with a like-for-like application (same name and id) for each of its applications except a gateway link's. Each customer succeeds or fails on its own; one already re-created there is reported, not copied twice.","summary":"Re-create customers in another organization","tags":["customerMigration"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"sourceOrganizationId":{"type":"string","minLength":1},"sourceCustomerIds":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"targetOrganizationId":{"type":"string","minLength":1}},"required":["sourceOrganizationId","sourceCustomerIds","targetOrganizationId"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"sourceCustomerId":{"type":"string"},"sourceCustomerName":{"type":"string"},"status":{"type":"string","enum":["created","exists","failed"]},"customerId":{"type":"string"},"customerName":{"type":"string"},"applications":{"type":"array","items":{"type":"object","properties":{"sourceApplicationId":{"type":"string"},"sourceName":{"type":"string"},"slugId":{"type":"string"},"action":{"type":"string","enum":["existing","create","explicit","skip","link","conflict","unmapped"]},"targetApplicationId":{"type":"string"},"targetName":{"type":"string"},"reason":{"type":"string"},"rows":{"type":"number"}},"required":["sourceApplicationId","sourceName","slugId","action"],"additionalProperties":false}},"message":{"type":"string"}},"required":["sourceCustomerId","status"],"additionalProperties":false}}},"required":["organizationId","results"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/customer-migration/access-moves/preview":{"post":{"description":"What would move, what cannot, and what would refuse the move. Writes nothing.","summary":"Dry run of moving users and API keys","tags":["customerMigration"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"sourceCustomerId":{"type":"string","minLength":1},"targetCustomerId":{"type":"string","minLength":1},"apiKeyIds":{"type":"array","items":{"type":"string"}},"subjectIds":{"type":"array","items":{"type":"string"}},"createMissingApplications":{"type":"boolean"},"note":{"type":"string","maxLength":500}},"required":["sourceCustomerId","targetCustomerId"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"apiKeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"},"eligible":{"type":"boolean"},"reason":{"type":"string"},"selected":{"type":"boolean"}},"required":["id","name","createdAt","eligible","selected"],"additionalProperties":false}},"users":{"type":"array","items":{"type":"object","properties":{"subjectId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"selected":{"type":"boolean"},"roles":{"type":"array","items":{"type":"object","properties":{"roleName":{"type":"string"},"action":{"type":"string","enum":["map","copy","keep"]},"alreadyAtTarget":{"type":"boolean"}},"required":["roleName","action","alreadyAtTarget"],"additionalProperties":false}}},"required":["subjectId","selected","roles"],"additionalProperties":false}},"applications":{"type":"array","items":{"type":"object","properties":{"sourceApplicationId":{"type":"string"},"sourceName":{"type":"string"},"slugId":{"type":"string"},"action":{"type":"string","enum":["existing","create","explicit","skip","link","conflict","unmapped"]},"targetApplicationId":{"type":"string"},"targetName":{"type":"string"},"reason":{"type":"string"},"rows":{"type":"number"}},"required":["sourceApplicationId","sourceName","slugId","action"],"additionalProperties":false}},"blocking":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["apiKeys","users","applications","blocking","warnings"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/customer-migration/access-moves":{"get":{"description":"Every move of users and API keys, newest first.","summary":"List access moves","tags":["customerMigration"],"parameters":[],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceCustomerId":{"type":"string"},"sourceCustomerName":{"type":"string"},"sourceOrganizationName":{"type":"string"},"targetCustomerId":{"type":"string"},"targetCustomerName":{"type":"string"},"targetOrganizationName":{"type":"string"},"state":{"type":"string","enum":["MOVED","ROLLED_BACK"]},"apiKeyCount":{"type":"number"},"userCount":{"type":"number"},"note":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"rolledBackBy":{"type":"string"},"rolledBackAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","sourceCustomerId","targetCustomerId","state","apiKeyCount","userCount","createdBy","createdAt"],"additionalProperties":false}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"post":{"description":"Moves the selected API keys and users' role assignments in one transaction, recording everything changed so the move can be rolled back.","summary":"Move users and API keys to another customer","tags":["customerMigration"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"sourceCustomerId":{"type":"string","minLength":1},"targetCustomerId":{"type":"string","minLength":1},"apiKeyIds":{"type":"array","items":{"type":"string"}},"subjectIds":{"type":"array","items":{"type":"string"}},"createMissingApplications":{"type":"boolean"},"note":{"type":"string","maxLength":500}},"required":["sourceCustomerId","targetCustomerId"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"sourceCustomerId":{"type":"string"},"sourceCustomerName":{"type":"string"},"sourceOrganizationName":{"type":"string"},"targetCustomerId":{"type":"string"},"targetCustomerName":{"type":"string"},"targetOrganizationName":{"type":"string"},"state":{"type":"string","enum":["MOVED","ROLLED_BACK"]},"apiKeyCount":{"type":"number"},"userCount":{"type":"number"},"note":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"rolledBackBy":{"type":"string"},"rolledBackAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","sourceCustomerId","targetCustomerId","state","apiKeyCount","userCount","createdBy","createdAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/customer-migration/access-moves/{id}/rollback":{"get":{"description":"Writes nothing.","summary":"What a rollback would restore","tags":["customerMigration"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"apiKeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"restorable":{"type":"boolean"},"reason":{"type":"string"}},"required":["id","name","restorable"],"additionalProperties":false}},"assignments":{"type":"number"},"rolesToRemove":{"type":"array","items":{"type":"string"}},"keysCreatedSince":{"type":"number"},"warnings":{"type":"array","items":{"type":"string"}}},"required":["apiKeys","assignments","rolesToRemove","keysCreatedSince","warnings"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"post":{"description":"Puts every key and assignment the move changed back exactly as it was, in one transaction, and removes the roles it created when nothing else uses them.","summary":"Roll a move back to the original customer","tags":["customerMigration"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"sourceCustomerId":{"type":"string"},"sourceCustomerName":{"type":"string"},"sourceOrganizationName":{"type":"string"},"targetCustomerId":{"type":"string"},"targetCustomerName":{"type":"string"},"targetOrganizationName":{"type":"string"},"state":{"type":"string","enum":["MOVED","ROLLED_BACK"]},"apiKeyCount":{"type":"number"},"userCount":{"type":"number"},"note":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"rolledBackBy":{"type":"string"},"rolledBackAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","sourceCustomerId","targetCustomerId","state","apiKeyCount","userCount","createdBy","createdAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/checkouts":{"get":{"description":"Checkouts of the selected context. Uncounted: `meta.hasMore` drives the pager; pass `count=true` for `meta.total`. `serving` tells which organization checkout is the fallback and whether customers may design their own.","summary":"List checkouts","tags":["checkouts"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"customerId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"page","in":"query","schema":{"default":1,"type":"number","minimum":1}},{"name":"limit","in":"query","schema":{"default":100,"type":"number","minimum":1}},{"name":"dateRange","in":"query","style":"deepObject","schema":{"type":"object","properties":{"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}}}},{"name":"refresh","in":"query","schema":{"type":"boolean"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["name","isDefault","scope"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"customerId":{"type":["string","null"]},"scope":{"type":"string","enum":["organization","customer"]},"name":{"type":"string"},"slug":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"isDefault":{"type":"boolean"},"applicationSlugIds":{"type":"array","items":{"type":"string"}},"allowRequestAppearance":{"type":"boolean","description":"Deprecated — read `requestAppearanceMode`. True unless `requestAppearanceMode` is `ignore`."},"requestAppearanceMode":{"type":"string","enum":["fill","override","ignore"],"description":"How the `appearance` an integration sends with a checkout session combines with this checkout's published design. `fill` (default): the design wins — the request only fills in fields the design leaves unset (per colour key, per flat field, per field inside each token group; `customCss` only when the design has none). `override`: the request's values replace the design's, field by field. `ignore`: the request appearance is not used while this design serves the session. Sessions without a published design always use the request appearance as their whole theme."},"liveVersionId":{"type":["string","null"]},"liveVersionNumber":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"lastPublishedAt":{"type":["string","null"]},"variantsCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draftRevision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draftUpdatedAt":{"type":["string","null"]},"draftUpdatedBy":{"type":["string","null"]},"hasUnpublishedChanges":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"scheduledVersionId":{"type":["string","null"]},"scheduledPublishAt":{"type":["string","null"]},"pendingPublishRequestId":{"type":["string","null"]}},"required":["id","organizationId","customerId","scope","name","slug","isDefault","applicationSlugIds","allowRequestAppearance","requestAppearanceMode","liveVersionId","liveVersionNumber","lastPublishedAt","variantsCount","draftRevision","draftUpdatedAt","draftUpdatedBy","hasUnpublishedChanges","createdAt","updatedAt"],"additionalProperties":false,"description":"Checkout summary"}},"meta":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"},"total":{"type":"number"}},"required":["page","pageSize","hasMore"],"additionalProperties":false},"serving":{"type":"object","properties":{"customerDesignsEnabled":{"type":"boolean"},"organizationDefault":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"}},"required":["name","slug"],"additionalProperties":false},{"type":"null"}]},"locked":{"type":"boolean"}},"required":["customerDesignsEnabled","organizationDefault","locked"],"additionalProperties":false,"description":"Which checkouts serve the context"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"post":{"description":"Creates a checkout with an empty doc (today's look, card only), a copy of another checkout's draft, or a starter template. Nothing is served until it is published. 409 when the slug is taken.","summary":"Create a checkout","tags":["checkouts"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"slug":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"fromCheckoutId":{"type":"string"},"templateId":{"type":"string","enum":["minimal","bold","dark","compact-iframe","wallets-first"]}},"required":["name"]}}}},"responses":{"201":{"description":"Checkout with draft and live version","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"customerId":{"type":["string","null"]},"scope":{"type":"string","enum":["organization","customer"]},"name":{"type":"string"},"slug":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"isDefault":{"type":"boolean"},"applicationSlugIds":{"type":"array","items":{"type":"string"}},"allowRequestAppearance":{"type":"boolean","description":"Deprecated — read `requestAppearanceMode`. True unless `requestAppearanceMode` is `ignore`."},"requestAppearanceMode":{"type":"string","enum":["fill","override","ignore"],"description":"How the `appearance` an integration sends with a checkout session combines with this checkout's published design. `fill` (default): the design wins — the request only fills in fields the design leaves unset (per colour key, per flat field, per field inside each token group; `customCss` only when the design has none). `override`: the request's values replace the design's, field by field. `ignore`: the request appearance is not used while this design serves the session. Sessions without a published design always use the request appearance as their whole theme."},"liveVersionId":{"type":["string","null"]},"liveVersionNumber":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"lastPublishedAt":{"type":["string","null"]},"variantsCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draftRevision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draftUpdatedAt":{"type":["string","null"]},"draftUpdatedBy":{"type":["string","null"]},"hasUnpublishedChanges":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"scheduledVersionId":{"type":["string","null"]},"scheduledPublishAt":{"type":["string","null"]},"pendingPublishRequestId":{"type":["string","null"]},"draftDoc":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1},"base":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"trustLine":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"payButton":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cardDetailsTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"saveCardLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cancelLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"successTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"failureTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"footerText":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsUrl":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"lastUsedBadge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"}},"additionalProperties":false,"description":"Copy overrides per content key"}},"required":["theme","layout","content"],"additionalProperties":false},"variants":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"enabled":{"type":"boolean"},"conditions":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":100},"op":{"default":"in","type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"default":[],"maxItems":200,"type":"array","items":{"type":["string","number","boolean"]}}},"required":["field","op","values"],"additionalProperties":false,"description":"A single search filter"}},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false},"experiment":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","enum":["running","stopped"]},"arms":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"weight":{"type":"number","minimum":0,"maximum":10000,"description":"Relative traffic share (> 0 to publish)"},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false}},"required":["id","name","weight"],"additionalProperties":false,"description":"Experiment arm: replaces the variant's options and/or deep-merges overrides"}}},"required":["id","status","arms"],"additionalProperties":false,"description":"A/B experiment; the first arm is the control"},"optionOrdering":{"type":"string","enum":["manual","auto"]},"schedule":{"type":"object","properties":{"from":{"description":"Inclusive start (ISO 8601)","type":"string","maxLength":64},"until":{"description":"Exclusive end (ISO 8601)","type":"string","maxLength":64}},"additionalProperties":false}},"required":["id","name","enabled","conditions","options"],"additionalProperties":false}},"timezone":{"type":"string","maxLength":64},"tagManager":{"type":"object","properties":{"containerId":{"type":"string","minLength":1,"maxLength":32},"consentDefault":{"type":"string","enum":["denied","granted"]}},"required":["containerId"],"additionalProperties":false}},"required":["schemaVersion","base","variants"],"additionalProperties":false,"description":"Checkout builder document"},"liveVersion":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"checkoutId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"note":{"type":["string","null"]},"publishedBy":{"type":"string"},"publishedByName":{"type":["string","null"]},"publishedAt":{"type":"string"},"isLive":{"type":"boolean"},"status":{"type":"string","enum":["live","scheduled","superseded","cancelled"]},"publishAt":{"type":["string","null"]},"doc":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1},"base":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"trustLine":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"payButton":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cardDetailsTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"saveCardLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cancelLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"successTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"failureTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"footerText":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsUrl":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"lastUsedBadge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"}},"additionalProperties":false,"description":"Copy overrides per content key"}},"required":["theme","layout","content"],"additionalProperties":false},"variants":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"enabled":{"type":"boolean"},"conditions":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":100},"op":{"default":"in","type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"default":[],"maxItems":200,"type":"array","items":{"type":["string","number","boolean"]}}},"required":["field","op","values"],"additionalProperties":false,"description":"A single search filter"}},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false},"experiment":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","enum":["running","stopped"]},"arms":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"weight":{"type":"number","minimum":0,"maximum":10000,"description":"Relative traffic share (> 0 to publish)"},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false}},"required":["id","name","weight"],"additionalProperties":false,"description":"Experiment arm: replaces the variant's options and/or deep-merges overrides"}}},"required":["id","status","arms"],"additionalProperties":false,"description":"A/B experiment; the first arm is the control"},"optionOrdering":{"type":"string","enum":["manual","auto"]},"schedule":{"type":"object","properties":{"from":{"description":"Inclusive start (ISO 8601)","type":"string","maxLength":64},"until":{"description":"Exclusive end (ISO 8601)","type":"string","maxLength":64}},"additionalProperties":false}},"required":["id","name","enabled","conditions","options"],"additionalProperties":false}},"timezone":{"type":"string","maxLength":64},"tagManager":{"type":"object","properties":{"containerId":{"type":"string","minLength":1,"maxLength":32},"consentDefault":{"type":"string","enum":["denied","granted"]}},"required":["containerId"],"additionalProperties":false}},"required":["schemaVersion","base","variants"],"additionalProperties":false,"description":"Checkout builder document"}},"required":["id","checkoutId","version","note","publishedBy","publishedAt","isLive","status","publishAt","doc"],"additionalProperties":false,"description":"Published checkout version"},{"type":"null"}]},"locked":{"type":"boolean"}},"required":["id","organizationId","customerId","scope","name","slug","isDefault","applicationSlugIds","allowRequestAppearance","requestAppearanceMode","liveVersionId","liveVersionNumber","lastPublishedAt","variantsCount","draftRevision","draftUpdatedAt","draftUpdatedBy","hasUnpublishedChanges","createdAt","updatedAt","draftDoc","liveVersion"],"additionalProperties":false,"description":"Checkout with draft and live version"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/checkouts/import":{"post":{"description":"The write half of copying a checkout between test and live mode: the design read in the other mode (`getCheckout`) is written into this one as a draft — a new, unpublished checkout, or with `replace: true` the draft of this mode's checkout with the same slug (its published version keeps serving). Nothing is published. 409 `exists` when the slug is taken and `replace` was not given. `dryRun` answers the outcome and this mode's validation without writing.","summary":"Copy a checkout in from the other mode","tags":["checkouts"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"slug":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"customerId":{"type":["string","null"]},"doc":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1},"base":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"trustLine":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"payButton":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cardDetailsTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"saveCardLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cancelLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"successTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"failureTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"footerText":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsUrl":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"lastUsedBadge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"}},"additionalProperties":false,"description":"Copy overrides per content key"}},"required":["theme","layout","content"],"additionalProperties":false},"variants":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"enabled":{"type":"boolean"},"conditions":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":100},"op":{"default":"in","type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"default":[],"maxItems":200,"type":"array","items":{"type":["string","number","boolean"]}}},"required":["field"],"description":"A single search filter"}},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false},"experiment":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","enum":["running","stopped"]},"arms":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"weight":{"type":"number","minimum":0,"maximum":10000,"description":"Relative traffic share (> 0 to publish)"},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false}},"required":["id","name","weight"],"additionalProperties":false,"description":"Experiment arm: replaces the variant's options and/or deep-merges overrides"}}},"required":["id","status","arms"],"additionalProperties":false,"description":"A/B experiment; the first arm is the control"},"optionOrdering":{"type":"string","enum":["manual","auto"]},"schedule":{"type":"object","properties":{"from":{"description":"Inclusive start (ISO 8601)","type":"string","maxLength":64},"until":{"description":"Exclusive end (ISO 8601)","type":"string","maxLength":64}},"additionalProperties":false}},"required":["id","name","enabled","conditions","options"],"additionalProperties":false}},"timezone":{"type":"string","maxLength":64},"tagManager":{"type":"object","properties":{"containerId":{"type":"string","minLength":1,"maxLength":32},"consentDefault":{"type":"string","enum":["denied","granted"]}},"required":["containerId"],"additionalProperties":false}},"required":["schemaVersion","base","variants"],"additionalProperties":false,"description":"Checkout builder document"},"requestAppearanceMode":{"type":"string","enum":["fill","override","ignore"],"description":"How the `appearance` an integration sends with a checkout session combines with this checkout's published design. `fill` (default): the design wins — the request only fills in fields the design leaves unset (per colour key, per flat field, per field inside each token group; `customCss` only when the design has none). `override`: the request's values replace the design's, field by field. `ignore`: the request appearance is not used while this design serves the session. Sessions without a published design always use the request appearance as their whole theme."},"replace":{"type":"boolean"},"dryRun":{"type":"boolean"}},"required":["name","slug","doc"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["created","replaced"]},"dryRun":{"type":"boolean"},"checkout":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"customerId":{"type":["string","null"]},"scope":{"type":"string","enum":["organization","customer"]},"name":{"type":"string"},"slug":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"isDefault":{"type":"boolean"},"applicationSlugIds":{"type":"array","items":{"type":"string"}},"allowRequestAppearance":{"type":"boolean","description":"Deprecated — read `requestAppearanceMode`. True unless `requestAppearanceMode` is `ignore`."},"requestAppearanceMode":{"type":"string","enum":["fill","override","ignore"],"description":"How the `appearance` an integration sends with a checkout session combines with this checkout's published design. `fill` (default): the design wins — the request only fills in fields the design leaves unset (per colour key, per flat field, per field inside each token group; `customCss` only when the design has none). `override`: the request's values replace the design's, field by field. `ignore`: the request appearance is not used while this design serves the session. Sessions without a published design always use the request appearance as their whole theme."},"liveVersionId":{"type":["string","null"]},"liveVersionNumber":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"lastPublishedAt":{"type":["string","null"]},"variantsCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draftRevision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draftUpdatedAt":{"type":["string","null"]},"draftUpdatedBy":{"type":["string","null"]},"hasUnpublishedChanges":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"scheduledVersionId":{"type":["string","null"]},"scheduledPublishAt":{"type":["string","null"]},"pendingPublishRequestId":{"type":["string","null"]}},"required":["id","organizationId","customerId","scope","name","slug","isDefault","applicationSlugIds","allowRequestAppearance","requestAppearanceMode","liveVersionId","liveVersionNumber","lastPublishedAt","variantsCount","draftRevision","draftUpdatedAt","draftUpdatedBy","hasUnpublishedChanges","createdAt","updatedAt"],"additionalProperties":false,"description":"Checkout summary"},{"type":"null"}]},"validation":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["schema_invalid","no_variants","no_enabled_variants","no_catch_all","duplicate_variant_id","variant_no_options","unknown_option","unknown_condition_field","invalid_condition_operator","invalid_condition_value","required_section_hidden","custom_css_not_enabled","insecure_logo_url","insecure_content_url","platform_branding","experiment_invalid","schedule_invalid","timezone_invalid","tag_manager_container_invalid","shadowed_variant","option_not_routable","low_contrast","wallet_impossible_device","locale_gap","unsupported_locale","condition_no_values","duplicate_option","preselect_not_offered","express_non_wallet","unknown_placeholder","auto_ordering_few_options","card_field_unsupported","schedule_expired","asset_missing"]},"message":{"type":"string"},"variantId":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}}},"required":["code","message"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["schema_invalid","no_variants","no_enabled_variants","no_catch_all","duplicate_variant_id","variant_no_options","unknown_option","unknown_condition_field","invalid_condition_operator","invalid_condition_value","required_section_hidden","custom_css_not_enabled","insecure_logo_url","insecure_content_url","platform_branding","experiment_invalid","schedule_invalid","timezone_invalid","tag_manager_container_invalid","shadowed_variant","option_not_routable","low_contrast","wallet_impossible_device","locale_gap","unsupported_locale","condition_no_values","duplicate_option","preselect_not_offered","express_non_wallet","unknown_placeholder","auto_ordering_few_options","card_field_unsupported","schedule_expired","asset_missing"]},"message":{"type":"string"},"variantId":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}}},"required":["code","message"],"additionalProperties":false}}},"required":["errors","warnings"],"additionalProperties":false}},"required":["outcome","dryRun","checkout","validation"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["exists","draft-changed"]}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/checkouts/{id}":{"get":{"summary":"Get a checkout","tags":["checkouts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Checkout with draft and live version","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"customerId":{"type":["string","null"]},"scope":{"type":"string","enum":["organization","customer"]},"name":{"type":"string"},"slug":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"isDefault":{"type":"boolean"},"applicationSlugIds":{"type":"array","items":{"type":"string"}},"allowRequestAppearance":{"type":"boolean","description":"Deprecated — read `requestAppearanceMode`. True unless `requestAppearanceMode` is `ignore`."},"requestAppearanceMode":{"type":"string","enum":["fill","override","ignore"],"description":"How the `appearance` an integration sends with a checkout session combines with this checkout's published design. `fill` (default): the design wins — the request only fills in fields the design leaves unset (per colour key, per flat field, per field inside each token group; `customCss` only when the design has none). `override`: the request's values replace the design's, field by field. `ignore`: the request appearance is not used while this design serves the session. Sessions without a published design always use the request appearance as their whole theme."},"liveVersionId":{"type":["string","null"]},"liveVersionNumber":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"lastPublishedAt":{"type":["string","null"]},"variantsCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draftRevision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draftUpdatedAt":{"type":["string","null"]},"draftUpdatedBy":{"type":["string","null"]},"hasUnpublishedChanges":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"scheduledVersionId":{"type":["string","null"]},"scheduledPublishAt":{"type":["string","null"]},"pendingPublishRequestId":{"type":["string","null"]},"draftDoc":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1},"base":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"trustLine":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"payButton":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cardDetailsTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"saveCardLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cancelLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"successTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"failureTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"footerText":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsUrl":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"lastUsedBadge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"}},"additionalProperties":false,"description":"Copy overrides per content key"}},"required":["theme","layout","content"],"additionalProperties":false},"variants":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"enabled":{"type":"boolean"},"conditions":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":100},"op":{"default":"in","type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"default":[],"maxItems":200,"type":"array","items":{"type":["string","number","boolean"]}}},"required":["field","op","values"],"additionalProperties":false,"description":"A single search filter"}},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false},"experiment":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","enum":["running","stopped"]},"arms":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"weight":{"type":"number","minimum":0,"maximum":10000,"description":"Relative traffic share (> 0 to publish)"},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false}},"required":["id","name","weight"],"additionalProperties":false,"description":"Experiment arm: replaces the variant's options and/or deep-merges overrides"}}},"required":["id","status","arms"],"additionalProperties":false,"description":"A/B experiment; the first arm is the control"},"optionOrdering":{"type":"string","enum":["manual","auto"]},"schedule":{"type":"object","properties":{"from":{"description":"Inclusive start (ISO 8601)","type":"string","maxLength":64},"until":{"description":"Exclusive end (ISO 8601)","type":"string","maxLength":64}},"additionalProperties":false}},"required":["id","name","enabled","conditions","options"],"additionalProperties":false}},"timezone":{"type":"string","maxLength":64},"tagManager":{"type":"object","properties":{"containerId":{"type":"string","minLength":1,"maxLength":32},"consentDefault":{"type":"string","enum":["denied","granted"]}},"required":["containerId"],"additionalProperties":false}},"required":["schemaVersion","base","variants"],"additionalProperties":false,"description":"Checkout builder document"},"liveVersion":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"checkoutId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"note":{"type":["string","null"]},"publishedBy":{"type":"string"},"publishedByName":{"type":["string","null"]},"publishedAt":{"type":"string"},"isLive":{"type":"boolean"},"status":{"type":"string","enum":["live","scheduled","superseded","cancelled"]},"publishAt":{"type":["string","null"]},"doc":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1},"base":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"trustLine":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"payButton":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cardDetailsTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"saveCardLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cancelLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"successTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"failureTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"footerText":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsUrl":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"lastUsedBadge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"}},"additionalProperties":false,"description":"Copy overrides per content key"}},"required":["theme","layout","content"],"additionalProperties":false},"variants":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"enabled":{"type":"boolean"},"conditions":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":100},"op":{"default":"in","type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"default":[],"maxItems":200,"type":"array","items":{"type":["string","number","boolean"]}}},"required":["field","op","values"],"additionalProperties":false,"description":"A single search filter"}},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false},"experiment":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","enum":["running","stopped"]},"arms":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"weight":{"type":"number","minimum":0,"maximum":10000,"description":"Relative traffic share (> 0 to publish)"},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false}},"required":["id","name","weight"],"additionalProperties":false,"description":"Experiment arm: replaces the variant's options and/or deep-merges overrides"}}},"required":["id","status","arms"],"additionalProperties":false,"description":"A/B experiment; the first arm is the control"},"optionOrdering":{"type":"string","enum":["manual","auto"]},"schedule":{"type":"object","properties":{"from":{"description":"Inclusive start (ISO 8601)","type":"string","maxLength":64},"until":{"description":"Exclusive end (ISO 8601)","type":"string","maxLength":64}},"additionalProperties":false}},"required":["id","name","enabled","conditions","options"],"additionalProperties":false}},"timezone":{"type":"string","maxLength":64},"tagManager":{"type":"object","properties":{"containerId":{"type":"string","minLength":1,"maxLength":32},"consentDefault":{"type":"string","enum":["denied","granted"]}},"required":["containerId"],"additionalProperties":false}},"required":["schemaVersion","base","variants"],"additionalProperties":false,"description":"Checkout builder document"}},"required":["id","checkoutId","version","note","publishedBy","publishedAt","isLive","status","publishAt","doc"],"additionalProperties":false,"description":"Published checkout version"},{"type":"null"}]},"locked":{"type":"boolean"}},"required":["id","organizationId","customerId","scope","name","slug","isDefault","applicationSlugIds","allowRequestAppearance","requestAppearanceMode","liveVersionId","liveVersionNumber","lastPublishedAt","variantsCount","draftRevision","draftUpdatedAt","draftUpdatedBy","hasUnpublishedChanges","createdAt","updatedAt","draftDoc","liveVersion"],"additionalProperties":false,"description":"Checkout with draft and live version"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"patch":{"description":"Name, slug, default flag, bound applications and `requestAppearanceMode` — how the `appearance` an integration sends with a session combines with this checkout's design (`fill`: the design wins and the request only fills unset fields; `override`: the request wins field by field; `ignore`: the request appearance is not used). 409 when the slug is taken.","summary":"Update checkout metadata","tags":["checkouts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"slug":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"isDefault":{"type":"boolean"},"applicationSlugIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"}},"requestAppearanceMode":{"type":"string","enum":["fill","override","ignore"],"description":"How the `appearance` an integration sends with a checkout session combines with this checkout's published design. `fill` (default): the design wins — the request only fills in fields the design leaves unset (per colour key, per flat field, per field inside each token group; `customCss` only when the design has none). `override`: the request's values replace the design's, field by field. `ignore`: the request appearance is not used while this design serves the session. Sessions without a published design always use the request appearance as their whole theme."},"allowRequestAppearance":{"description":"Deprecated — send `requestAppearanceMode`. `false` sets `ignore`; `true` keeps the current mode unless it is `ignore`, which becomes `fill`. Ignored when `requestAppearanceMode` is sent.","type":"boolean"}}}}}},"responses":{"200":{"description":"Checkout summary","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"customerId":{"type":["string","null"]},"scope":{"type":"string","enum":["organization","customer"]},"name":{"type":"string"},"slug":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"isDefault":{"type":"boolean"},"applicationSlugIds":{"type":"array","items":{"type":"string"}},"allowRequestAppearance":{"type":"boolean","description":"Deprecated — read `requestAppearanceMode`. True unless `requestAppearanceMode` is `ignore`."},"requestAppearanceMode":{"type":"string","enum":["fill","override","ignore"],"description":"How the `appearance` an integration sends with a checkout session combines with this checkout's published design. `fill` (default): the design wins — the request only fills in fields the design leaves unset (per colour key, per flat field, per field inside each token group; `customCss` only when the design has none). `override`: the request's values replace the design's, field by field. `ignore`: the request appearance is not used while this design serves the session. Sessions without a published design always use the request appearance as their whole theme."},"liveVersionId":{"type":["string","null"]},"liveVersionNumber":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"lastPublishedAt":{"type":["string","null"]},"variantsCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draftRevision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draftUpdatedAt":{"type":["string","null"]},"draftUpdatedBy":{"type":["string","null"]},"hasUnpublishedChanges":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"scheduledVersionId":{"type":["string","null"]},"scheduledPublishAt":{"type":["string","null"]},"pendingPublishRequestId":{"type":["string","null"]}},"required":["id","organizationId","customerId","scope","name","slug","isDefault","applicationSlugIds","allowRequestAppearance","requestAppearanceMode","liveVersionId","liveVersionNumber","lastPublishedAt","variantsCount","draftRevision","draftUpdatedAt","draftUpdatedBy","hasUnpublishedChanges","createdAt","updatedAt"],"additionalProperties":false,"description":"Checkout summary"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"delete":{"description":"Soft delete. 409 while it is the context default — make another checkout the default first.","summary":"Delete a checkout","tags":["checkouts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/checkouts/{id}/draft":{"put":{"description":"Optimistic concurrency: `baseRevision` must equal the stored `draftRevision`, else 409 with the current revision (reload or overwrite by resending with it).","summary":"Save the draft","tags":["checkouts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"doc":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1},"base":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"trustLine":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"payButton":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cardDetailsTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"saveCardLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cancelLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"successTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"failureTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"footerText":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsUrl":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"lastUsedBadge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"}},"additionalProperties":false,"description":"Copy overrides per content key"}},"required":["theme","layout","content"],"additionalProperties":false},"variants":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"enabled":{"type":"boolean"},"conditions":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":100},"op":{"default":"in","type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"default":[],"maxItems":200,"type":"array","items":{"type":["string","number","boolean"]}}},"required":["field"],"description":"A single search filter"}},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false},"experiment":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","enum":["running","stopped"]},"arms":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"weight":{"type":"number","minimum":0,"maximum":10000,"description":"Relative traffic share (> 0 to publish)"},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false}},"required":["id","name","weight"],"additionalProperties":false,"description":"Experiment arm: replaces the variant's options and/or deep-merges overrides"}}},"required":["id","status","arms"],"additionalProperties":false,"description":"A/B experiment; the first arm is the control"},"optionOrdering":{"type":"string","enum":["manual","auto"]},"schedule":{"type":"object","properties":{"from":{"description":"Inclusive start (ISO 8601)","type":"string","maxLength":64},"until":{"description":"Exclusive end (ISO 8601)","type":"string","maxLength":64}},"additionalProperties":false}},"required":["id","name","enabled","conditions","options"],"additionalProperties":false}},"timezone":{"type":"string","maxLength":64},"tagManager":{"type":"object","properties":{"containerId":{"type":"string","minLength":1,"maxLength":32},"consentDefault":{"type":"string","enum":["denied","granted"]}},"required":["containerId"],"additionalProperties":false}},"required":["schemaVersion","base","variants"],"additionalProperties":false,"description":"Checkout builder document"},"baseRevision":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["doc","baseRevision"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"draftRevision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draftUpdatedAt":{"type":"string"},"validation":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["schema_invalid","no_variants","no_enabled_variants","no_catch_all","duplicate_variant_id","variant_no_options","unknown_option","unknown_condition_field","invalid_condition_operator","invalid_condition_value","required_section_hidden","custom_css_not_enabled","insecure_logo_url","insecure_content_url","platform_branding","experiment_invalid","schedule_invalid","timezone_invalid","tag_manager_container_invalid","shadowed_variant","option_not_routable","low_contrast","wallet_impossible_device","locale_gap","unsupported_locale","condition_no_values","duplicate_option","preselect_not_offered","express_non_wallet","unknown_placeholder","auto_ordering_few_options","card_field_unsupported","schedule_expired","asset_missing"]},"message":{"type":"string"},"variantId":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}}},"required":["code","message"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["schema_invalid","no_variants","no_enabled_variants","no_catch_all","duplicate_variant_id","variant_no_options","unknown_option","unknown_condition_field","invalid_condition_operator","invalid_condition_value","required_section_hidden","custom_css_not_enabled","insecure_logo_url","insecure_content_url","platform_branding","experiment_invalid","schedule_invalid","timezone_invalid","tag_manager_container_invalid","shadowed_variant","option_not_routable","low_contrast","wallet_impossible_device","locale_gap","unsupported_locale","condition_no_values","duplicate_option","preselect_not_offered","express_non_wallet","unknown_placeholder","auto_ordering_few_options","card_field_unsupported","schedule_expired","asset_missing"]},"message":{"type":"string"},"variantId":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}}},"required":["code","message"],"additionalProperties":false}}},"required":["errors","warnings"],"additionalProperties":false}},"required":["draftRevision","draftUpdatedAt","validation"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"currentRevision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draftUpdatedBy":{"type":["string","null"]},"draftUpdatedAt":{"type":["string","null"]}},"required":["message","currentRevision"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/checkouts/{id}/publish":{"post":{"description":"Validates the draft (errors → 422) and stores it as a new immutable version. 200: live now. 202 `kind: scheduled`: `publishAt` was given — the version is `scheduled` and the minute cron makes it live when due (a past `publishAt` → 400). 202 `kind: approval_required`: the organization setting `checkoutPublishRequiresApproval` is on — a pending publish request was created instead (no version) for someone else to approve.","summary":"Publish the draft","tags":["checkouts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":500},"draftRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"publishAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"object","properties":{"id":{"type":"string"},"checkoutId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"note":{"type":["string","null"]},"publishedBy":{"type":"string"},"publishedByName":{"type":["string","null"]},"publishedAt":{"type":"string"},"isLive":{"type":"boolean"},"status":{"type":"string","enum":["live","scheduled","superseded","cancelled"]},"publishAt":{"type":["string","null"]},"doc":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1},"base":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"trustLine":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"payButton":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cardDetailsTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"saveCardLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cancelLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"successTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"failureTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"footerText":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsUrl":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"lastUsedBadge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"}},"additionalProperties":false,"description":"Copy overrides per content key"}},"required":["theme","layout","content"],"additionalProperties":false},"variants":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"enabled":{"type":"boolean"},"conditions":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":100},"op":{"default":"in","type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"default":[],"maxItems":200,"type":"array","items":{"type":["string","number","boolean"]}}},"required":["field","op","values"],"additionalProperties":false,"description":"A single search filter"}},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false},"experiment":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","enum":["running","stopped"]},"arms":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"weight":{"type":"number","minimum":0,"maximum":10000,"description":"Relative traffic share (> 0 to publish)"},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false}},"required":["id","name","weight"],"additionalProperties":false,"description":"Experiment arm: replaces the variant's options and/or deep-merges overrides"}}},"required":["id","status","arms"],"additionalProperties":false,"description":"A/B experiment; the first arm is the control"},"optionOrdering":{"type":"string","enum":["manual","auto"]},"schedule":{"type":"object","properties":{"from":{"description":"Inclusive start (ISO 8601)","type":"string","maxLength":64},"until":{"description":"Exclusive end (ISO 8601)","type":"string","maxLength":64}},"additionalProperties":false}},"required":["id","name","enabled","conditions","options"],"additionalProperties":false}},"timezone":{"type":"string","maxLength":64},"tagManager":{"type":"object","properties":{"containerId":{"type":"string","minLength":1,"maxLength":32},"consentDefault":{"type":"string","enum":["denied","granted"]}},"required":["containerId"],"additionalProperties":false}},"required":["schemaVersion","base","variants"],"additionalProperties":false,"description":"Checkout builder document"}},"required":["id","checkoutId","version","note","publishedBy","publishedAt","isLive","status","publishAt","doc"],"additionalProperties":false,"description":"Published checkout version"},"validation":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["schema_invalid","no_variants","no_enabled_variants","no_catch_all","duplicate_variant_id","variant_no_options","unknown_option","unknown_condition_field","invalid_condition_operator","invalid_condition_value","required_section_hidden","custom_css_not_enabled","insecure_logo_url","insecure_content_url","platform_branding","experiment_invalid","schedule_invalid","timezone_invalid","tag_manager_container_invalid","shadowed_variant","option_not_routable","low_contrast","wallet_impossible_device","locale_gap","unsupported_locale","condition_no_values","duplicate_option","preselect_not_offered","express_non_wallet","unknown_placeholder","auto_ordering_few_options","card_field_unsupported","schedule_expired","asset_missing"]},"message":{"type":"string"},"variantId":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}}},"required":["code","message"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["schema_invalid","no_variants","no_enabled_variants","no_catch_all","duplicate_variant_id","variant_no_options","unknown_option","unknown_condition_field","invalid_condition_operator","invalid_condition_value","required_section_hidden","custom_css_not_enabled","insecure_logo_url","insecure_content_url","platform_branding","experiment_invalid","schedule_invalid","timezone_invalid","tag_manager_container_invalid","shadowed_variant","option_not_routable","low_contrast","wallet_impossible_device","locale_gap","unsupported_locale","condition_no_values","duplicate_option","preselect_not_offered","express_non_wallet","unknown_placeholder","auto_ordering_few_options","card_field_unsupported","schedule_expired","asset_missing"]},"message":{"type":"string"},"variantId":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}}},"required":["code","message"],"additionalProperties":false}}},"required":["errors","warnings"],"additionalProperties":false}},"required":["version","validation"],"additionalProperties":false}}}},"202":{"description":"202","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"scheduled"},"version":{"type":"object","properties":{"id":{"type":"string"},"checkoutId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"note":{"type":["string","null"]},"publishedBy":{"type":"string"},"publishedByName":{"type":["string","null"]},"publishedAt":{"type":"string"},"isLive":{"type":"boolean"},"status":{"type":"string","enum":["live","scheduled","superseded","cancelled"]},"publishAt":{"type":["string","null"]},"doc":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1},"base":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"trustLine":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"payButton":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cardDetailsTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"saveCardLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cancelLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"successTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"failureTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"footerText":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsUrl":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"lastUsedBadge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"}},"additionalProperties":false,"description":"Copy overrides per content key"}},"required":["theme","layout","content"],"additionalProperties":false},"variants":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"enabled":{"type":"boolean"},"conditions":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":100},"op":{"default":"in","type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"default":[],"maxItems":200,"type":"array","items":{"type":["string","number","boolean"]}}},"required":["field","op","values"],"additionalProperties":false,"description":"A single search filter"}},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false},"experiment":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","enum":["running","stopped"]},"arms":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"weight":{"type":"number","minimum":0,"maximum":10000,"description":"Relative traffic share (> 0 to publish)"},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false}},"required":["id","name","weight"],"additionalProperties":false,"description":"Experiment arm: replaces the variant's options and/or deep-merges overrides"}}},"required":["id","status","arms"],"additionalProperties":false,"description":"A/B experiment; the first arm is the control"},"optionOrdering":{"type":"string","enum":["manual","auto"]},"schedule":{"type":"object","properties":{"from":{"description":"Inclusive start (ISO 8601)","type":"string","maxLength":64},"until":{"description":"Exclusive end (ISO 8601)","type":"string","maxLength":64}},"additionalProperties":false}},"required":["id","name","enabled","conditions","options"],"additionalProperties":false}},"timezone":{"type":"string","maxLength":64},"tagManager":{"type":"object","properties":{"containerId":{"type":"string","minLength":1,"maxLength":32},"consentDefault":{"type":"string","enum":["denied","granted"]}},"required":["containerId"],"additionalProperties":false}},"required":["schemaVersion","base","variants"],"additionalProperties":false,"description":"Checkout builder document"}},"required":["id","checkoutId","version","note","publishedBy","publishedAt","isLive","status","publishAt","doc"],"additionalProperties":false,"description":"Published checkout version"},"validation":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["schema_invalid","no_variants","no_enabled_variants","no_catch_all","duplicate_variant_id","variant_no_options","unknown_option","unknown_condition_field","invalid_condition_operator","invalid_condition_value","required_section_hidden","custom_css_not_enabled","insecure_logo_url","insecure_content_url","platform_branding","experiment_invalid","schedule_invalid","timezone_invalid","tag_manager_container_invalid","shadowed_variant","option_not_routable","low_contrast","wallet_impossible_device","locale_gap","unsupported_locale","condition_no_values","duplicate_option","preselect_not_offered","express_non_wallet","unknown_placeholder","auto_ordering_few_options","card_field_unsupported","schedule_expired","asset_missing"]},"message":{"type":"string"},"variantId":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}}},"required":["code","message"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["schema_invalid","no_variants","no_enabled_variants","no_catch_all","duplicate_variant_id","variant_no_options","unknown_option","unknown_condition_field","invalid_condition_operator","invalid_condition_value","required_section_hidden","custom_css_not_enabled","insecure_logo_url","insecure_content_url","platform_branding","experiment_invalid","schedule_invalid","timezone_invalid","tag_manager_container_invalid","shadowed_variant","option_not_routable","low_contrast","wallet_impossible_device","locale_gap","unsupported_locale","condition_no_values","duplicate_option","preselect_not_offered","express_non_wallet","unknown_placeholder","auto_ordering_few_options","card_field_unsupported","schedule_expired","asset_missing"]},"message":{"type":"string"},"variantId":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}}},"required":["code","message"],"additionalProperties":false}}},"required":["errors","warnings"],"additionalProperties":false}},"required":["kind","version","validation"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"approval_required"},"publishRequest":{"type":"object","properties":{"id":{"type":"string"},"checkoutId":{"type":"string"},"checkoutName":{"type":"string"},"customerId":{"type":["string","null"]},"draftRevision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"note":{"type":["string","null"]},"publishAt":{"type":["string","null"]},"status":{"type":"string","enum":["pending","approved","rejected","cancelled"]},"requestedBy":{"type":"string"},"requestedByName":{"type":["string","null"]},"requestedAt":{"type":"string"},"decidedBy":{"type":["string","null"]},"decidedByName":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"decisionReason":{"type":["string","null"]},"versionId":{"type":["string","null"]}},"required":["id","checkoutId","checkoutName","draftRevision","note","publishAt","status","requestedBy","requestedAt","decidedBy","decidedAt","decisionReason","versionId"],"additionalProperties":false,"description":"Checkout publish request"},"validation":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["schema_invalid","no_variants","no_enabled_variants","no_catch_all","duplicate_variant_id","variant_no_options","unknown_option","unknown_condition_field","invalid_condition_operator","invalid_condition_value","required_section_hidden","custom_css_not_enabled","insecure_logo_url","insecure_content_url","platform_branding","experiment_invalid","schedule_invalid","timezone_invalid","tag_manager_container_invalid","shadowed_variant","option_not_routable","low_contrast","wallet_impossible_device","locale_gap","unsupported_locale","condition_no_values","duplicate_option","preselect_not_offered","express_non_wallet","unknown_placeholder","auto_ordering_few_options","card_field_unsupported","schedule_expired","asset_missing"]},"message":{"type":"string"},"variantId":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}}},"required":["code","message"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["schema_invalid","no_variants","no_enabled_variants","no_catch_all","duplicate_variant_id","variant_no_options","unknown_option","unknown_condition_field","invalid_condition_operator","invalid_condition_value","required_section_hidden","custom_css_not_enabled","insecure_logo_url","insecure_content_url","platform_branding","experiment_invalid","schedule_invalid","timezone_invalid","tag_manager_container_invalid","shadowed_variant","option_not_routable","low_contrast","wallet_impossible_device","locale_gap","unsupported_locale","condition_no_values","duplicate_option","preselect_not_offered","express_non_wallet","unknown_placeholder","auto_ordering_few_options","card_field_unsupported","schedule_expired","asset_missing"]},"message":{"type":"string"},"variantId":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}}},"required":["code","message"],"additionalProperties":false}}},"required":["errors","warnings"],"additionalProperties":false}},"required":["kind","publishRequest","validation"],"additionalProperties":false}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"currentRevision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draftUpdatedBy":{"type":["string","null"]},"draftUpdatedAt":{"type":["string","null"]}},"required":["message","currentRevision"],"additionalProperties":false}}}},"422":{"description":"422","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["schema_invalid","no_variants","no_enabled_variants","no_catch_all","duplicate_variant_id","variant_no_options","unknown_option","unknown_condition_field","invalid_condition_operator","invalid_condition_value","required_section_hidden","custom_css_not_enabled","insecure_logo_url","insecure_content_url","platform_branding","experiment_invalid","schedule_invalid","timezone_invalid","tag_manager_container_invalid","shadowed_variant","option_not_routable","low_contrast","wallet_impossible_device","locale_gap","unsupported_locale","condition_no_values","duplicate_option","preselect_not_offered","express_non_wallet","unknown_placeholder","auto_ordering_few_options","card_field_unsupported","schedule_expired","asset_missing"]},"message":{"type":"string"},"variantId":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}}},"required":["code","message"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["schema_invalid","no_variants","no_enabled_variants","no_catch_all","duplicate_variant_id","variant_no_options","unknown_option","unknown_condition_field","invalid_condition_operator","invalid_condition_value","required_section_hidden","custom_css_not_enabled","insecure_logo_url","insecure_content_url","platform_branding","experiment_invalid","schedule_invalid","timezone_invalid","tag_manager_container_invalid","shadowed_variant","option_not_routable","low_contrast","wallet_impossible_device","locale_gap","unsupported_locale","condition_no_values","duplicate_option","preselect_not_offered","express_non_wallet","unknown_placeholder","auto_ordering_few_options","card_field_unsupported","schedule_expired","asset_missing"]},"message":{"type":"string"},"variantId":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}}},"required":["code","message"],"additionalProperties":false}}},"required":["message","errors","warnings"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/checkouts/{id}/versions/{versionId}/cancel":{"post":{"description":"Marks a `scheduled` version `cancelled`; it will never go live. 409 when the version is not scheduled (already live, superseded or cancelled).","summary":"Cancel a scheduled version","tags":["checkouts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"checkoutId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"note":{"type":["string","null"]},"publishedBy":{"type":"string"},"publishedByName":{"type":["string","null"]},"publishedAt":{"type":"string"},"isLive":{"type":"boolean"},"status":{"type":"string","enum":["live","scheduled","superseded","cancelled"]},"publishAt":{"type":["string","null"]}},"required":["id","checkoutId","version","note","publishedBy","publishedAt","isLive","status","publishAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/checkouts/{id}/versions":{"get":{"description":"Newest first.","summary":"List published versions","tags":["checkouts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"checkoutId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"note":{"type":["string","null"]},"publishedBy":{"type":"string"},"publishedByName":{"type":["string","null"]},"publishedAt":{"type":"string"},"isLive":{"type":"boolean"},"status":{"type":"string","enum":["live","scheduled","superseded","cancelled"]},"publishAt":{"type":["string","null"]}},"required":["id","checkoutId","version","note","publishedBy","publishedAt","isLive","status","publishAt"],"additionalProperties":false}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/checkouts/{id}/versions/{versionId}":{"get":{"summary":"Get a published version","tags":["checkouts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Published checkout version","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"checkoutId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"note":{"type":["string","null"]},"publishedBy":{"type":"string"},"publishedByName":{"type":["string","null"]},"publishedAt":{"type":"string"},"isLive":{"type":"boolean"},"status":{"type":"string","enum":["live","scheduled","superseded","cancelled"]},"publishAt":{"type":["string","null"]},"doc":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1},"base":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"trustLine":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"payButton":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cardDetailsTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"saveCardLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cancelLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"successTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"failureTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"footerText":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsUrl":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"lastUsedBadge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"}},"additionalProperties":false,"description":"Copy overrides per content key"}},"required":["theme","layout","content"],"additionalProperties":false},"variants":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"enabled":{"type":"boolean"},"conditions":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":100},"op":{"default":"in","type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"default":[],"maxItems":200,"type":"array","items":{"type":["string","number","boolean"]}}},"required":["field","op","values"],"additionalProperties":false,"description":"A single search filter"}},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false},"experiment":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","enum":["running","stopped"]},"arms":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"weight":{"type":"number","minimum":0,"maximum":10000,"description":"Relative traffic share (> 0 to publish)"},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false}},"required":["id","name","weight"],"additionalProperties":false,"description":"Experiment arm: replaces the variant's options and/or deep-merges overrides"}}},"required":["id","status","arms"],"additionalProperties":false,"description":"A/B experiment; the first arm is the control"},"optionOrdering":{"type":"string","enum":["manual","auto"]},"schedule":{"type":"object","properties":{"from":{"description":"Inclusive start (ISO 8601)","type":"string","maxLength":64},"until":{"description":"Exclusive end (ISO 8601)","type":"string","maxLength":64}},"additionalProperties":false}},"required":["id","name","enabled","conditions","options"],"additionalProperties":false}},"timezone":{"type":"string","maxLength":64},"tagManager":{"type":"object","properties":{"containerId":{"type":"string","minLength":1,"maxLength":32},"consentDefault":{"type":"string","enum":["denied","granted"]}},"required":["containerId"],"additionalProperties":false}},"required":["schemaVersion","base","variants"],"additionalProperties":false,"description":"Checkout builder document"}},"required":["id","checkoutId","version","note","publishedBy","publishedAt","isLive","status","publishAt","doc"],"additionalProperties":false,"description":"Published checkout version"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/checkouts/{id}/rollback":{"post":{"description":"Makes an older version live again. No new version is created and the draft is untouched.","summary":"Roll back the live version","tags":["checkouts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string"}},"required":["versionId"]}}}},"responses":{"200":{"description":"Checkout summary","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"customerId":{"type":["string","null"]},"scope":{"type":"string","enum":["organization","customer"]},"name":{"type":"string"},"slug":{"type":"string","minLength":3,"maxLength":256,"pattern":"^[a-z0-9-]+$"},"isDefault":{"type":"boolean"},"applicationSlugIds":{"type":"array","items":{"type":"string"}},"allowRequestAppearance":{"type":"boolean","description":"Deprecated — read `requestAppearanceMode`. True unless `requestAppearanceMode` is `ignore`."},"requestAppearanceMode":{"type":"string","enum":["fill","override","ignore"],"description":"How the `appearance` an integration sends with a checkout session combines with this checkout's published design. `fill` (default): the design wins — the request only fills in fields the design leaves unset (per colour key, per flat field, per field inside each token group; `customCss` only when the design has none). `override`: the request's values replace the design's, field by field. `ignore`: the request appearance is not used while this design serves the session. Sessions without a published design always use the request appearance as their whole theme."},"liveVersionId":{"type":["string","null"]},"liveVersionNumber":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"lastPublishedAt":{"type":["string","null"]},"variantsCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draftRevision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draftUpdatedAt":{"type":["string","null"]},"draftUpdatedBy":{"type":["string","null"]},"hasUnpublishedChanges":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"scheduledVersionId":{"type":["string","null"]},"scheduledPublishAt":{"type":["string","null"]},"pendingPublishRequestId":{"type":["string","null"]}},"required":["id","organizationId","customerId","scope","name","slug","isDefault","applicationSlugIds","allowRequestAppearance","requestAppearanceMode","liveVersionId","liveVersionNumber","lastPublishedAt","variantsCount","draftRevision","draftUpdatedAt","draftUpdatedBy","hasUnpublishedChanges","createdAt","updatedAt"],"additionalProperties":false,"description":"Checkout summary"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/checkouts/{id}/simulate":{"post":{"description":"Which variant a shopper with these facts gets, and why (per-condition pass/fail).","summary":"Simulate variant matching","tags":["checkouts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"facts":{"type":"object","properties":{"shopper":{"type":"object","properties":{"country":{"type":"string","maxLength":3},"ipCountry":{"type":"string","maxLength":3},"returning":{"type":"boolean"},"lastUsedOption":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}}},"time":{"description":"Simulated render time; omitted fields are computed from `now` in the doc timezone","type":"object","properties":{"dayOfWeek":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]},"hour":{"type":"integer","minimum":0,"maximum":23}}},"amount":{"type":"object","properties":{"currency":{"type":"string","maxLength":8},"value":{"anyOf":[{"type":"string","maxLength":40},{"type":"number"}]}}},"device":{"type":"object","properties":{"type":{"type":"string","enum":["mobile","tablet","desktop"]},"os":{"type":"string","enum":["ios","android","macos","windows","linux","chromeos","other"]}}},"browser":{"type":"string","enum":["safari","chrome","firefox","edge","samsung","opera","other"]},"locale":{"type":"string","maxLength":35},"direction":{"type":"string","enum":["debit","credit"]},"application":{"type":"string","maxLength":100},"embedMode":{"type":"string","enum":["iframe","redirect"]},"customer":{"type":"string","maxLength":100}},"description":"Shopper facts to match variant conditions against"},"useDraft":{"type":"boolean"},"locale":{"type":"string","maxLength":35},"now":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"stickyKey":{"type":"string","maxLength":200},"armId":{"type":"string","maxLength":64}},"required":["facts"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"variantId":{"type":["string","null"]},"trace":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"name":{"type":"string"},"enabled":{"type":"boolean"},"matched":{"type":"boolean"},"outsideSchedule":{"type":"boolean"},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"op":{"type":"string"},"values":{"type":"array","items":{"type":["string","number","boolean"]}},"actual":{},"pass":{"type":"boolean"},"ignored":{"type":"boolean"}},"required":["field","op","values","actual","pass"],"additionalProperties":false}}},"required":["variantId","name","enabled","matched","conditions"],"additionalProperties":false}},"options":{"type":"array","items":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}},"presentation":{"anyOf":[{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"default":true,"description":"Promote, preselect and badge the shopper's last-used option (default true)","type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"required":["fieldLayout","showCardholderName","showSaveCard","showBrandIcons"],"additionalProperties":false},"showResult":{"default":true,"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"required":["template","optionsDisplay","maxVisibleOptions","preselect","promoteLastUsed","sections","cardForm","showResult"],"additionalProperties":false,"description":"Resolved checkout layout"},"content":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"options":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["card-debit-new","card-debit-token","card-credit-token","ideal-debit","bancontact-debit","paypal-debit","klarna-debit","pay-by-bank-debit","swish-debit","applepay-debit","googlepay-debit","crypto-onramp-debit","crypto-accept-debit"],"description":"Payment option type identifier"},"paymentOption":{"description":"Canonical PSP-independent payment option this entry belongs to","type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"displayName":{"description":"User-facing display name. Always the payment option — never the underlying gateway.","type":"string"},"flow":{"description":"How the option is completed: inline card entry, a redirect that continues in the payment method's own page, or a device-wallet sheet raised in the checkout page itself.","type":"string","enum":["inline-card","redirect","wallet"]},"redirectDisplay":{"description":"How a redirect-flow option's provider page is displayed: in the checkout overlay iframe, or a popup handoff (bank/wallet pages routinely refuse framing via X-Frame-Options).","type":"string","enum":["iframe","popup"]},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Field name"},"type":{"type":"string","enum":["string","number","boolean"],"description":"Field type"},"required":{"type":"boolean","description":"Whether the field is required"},"label":{"type":"string","description":"Display label for the field"},"placeholder":{"description":"Placeholder text","type":"string"},"regex":{"description":"Validation regex pattern","type":"string"}},"required":["name","type","required","label"],"additionalProperties":false,"description":"Schema for a payment option field"},"description":"Fields required for this payment option"},"icon":{"description":"Icon URL or name","type":"string"},"wallet":{"description":"Setup for a `wallet`-flow option's sheet, filled in by the routed provider","type":"object","properties":{"environment":{"type":"string","enum":["TEST","PRODUCTION"],"description":"Wallet environment the provider's credentials belong to"},"merchantName":{"type":"string","maxLength":128,"description":"Name the sheet shows the shopper as the payee"},"countryCode":{"type":"string","minLength":2,"maxLength":2,"description":"Merchant country, ISO 3166-1 alpha-2"},"supportedNetworks":{"minItems":1,"type":"array","items":{"type":"string","maxLength":32},"description":"Card networks the processor accepts, in the wallet's vocabulary"},"merchantCapabilities":{"description":"Apple Pay merchant capabilities (e.g. supports3DS)","type":"array","items":{"type":"string","maxLength":32}},"allowedAuthMethods":{"description":"Google Pay auth methods (e.g. PAN_ONLY, CRYPTOGRAM_3DS)","type":"array","items":{"type":"string","maxLength":32}},"gateway":{"description":"Google Pay gateway identifier — opaque to the checkout","type":"string","maxLength":64},"gatewayMerchantId":{"description":"Google Pay gateway merchant id — opaque to the checkout","type":"string","maxLength":128},"merchantId":{"description":"Google Pay merchant id issued by Google, required in PRODUCTION","type":"string","maxLength":128},"requiresMerchantSession":{"description":"Apple Pay: the page must call POST /checkout/wallet/session to validate the merchant before the sheet can proceed","type":"boolean"},"vault":{"description":"Set when a card vault, not the processor, decrypts the wallet token: the page raises the sheet through the vault's wallet component and posts back a network token","type":"object","properties":{"provider":{"type":"string","const":"evervault","description":"Card vault whose wallet component raises the sheet"},"teamId":{"type":"string","minLength":1,"maxLength":64,"description":"Evervault team id (public)"},"appId":{"type":"string","minLength":1,"maxLength":64,"description":"Evervault app id (public); the app whose key encrypts the network token"},"merchantId":{"type":"string","minLength":1,"maxLength":128,"description":"Evervault merchant id the wallet transaction is created under"}},"required":["provider","teamId","appId","merchantId"],"additionalProperties":false}},"required":["environment","merchantName","countryCode","supportedNetworks"],"additionalProperties":false},"presentation":{"type":"object","properties":{"label":{"type":"string"},"description":{"type":"string"},"badge":{"type":"string"},"placement":{"type":"string","enum":["express","list"]},"lastUsed":{"type":"boolean"}},"required":["placement"],"additionalProperties":false}},"required":["type","fields"],"additionalProperties":false}},"meta":{"type":"object","properties":{"checkoutId":{"type":"string"},"versionId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"variantId":{"type":"string"},"variantName":{"type":"string"},"preview":{"type":"boolean"},"viewToken":{"type":"string"},"clientEventsEnabled":{"type":"boolean"},"lastUsed":{"type":"object","properties":{"option":{"type":"string"},"tokenId":{"type":"string"},"promoted":{"type":"boolean"}},"required":["option","promoted"],"additionalProperties":false},"pinnedOption":{"type":"string"},"experimentId":{"type":"string"},"armId":{"type":"string"},"autoOrdered":{"type":"boolean"}},"additionalProperties":false},"tagManager":{"type":"object","properties":{"containerId":{"type":"string","minLength":1,"maxLength":32},"consentDefault":{"type":"string","enum":["denied","granted"]}},"required":["containerId"],"additionalProperties":false}},"required":["theme","layout","content","options","meta"],"additionalProperties":false,"description":"Resolved checkout presentation for this session"},{"type":"null"}]},"experimentId":{"type":["string","null"]},"armId":{"type":["string","null"]},"time":{"type":"object","properties":{"dayOfWeek":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]},"hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["dayOfWeek","hour"],"additionalProperties":false}},"required":["variantId","trace","options","presentation"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/checkouts/{id}/preview-token":{"post":{"description":"Short-lived `pv_` token authorizing the builder's preview iframe on the checkout host.","summary":"Mint a preview token","tags":["checkouts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"expiresAt":{"type":"string"},"previewOrigin":{"type":"string"}},"required":["token","expiresAt","previewOrigin"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/checkouts/{id}/preview/interstitial":{"post":{"description":"Renders one of the payment-flow pages served after the checkout (retry, 3DS hand-off, email code, processing, result) with a draft variant's theme, exactly as the real page would — returned as an inert HTML document for a sandboxed srcdoc iframe.","summary":"Preview an interstitial page","tags":["checkouts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"doc":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1},"base":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"trustLine":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"payButton":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cardDetailsTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"saveCardLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cancelLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"successTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"failureTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"footerText":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsUrl":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"lastUsedBadge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"}},"additionalProperties":false,"description":"Copy overrides per content key"}},"required":["theme","layout","content"],"additionalProperties":false},"variants":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"enabled":{"type":"boolean"},"conditions":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":100},"op":{"default":"in","type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"default":[],"maxItems":200,"type":"array","items":{"type":["string","number","boolean"]}}},"required":["field"],"description":"A single search filter"}},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false},"experiment":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","enum":["running","stopped"]},"arms":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"weight":{"type":"number","minimum":0,"maximum":10000,"description":"Relative traffic share (> 0 to publish)"},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false}},"required":["id","name","weight"],"additionalProperties":false,"description":"Experiment arm: replaces the variant's options and/or deep-merges overrides"}}},"required":["id","status","arms"],"additionalProperties":false,"description":"A/B experiment; the first arm is the control"},"optionOrdering":{"type":"string","enum":["manual","auto"]},"schedule":{"type":"object","properties":{"from":{"description":"Inclusive start (ISO 8601)","type":"string","maxLength":64},"until":{"description":"Exclusive end (ISO 8601)","type":"string","maxLength":64}},"additionalProperties":false}},"required":["id","name","enabled","conditions","options"],"additionalProperties":false}},"timezone":{"type":"string","maxLength":64},"tagManager":{"type":"object","properties":{"containerId":{"type":"string","minLength":1,"maxLength":32},"consentDefault":{"type":"string","enum":["denied","granted"]}},"required":["containerId"],"additionalProperties":false}},"required":["schemaVersion","base","variants"],"additionalProperties":false,"description":"Checkout builder document"},"variantId":{"type":"string","maxLength":64},"armId":{"type":"string","maxLength":64},"screen":{"type":"string","enum":["retry","3ds","email-otp","processing","result-success","result-failure"]},"locale":{"type":"string","maxLength":35}},"required":["doc","screen"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"html":{"type":"string"},"variantId":{"type":["string","null"]}},"required":["html","variantId"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/checkouts/{id}/preview-link":{"post":{"description":"Stores a snapshot of the posted (unsaved) doc for 30 minutes and returns a `pl_` link on the checkout host that renders it top-level — inert, with the preview ribbon, `noindex`, `no-store`. Show it as a QR code. Anyone holding the link can view the preview until it expires.","summary":"Open a draft on a phone","tags":["checkouts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"doc":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1},"base":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"trustLine":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"payButton":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cardDetailsTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"saveCardLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cancelLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"successTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"failureTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"footerText":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsUrl":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"lastUsedBadge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"}},"additionalProperties":false,"description":"Copy overrides per content key"}},"required":["theme","layout","content"],"additionalProperties":false},"variants":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"enabled":{"type":"boolean"},"conditions":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":100},"op":{"default":"in","type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"default":[],"maxItems":200,"type":"array","items":{"type":["string","number","boolean"]}}},"required":["field"],"description":"A single search filter"}},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false},"experiment":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","enum":["running","stopped"]},"arms":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"weight":{"type":"number","minimum":0,"maximum":10000,"description":"Relative traffic share (> 0 to publish)"},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false}},"required":["id","name","weight"],"additionalProperties":false,"description":"Experiment arm: replaces the variant's options and/or deep-merges overrides"}}},"required":["id","status","arms"],"additionalProperties":false,"description":"A/B experiment; the first arm is the control"},"optionOrdering":{"type":"string","enum":["manual","auto"]},"schedule":{"type":"object","properties":{"from":{"description":"Inclusive start (ISO 8601)","type":"string","maxLength":64},"until":{"description":"Exclusive end (ISO 8601)","type":"string","maxLength":64}},"additionalProperties":false}},"required":["id","name","enabled","conditions","options"],"additionalProperties":false}},"timezone":{"type":"string","maxLength":64},"tagManager":{"type":"object","properties":{"containerId":{"type":"string","minLength":1,"maxLength":32},"consentDefault":{"type":"string","enum":["denied","granted"]}},"required":["containerId"],"additionalProperties":false}},"required":["schemaVersion","base","variants"],"additionalProperties":false,"description":"Checkout builder document"},"variantId":{"type":"string","maxLength":64},"armId":{"type":"string","maxLength":64},"facts":{"type":"object","properties":{"shopper":{"type":"object","properties":{"country":{"type":"string","maxLength":3},"ipCountry":{"type":"string","maxLength":3},"returning":{"type":"boolean"},"lastUsedOption":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}}},"time":{"description":"Simulated render time; omitted fields are computed from `now` in the doc timezone","type":"object","properties":{"dayOfWeek":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]},"hour":{"type":"integer","minimum":0,"maximum":23}}},"amount":{"type":"object","properties":{"currency":{"type":"string","maxLength":8},"value":{"anyOf":[{"type":"string","maxLength":40},{"type":"number"}]}}},"device":{"type":"object","properties":{"type":{"type":"string","enum":["mobile","tablet","desktop"]},"os":{"type":"string","enum":["ios","android","macos","windows","linux","chromeos","other"]}}},"browser":{"type":"string","enum":["safari","chrome","firefox","edge","samsung","opera","other"]},"locale":{"type":"string","maxLength":35},"direction":{"type":"string","enum":["debit","credit"]},"application":{"type":"string","maxLength":100},"embedMode":{"type":"string","enum":["iframe","redirect"]},"customer":{"type":"string","maxLength":100}},"description":"Shopper facts to match variant conditions against"},"locale":{"type":"string","maxLength":35},"screen":{"type":"string","enum":["form","processing","3ds","retry","result-success","result-failure","email-otp"]}},"required":["doc"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"type":"string"}},"required":["url","expiresAt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/publish-requests":{"get":{"description":"Publish requests of the selected context, newest first. Uncounted: `meta.hasMore` drives the pager; pass `count=true` for `meta.total`.","summary":"List publish requests","tags":["checkouts"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"customerId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"page","in":"query","schema":{"default":1,"type":"number","minimum":1}},{"name":"limit","in":"query","schema":{"default":100,"type":"number","minimum":1}},{"name":"dateRange","in":"query","style":"deepObject","schema":{"type":"object","properties":{"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}}}},{"name":"refresh","in":"query","schema":{"type":"boolean"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["status","checkoutId"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"checkoutId":{"type":"string"},"checkoutName":{"type":"string"},"customerId":{"type":["string","null"]},"draftRevision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"note":{"type":["string","null"]},"publishAt":{"type":["string","null"]},"status":{"type":"string","enum":["pending","approved","rejected","cancelled"]},"requestedBy":{"type":"string"},"requestedByName":{"type":["string","null"]},"requestedAt":{"type":"string"},"decidedBy":{"type":["string","null"]},"decidedByName":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"decisionReason":{"type":["string","null"]},"versionId":{"type":["string","null"]}},"required":["id","checkoutId","checkoutName","draftRevision","note","publishAt","status","requestedBy","requestedAt","decidedBy","decidedAt","decisionReason","versionId"],"additionalProperties":false,"description":"Checkout publish request"}},"meta":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"},"total":{"type":"number"}},"required":["page","pageSize","hasMore"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/publish-requests/{requestId}":{"get":{"description":"The request with the doc snapshot it would publish and that snapshot's current validation.","summary":"Get a publish request","tags":["checkouts"],"parameters":[{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Checkout publish request with its doc snapshot","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"checkoutId":{"type":"string"},"checkoutName":{"type":"string"},"customerId":{"type":["string","null"]},"draftRevision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"note":{"type":["string","null"]},"publishAt":{"type":["string","null"]},"status":{"type":"string","enum":["pending","approved","rejected","cancelled"]},"requestedBy":{"type":"string"},"requestedByName":{"type":["string","null"]},"requestedAt":{"type":"string"},"decidedBy":{"type":["string","null"]},"decidedByName":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"decisionReason":{"type":["string","null"]},"versionId":{"type":["string","null"]},"doc":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1},"base":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"trustLine":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"payButton":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cardDetailsTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"saveCardLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cancelLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"successTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"failureTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"footerText":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsUrl":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"lastUsedBadge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"}},"additionalProperties":false,"description":"Copy overrides per content key"}},"required":["theme","layout","content"],"additionalProperties":false},"variants":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"enabled":{"type":"boolean"},"conditions":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":100},"op":{"default":"in","type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"default":[],"maxItems":200,"type":"array","items":{"type":["string","number","boolean"]}}},"required":["field","op","values"],"additionalProperties":false,"description":"A single search filter"}},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false},"experiment":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","enum":["running","stopped"]},"arms":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"weight":{"type":"number","minimum":0,"maximum":10000,"description":"Relative traffic share (> 0 to publish)"},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false}},"required":["id","name","weight"],"additionalProperties":false,"description":"Experiment arm: replaces the variant's options and/or deep-merges overrides"}}},"required":["id","status","arms"],"additionalProperties":false,"description":"A/B experiment; the first arm is the control"},"optionOrdering":{"type":"string","enum":["manual","auto"]},"schedule":{"type":"object","properties":{"from":{"description":"Inclusive start (ISO 8601)","type":"string","maxLength":64},"until":{"description":"Exclusive end (ISO 8601)","type":"string","maxLength":64}},"additionalProperties":false}},"required":["id","name","enabled","conditions","options"],"additionalProperties":false}},"timezone":{"type":"string","maxLength":64},"tagManager":{"type":"object","properties":{"containerId":{"type":"string","minLength":1,"maxLength":32},"consentDefault":{"type":"string","enum":["denied","granted"]}},"required":["containerId"],"additionalProperties":false}},"required":["schemaVersion","base","variants"],"additionalProperties":false,"description":"Checkout builder document"},"validation":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["schema_invalid","no_variants","no_enabled_variants","no_catch_all","duplicate_variant_id","variant_no_options","unknown_option","unknown_condition_field","invalid_condition_operator","invalid_condition_value","required_section_hidden","custom_css_not_enabled","insecure_logo_url","insecure_content_url","platform_branding","experiment_invalid","schedule_invalid","timezone_invalid","tag_manager_container_invalid","shadowed_variant","option_not_routable","low_contrast","wallet_impossible_device","locale_gap","unsupported_locale","condition_no_values","duplicate_option","preselect_not_offered","express_non_wallet","unknown_placeholder","auto_ordering_few_options","card_field_unsupported","schedule_expired","asset_missing"]},"message":{"type":"string"},"variantId":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}}},"required":["code","message"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["schema_invalid","no_variants","no_enabled_variants","no_catch_all","duplicate_variant_id","variant_no_options","unknown_option","unknown_condition_field","invalid_condition_operator","invalid_condition_value","required_section_hidden","custom_css_not_enabled","insecure_logo_url","insecure_content_url","platform_branding","experiment_invalid","schedule_invalid","timezone_invalid","tag_manager_container_invalid","shadowed_variant","option_not_routable","low_contrast","wallet_impossible_device","locale_gap","unsupported_locale","condition_no_values","duplicate_option","preselect_not_offered","express_non_wallet","unknown_placeholder","auto_ordering_few_options","card_field_unsupported","schedule_expired","asset_missing"]},"message":{"type":"string"},"variantId":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}}},"required":["code","message"],"additionalProperties":false}}},"required":["errors","warnings"],"additionalProperties":false}},"required":["id","checkoutId","checkoutName","draftRevision","note","publishAt","status","requestedBy","requestedAt","decidedBy","decidedAt","decisionReason","versionId","doc","validation"],"additionalProperties":false,"description":"Checkout publish request with its doc snapshot"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/publish-requests/{requestId}/approve":{"post":{"description":"Publishes the request's doc snapshot (or schedules it when the request carries `publishAt`). 403 when the approver is the requester — four eyes means two people. 409 when the request is no longer pending. 422 when the snapshot no longer validates.","summary":"Approve and publish","tags":["checkouts"],"parameters":[{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":500}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"publishRequest":{"type":"object","properties":{"id":{"type":"string"},"checkoutId":{"type":"string"},"checkoutName":{"type":"string"},"customerId":{"type":["string","null"]},"draftRevision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"note":{"type":["string","null"]},"publishAt":{"type":["string","null"]},"status":{"type":"string","enum":["pending","approved","rejected","cancelled"]},"requestedBy":{"type":"string"},"requestedByName":{"type":["string","null"]},"requestedAt":{"type":"string"},"decidedBy":{"type":["string","null"]},"decidedByName":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"decisionReason":{"type":["string","null"]},"versionId":{"type":["string","null"]}},"required":["id","checkoutId","checkoutName","draftRevision","note","publishAt","status","requestedBy","requestedAt","decidedBy","decidedAt","decisionReason","versionId"],"additionalProperties":false,"description":"Checkout publish request"},"version":{"type":"object","properties":{"id":{"type":"string"},"checkoutId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"note":{"type":["string","null"]},"publishedBy":{"type":"string"},"publishedByName":{"type":["string","null"]},"publishedAt":{"type":"string"},"isLive":{"type":"boolean"},"status":{"type":"string","enum":["live","scheduled","superseded","cancelled"]},"publishAt":{"type":["string","null"]},"doc":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1},"base":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"trustLine":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"payButton":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cardDetailsTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"saveCardLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"cancelLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"successTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"failureTitle":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"footerText":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsUrl":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"termsLabel":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"lastUsedBadge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"}},"additionalProperties":false,"description":"Copy overrides per content key"}},"required":["theme","layout","content"],"additionalProperties":false},"variants":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"enabled":{"type":"boolean"},"conditions":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":100},"op":{"default":"in","type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"default":[],"maxItems":200,"type":"array","items":{"type":["string","number","boolean"]}}},"required":["field","op","values"],"additionalProperties":false,"description":"A single search filter"}},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false},"experiment":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","enum":["running","stopped"]},"arms":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":120},"weight":{"type":"number","minimum":0,"maximum":10000,"description":"Relative traffic share (> 0 to publish)"},"options":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option":{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]},"label":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"description":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"badge":{"type":"object","properties":{"default":{"type":"string","maxLength":500}},"required":["default"],"additionalProperties":{"type":"string","maxLength":500},"description":"Copy with per-locale variants; `default` is used for any other locale"},"placement":{"type":"string","enum":["express","list"]}},"required":["option"],"additionalProperties":false}},"overrides":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"layout":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false},"showResult":{"type":"boolean","description":"false skips the success/failure page: the shopper returns to the merchant at once"},"responsive":{"type":"object","properties":{"mobile":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"tablet":{"type":"object","properties":{"template":{"type":"string","enum":["single","split","compact"]},"optionsDisplay":{"type":"string","enum":["list","accordion","tabs","tiles"]},"maxVisibleOptions":{"type":"integer","minimum":0,"maximum":50,"description":"0 = all visible"},"preselect":{"anyOf":[{"type":"string","const":"first"},{"type":"string","const":"none"},{"type":"string","enum":["card","ideal","bancontact","paypal","klarna","pay-by-bank","apple-pay","google-pay","swish","crypto-onramp","crypto-accept"]}]},"promoteLastUsed":{"type":"boolean"},"sections":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["logo","summary","trust","express","options","pay","brands","footer"]},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}},"cardForm":{"type":"object","properties":{"fieldLayout":{"type":"string","enum":["stacked","combined-row"]},"showCardholderName":{"type":"boolean"},"showSaveCard":{"type":"boolean"},"showBrandIcons":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false,"description":"Partial checkout layout (stored)"},"content":{"type":"object","properties":{"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"trustLine":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"payButton":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cardDetailsTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"saveCardLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"cancelLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"successTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"failureTitle":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"footerText":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsUrl":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"termsLabel":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"},"lastUsedBadge":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500},"description":"Partial LocalizedText (override)"}},"additionalProperties":false,"description":"Partial copy overrides"}},"additionalProperties":false}},"required":["id","name","weight"],"additionalProperties":false,"description":"Experiment arm: replaces the variant's options and/or deep-merges overrides"}}},"required":["id","status","arms"],"additionalProperties":false,"description":"A/B experiment; the first arm is the control"},"optionOrdering":{"type":"string","enum":["manual","auto"]},"schedule":{"type":"object","properties":{"from":{"description":"Inclusive start (ISO 8601)","type":"string","maxLength":64},"until":{"description":"Exclusive end (ISO 8601)","type":"string","maxLength":64}},"additionalProperties":false}},"required":["id","name","enabled","conditions","options"],"additionalProperties":false}},"timezone":{"type":"string","maxLength":64},"tagManager":{"type":"object","properties":{"containerId":{"type":"string","minLength":1,"maxLength":32},"consentDefault":{"type":"string","enum":["denied","granted"]}},"required":["containerId"],"additionalProperties":false}},"required":["schemaVersion","base","variants"],"additionalProperties":false,"description":"Checkout builder document"}},"required":["id","checkoutId","version","note","publishedBy","publishedAt","isLive","status","publishAt","doc"],"additionalProperties":false,"description":"Published checkout version"},"validation":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["schema_invalid","no_variants","no_enabled_variants","no_catch_all","duplicate_variant_id","variant_no_options","unknown_option","unknown_condition_field","invalid_condition_operator","invalid_condition_value","required_section_hidden","custom_css_not_enabled","insecure_logo_url","insecure_content_url","platform_branding","experiment_invalid","schedule_invalid","timezone_invalid","tag_manager_container_invalid","shadowed_variant","option_not_routable","low_contrast","wallet_impossible_device","locale_gap","unsupported_locale","condition_no_values","duplicate_option","preselect_not_offered","express_non_wallet","unknown_placeholder","auto_ordering_few_options","card_field_unsupported","schedule_expired","asset_missing"]},"message":{"type":"string"},"variantId":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}}},"required":["code","message"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["schema_invalid","no_variants","no_enabled_variants","no_catch_all","duplicate_variant_id","variant_no_options","unknown_option","unknown_condition_field","invalid_condition_operator","invalid_condition_value","required_section_hidden","custom_css_not_enabled","insecure_logo_url","insecure_content_url","platform_branding","experiment_invalid","schedule_invalid","timezone_invalid","tag_manager_container_invalid","shadowed_variant","option_not_routable","low_contrast","wallet_impossible_device","locale_gap","unsupported_locale","condition_no_values","duplicate_option","preselect_not_offered","express_non_wallet","unknown_placeholder","auto_ordering_few_options","card_field_unsupported","schedule_expired","asset_missing"]},"message":{"type":"string"},"variantId":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}}},"required":["code","message"],"additionalProperties":false}}},"required":["errors","warnings"],"additionalProperties":false}},"required":["publishRequest","version","validation"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"422":{"description":"422","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["schema_invalid","no_variants","no_enabled_variants","no_catch_all","duplicate_variant_id","variant_no_options","unknown_option","unknown_condition_field","invalid_condition_operator","invalid_condition_value","required_section_hidden","custom_css_not_enabled","insecure_logo_url","insecure_content_url","platform_branding","experiment_invalid","schedule_invalid","timezone_invalid","tag_manager_container_invalid","shadowed_variant","option_not_routable","low_contrast","wallet_impossible_device","locale_gap","unsupported_locale","condition_no_values","duplicate_option","preselect_not_offered","express_non_wallet","unknown_placeholder","auto_ordering_few_options","card_field_unsupported","schedule_expired","asset_missing"]},"message":{"type":"string"},"variantId":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}}},"required":["code","message"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["schema_invalid","no_variants","no_enabled_variants","no_catch_all","duplicate_variant_id","variant_no_options","unknown_option","unknown_condition_field","invalid_condition_operator","invalid_condition_value","required_section_hidden","custom_css_not_enabled","insecure_logo_url","insecure_content_url","platform_branding","experiment_invalid","schedule_invalid","timezone_invalid","tag_manager_container_invalid","shadowed_variant","option_not_routable","low_contrast","wallet_impossible_device","locale_gap","unsupported_locale","condition_no_values","duplicate_option","preselect_not_offered","express_non_wallet","unknown_placeholder","auto_ordering_few_options","card_field_unsupported","schedule_expired","asset_missing"]},"message":{"type":"string"},"variantId":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}}},"required":["code","message"],"additionalProperties":false}}},"required":["message","errors","warnings"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/publish-requests/{requestId}/reject":{"post":{"description":"Rejects with a reason shown to the requester. 403 when the rejecter is the requester (they cancel instead). 409 when no longer pending.","summary":"Reject a publish request","tags":["checkouts"],"parameters":[{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"]}}}},"responses":{"200":{"description":"Checkout publish request","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"checkoutId":{"type":"string"},"checkoutName":{"type":"string"},"customerId":{"type":["string","null"]},"draftRevision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"note":{"type":["string","null"]},"publishAt":{"type":["string","null"]},"status":{"type":"string","enum":["pending","approved","rejected","cancelled"]},"requestedBy":{"type":"string"},"requestedByName":{"type":["string","null"]},"requestedAt":{"type":"string"},"decidedBy":{"type":["string","null"]},"decidedByName":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"decisionReason":{"type":["string","null"]},"versionId":{"type":["string","null"]}},"required":["id","checkoutId","checkoutName","draftRevision","note","publishAt","status","requestedBy","requestedAt","decidedBy","decidedAt","decisionReason","versionId"],"additionalProperties":false,"description":"Checkout publish request"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/publish-requests/{requestId}/cancel":{"post":{"description":"Requester only (403 for anyone else). 409 when no longer pending.","summary":"Withdraw a publish request","tags":["checkouts"],"parameters":[{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Checkout publish request","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"checkoutId":{"type":"string"},"checkoutName":{"type":"string"},"customerId":{"type":["string","null"]},"draftRevision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"note":{"type":["string","null"]},"publishAt":{"type":["string","null"]},"status":{"type":"string","enum":["pending","approved","rejected","cancelled"]},"requestedBy":{"type":"string"},"requestedByName":{"type":["string","null"]},"requestedAt":{"type":"string"},"decidedBy":{"type":["string","null"]},"decidedByName":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"decisionReason":{"type":["string","null"]},"versionId":{"type":["string","null"]}},"required":["id","checkoutId","checkoutName","draftRevision","note","publishAt","status","requestedBy","requestedAt","decidedBy","decidedAt","decisionReason","versionId"],"additionalProperties":false,"description":"Checkout publish request"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/assets":{"post":{"description":"Raw upload: the request body IS the file (not a form). Headers: `Content-Type` — one of image/png, image/jpeg, image/webp, image/svg+xml, font/woff2; `X-File-Name` — the original file name. Max 1048576 bytes (413 above). SVG is accepted only when it sanitizes cleanly (no script, foreignObject or external references; 400 otherwise). Stored per context; immutable once uploaded.","summary":"Upload a logo or font","tags":["checkouts"],"parameters":[],"requestBody":{"description":"Body","content":{"multipart/form-data":{"schema":{}}}},"responses":{"201":{"description":"Checkout builder asset","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Checkout builder asset id"},"filename":{"type":"string"},"contentType":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/svg+xml","font/woff2"]},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"}},"required":["id","filename","contentType","size","url","createdAt","createdBy"],"additionalProperties":false,"description":"Checkout builder asset"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"413":{"description":"413","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}},"get":{"description":"Logos and fonts of the selected context, newest first. Uncounted: `meta.hasMore` drives the pager; pass `count=true` for `meta.total`.","summary":"List uploaded assets","tags":["checkouts"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"customerId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"page","in":"query","schema":{"default":1,"type":"number","minimum":1}},{"name":"limit","in":"query","schema":{"default":100,"type":"number","minimum":1}},{"name":"dateRange","in":"query","style":"deepObject","schema":{"type":"object","properties":{"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}}}},{"name":"refresh","in":"query","schema":{"type":"boolean"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["contentType","filename"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Checkout builder asset id"},"filename":{"type":"string"},"contentType":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/svg+xml","font/woff2"]},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"}},"required":["id","filename","contentType","size","url","createdAt","createdBy"],"additionalProperties":false,"description":"Checkout builder asset"}},"meta":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"},"total":{"type":"number"}},"required":["page","pageSize","hasMore"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/assets/{assetId}":{"delete":{"description":"409 while a live or scheduled checkout version references it (drafts referencing it get an `asset_missing` warning).","summary":"Delete an uploaded asset","tags":["checkouts"],"parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"checkoutIds":{"type":"array","items":{"type":"string"}}},"required":["message","checkoutIds"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-builder/brand-import":{"post":{"description":"Fetches the page (https only, no IP-literal or localhost hosts, 1 MB cap, 5 s timeouts) and proposes colours (theme-color, CSS custom properties, the most-used colours in inline and linked CSS), a logo (og:image, apple-touch-icon, images labelled as a logo) and the closest font stack. Nothing is saved — apply the proposal in the builder. 422 when the page could not be read.","summary":"Propose a theme from a website","tags":["checkouts"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"}},"required":["url"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"theme":{"type":"object","properties":{"colors":{"type":"object","properties":{"background":{"description":"Page background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surface":{"description":"Main card background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"surfaceElevated":{"description":"Inputs / chips background","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"border":{"description":"Default border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"borderHighlight":{"description":"Hover / focus border color","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textPrimary":{"description":"Primary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textSecondary":{"description":"Secondary text","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"textMuted":{"description":"Muted text / placeholders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accent":{"description":"Accent (pay button, highlights)","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"accentSecondary":{"description":"Second accent gradient stop. Defaults to `accent` when omitted, producing a solid button.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"danger":{"description":"Error text / borders","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"success":{"description":"Success text / icons","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"buttonText":{"description":"Pay button text. Defaults to white (the accent for an `outline` button).","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBackground":{"description":"Input fill. Defaults to the fill implied by `input.style`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"inputBorder":{"description":"Input border. Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"focusRing":{"description":"Focus ring / focused input border. Defaults to `borderHighlight`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"link":{"description":"Inline links (terms, cancel). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"cardBorder":{"description":"Outer border (`shape.cardBorder` thin / thick). Defaults to `border`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"},"selection":{"description":"Selected payment option (border, ring, radio mark). Defaults to `accent`.","type":"string","maxLength":64,"pattern":"^(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla)\\(\\s*[\\d.,%\\s/]+\\s*\\))$"}},"additionalProperties":false},"logoUrl":{"description":"Merchant logo shown above the checkout card (https only)","type":"string","maxLength":2048,"format":"uri","pattern":"^https:\\/\\/.*"},"cornerRadius":{"description":"Corner-radius scale for cards, inputs and buttons (default md). `full` makes buttons and inputs pills.","type":"string","enum":["none","xs","sm","md","lg","xl","full"]},"fontFamily":{"description":"Font stack. System/local font stacks only — the checkout CSP does not allow external font loading.","type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},"customCss":{"description":"Raw CSS appended after the theme (sanitized: `@import`, external url() references and markup are stripped). Requires checkoutCustomCssEnabled on the organization.","type":"string","maxLength":50000},"typography":{"type":"object","properties":{"baseSize":{"description":"Base text size; scales every size on the page (default md)","type":"string","enum":["sm","md","lg"]},"headingWeight":{"description":"Heading font weight (default 600)","anyOf":[{"type":"number","const":500},{"type":"number","const":600},{"type":"number","const":700},{"type":"number","const":800}]},"letterSpacing":{"description":"Letter spacing (default normal)","type":"string","enum":["tight","normal","wide"]},"customFont":{"description":"Uploaded font (checkout builder designs only); the `fontFamily` stack is its fallback","type":"object","properties":{"assetId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Uploaded `font/woff2` asset"},"family":{"type":"string","pattern":"^[A-Za-z0-9 \\-]{1,40}$","description":"CSS family name the @font-face declares"}},"required":["assetId","family"],"additionalProperties":false}},"additionalProperties":false},"shape":{"description":"Border width and card shadow","type":"object","properties":{"borderWidth":{"description":"Border px for option rows, inputs and inner panels — not the outer card (default 1)","anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}]},"cardBorder":{"description":"Outermost border: `accent` top stripe (default), `none`, or a `thin` / `thick` line in `colors.cardBorder`","type":"string","enum":["accent","none","thin","thick"]},"shadow":{"description":"Checkout card elevation (default lg)","type":"string","enum":["none","sm","md","lg"]}},"additionalProperties":false},"spacing":{"description":"Spacing density","type":"object","properties":{"density":{"description":"Spacing density (default comfortable)","type":"string","enum":["compact","comfortable","spacious"]}},"additionalProperties":false},"button":{"description":"Pay button style, size and width","type":"object","properties":{"style":{"description":"Pay button paint (default gradient — a solid button when only `accent` is set)","type":"string","enum":["solid","gradient","outline"]},"size":{"description":"Pay button size (default md)","type":"string","enum":["sm","md","lg"]},"fullWidth":{"description":"Stretch the pay button to the card width (default true)","type":"boolean"}},"additionalProperties":false},"input":{"description":"Input style and label position","type":"object","properties":{"style":{"description":"Input style (default outlined)","type":"string","enum":["outlined","filled","underlined"]},"labelPosition":{"description":"Label position for option fields (default above). Card fields follow what the Card SDK supports.","type":"string","enum":["above","floating","hidden"]}},"additionalProperties":false},"logo":{"type":"object","properties":{"height":{"description":"Logo height (default md, 40px)","type":"string","enum":["sm","md","lg"]},"align":{"description":"Logo alignment (default center)","type":"string","enum":["left","center","right"]},"assetId":{"description":"Uploaded logo (checkout builder designs only); wins over `logoUrl` on the hosted checkout","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"additionalProperties":false}},"additionalProperties":false,"description":"Checkout theme: colours, logo, radius, font and the typography/shape/spacing/button/input/logo groups (plus uploaded logo/font assets)"},"logoUrl":{"type":["string","null"]},"fontFamily":{"anyOf":[{"type":"string","enum":["system","serif","mono","rounded","humanist","geometric","transitional","slab"]},{"type":"null"}]},"detectedFontFamily":{"type":["string","null"]},"colors":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"source":{"type":"string","enum":["theme-color","manifest","css-variable","stylesheet","inline-style","logo"]},"weight":{"type":"number","minimum":0,"maximum":1}},"required":["value","source","weight"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"string","enum":["page_truncated","stylesheet_unreachable","stylesheet_truncated","too_many_stylesheets","no_colors_found","no_logo_found","logo_not_https","font_not_matched","low_contrast_adjusted"]}}},"required":["theme","logoUrl","fontFamily","colors","warnings"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"422":{"description":"422","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string","enum":["blocked_host","fetch_failed","timeout","not_html","too_large"]}},"required":["message","code"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-insights/funnel":{"get":{"description":"Created → Opened → Engaged → Ready → Submitted → Authenticated → Paid over closed sessions, optionally compared by one dimension.","summary":"Checkout funnel","tags":["checkoutInsights"],"parameters":[{"name":"from","in":"query","schema":{"type":"string"}},{"name":"to","in":"query","schema":{"type":"string"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["checkoutId","variantId","checkoutVersion","deviceType","os","browser","ipCountry","billingCountry","currency","locale","embedMode","direction","returning","appSlugId","exitReason","maxStep","armId","lastUsedPromoted"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}},{"name":"compareBy","in":"query","schema":{"type":"string","enum":["variantId","checkoutVersion","deviceType","os","browser","ipCountry","billingCountry","currency","locale","embedMode","direction","returning","appSlugId","armId","lastUsedPromoted"]}},{"name":"maxGroups","in":"query","schema":{"type":"integer","minimum":1,"maximum":20}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"overall":{"type":"object","properties":{"key":{"type":["string","null"]},"sessions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reached":{"minItems":7,"maxItems":7,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"exits":{"type":"object","propertyNames":{"type":"string","enum":["render_error","cancelled","declined","auth_failed","auth_timeout","poll_timeout","wallet_cancelled","sdk_failed","abandoned"]},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":["render_error","cancelled","declined","auth_failed","auth_timeout","poll_timeout","wallet_cancelled","sdk_failed","abandoned"]}},"required":["key","sessions","reached","exits"],"additionalProperties":false},"groups":{"type":"array","items":{"type":"object","properties":{"key":{"type":["string","null"]},"sessions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reached":{"minItems":7,"maxItems":7,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"exits":{"type":"object","propertyNames":{"type":"string","enum":["render_error","cancelled","declined","auth_failed","auth_timeout","poll_timeout","wallet_cancelled","sdk_failed","abandoned"]},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":["render_error","cancelled","declined","auth_failed","auth_timeout","poll_timeout","wallet_cancelled","sdk_failed","abandoned"]}},"required":["key","sessions","reached","exits"],"additionalProperties":false}},"compareBy":{"type":"string","enum":["variantId","checkoutVersion","deviceType","os","browser","ipCountry","billingCountry","currency","locale","embedMode","direction","returning","appSlugId","armId","lastUsedPromoted"]},"from":{"type":"string"},"to":{"type":"string"},"truncated":{"type":"boolean","description":"True when a query hit a row cap and the numbers are a lower bound"}},"required":["overall","from","to","truncated"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-insights/drop-offs":{"get":{"description":"Exit reasons, validation errors, unavailable options, decline codes and time-on-page of abandons — overall or for sessions that stopped after one step.","summary":"Why shoppers stopped","tags":["checkoutInsights"],"parameters":[{"name":"from","in":"query","schema":{"type":"string"}},{"name":"to","in":"query","schema":{"type":"string"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["checkoutId","variantId","checkoutVersion","deviceType","os","browser","ipCountry","billingCountry","currency","locale","embedMode","direction","returning","appSlugId","exitReason","maxStep","armId","lastUsedPromoted"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}},{"name":"step","in":"query","schema":{"type":"integer","minimum":0,"maximum":5}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"step":{"anyOf":[{"type":"integer","minimum":0,"maximum":6},{"type":"null"}]},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reasons":{"type":"array","items":{"type":"object","properties":{"exitReason":{"type":"string","enum":["render_error","cancelled","declined","auth_failed","auth_timeout","poll_timeout","wallet_cancelled","sdk_failed","abandoned"]},"detail":{"type":["string","null"]},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["exitReason","detail","count"],"additionalProperties":false}},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"errorCode":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["field","errorCode","count"],"additionalProperties":false}},"unavailableOptions":{"type":"array","items":{"type":"object","properties":{"option":{"type":"string"},"reason":{"type":"string"},"browser":{"type":["string","null"]},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["option","reason","browser","count"],"additionalProperties":false}},"declineCodes":{"type":"array","items":{"type":"object","properties":{"statusCode":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["statusCode","count"],"additionalProperties":false}},"abandonTimeOnPage":{"type":"array","items":{"type":"object","properties":{"bucket":{"type":"string","enum":["lt5s","5to30s","30to120s","2to10m","gt10m"]},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["bucket","count"],"additionalProperties":false}},"scriptErrors":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"clientScope":{"type":"string","enum":["sessions","all"]},"truncated":{"type":"boolean","description":"True when a query hit a row cap and the numbers are a lower bound"}},"required":["step","total","reasons","validationErrors","unavailableOptions","declineCodes","abandonTimeOnPage","scriptErrors","truncated"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-insights/timings":{"get":{"description":"p50/p90 between funnel steps and time to interactive by device type.","summary":"Step timings","tags":["checkoutInsights"],"parameters":[{"name":"from","in":"query","schema":{"type":"string"}},{"name":"to","in":"query","schema":{"type":"string"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["checkoutId","variantId","checkoutVersion","deviceType","os","browser","ipCountry","billingCountry","currency","locale","embedMode","direction","returning","appSlugId","exitReason","maxStep","armId","lastUsedPromoted"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"transitions":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"p50Ms":{"type":["number","null"]},"p90Ms":{"type":["number","null"]},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["from","to","p50Ms","p90Ms","count"],"additionalProperties":false}},"timeToInteractive":{"type":"array","items":{"type":"object","properties":{"deviceType":{"type":["string","null"]},"p50Ms":{"type":["number","null"]},"p90Ms":{"type":["number","null"]},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["deviceType","p50Ms","p90Ms","count"],"additionalProperties":false}},"truncated":{"type":"boolean","description":"True when a query hit a row cap and the numbers are a lower bound"}},"required":["transitions","timeToInteractive","truncated"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-insights/options":{"get":{"description":"Per option: offered → selected → submitted → paid, plus selection by on-page position.","summary":"Payment option performance","tags":["checkoutInsights"],"parameters":[{"name":"from","in":"query","schema":{"type":"string"}},{"name":"to","in":"query","schema":{"type":"string"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["checkoutId","variantId","checkoutVersion","deviceType","os","browser","ipCountry","billingCountry","currency","locale","embedMode","direction","returning","appSlugId","exitReason","maxStep","armId","lastUsedPromoted"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"options":{"type":"array","items":{"type":"object","properties":{"option":{"type":"string"},"shown":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"selected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"submitted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"selectionRate":{"type":["number","null"]},"successRate":{"type":["number","null"]},"byPosition":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"selected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["index","selected"],"additionalProperties":false}}},"required":["option","shown","selected","submitted","paid","selectionRate","successRate","byPosition"],"additionalProperties":false}},"truncated":{"type":"boolean","description":"True when a query hit a row cap and the numbers are a lower bound"}},"required":["options","truncated"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-insights/conversion-series":{"get":{"description":"Conversion per hour/day with publish markers; optional before/after comparison around one version.","summary":"Conversion over time","tags":["checkoutInsights"],"parameters":[{"name":"from","in":"query","schema":{"type":"string"}},{"name":"to","in":"query","schema":{"type":"string"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["checkoutId","variantId","checkoutVersion","deviceType","os","browser","ipCountry","billingCountry","currency","locale","embedMode","direction","returning","appSlugId","exitReason","maxStep","armId","lastUsedPromoted"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}},{"name":"interval","in":"query","schema":{"type":"string","enum":["hour","day"]}},{"name":"compareVersionId","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"interval":{"type":"string","enum":["hour","day"]},"buckets":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"sessions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"conversion":{"type":["number","null"]}},"required":["t","sessions","paid","conversion"],"additionalProperties":false}},"publishes":{"type":"array","items":{"type":"object","properties":{"checkoutId":{"type":"string"},"versionId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"publishedAt":{"type":"string"},"note":{"type":["string","null"]}},"required":["checkoutId","versionId","version","publishedAt","note"],"additionalProperties":false}},"versionComparison":{"type":"object","properties":{"versionId":{"type":"string"},"windowHours":{"type":"number"},"before":{"type":"object","properties":{"key":{"type":["string","null"]},"sessions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reached":{"minItems":7,"maxItems":7,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"exits":{"type":"object","propertyNames":{"type":"string","enum":["render_error","cancelled","declined","auth_failed","auth_timeout","poll_timeout","wallet_cancelled","sdk_failed","abandoned"]},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":["render_error","cancelled","declined","auth_failed","auth_timeout","poll_timeout","wallet_cancelled","sdk_failed","abandoned"]}},"required":["key","sessions","reached","exits"],"additionalProperties":false},"after":{"type":"object","properties":{"key":{"type":["string","null"]},"sessions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reached":{"minItems":7,"maxItems":7,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"exits":{"type":"object","propertyNames":{"type":"string","enum":["render_error","cancelled","declined","auth_failed","auth_timeout","poll_timeout","wallet_cancelled","sdk_failed","abandoned"]},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":["render_error","cancelled","declined","auth_failed","auth_timeout","poll_timeout","wallet_cancelled","sdk_failed","abandoned"]}},"required":["key","sessions","reached","exits"],"additionalProperties":false}},"required":["versionId","windowHours","before","after"],"additionalProperties":false},"truncated":{"type":"boolean","description":"True when a query hit a row cap and the numbers are a lower bound"}},"required":["interval","buckets","publishes","truncated"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-insights/sessions":{"get":{"description":"Session explorer. Uncounted: `meta.hasMore` drives the pager; pass `count=true` for `meta.total`.","summary":"List checkout sessions","tags":["checkoutInsights"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"customerId","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"page","in":"query","schema":{"default":1,"type":"number","minimum":1}},{"name":"limit","in":"query","schema":{"default":100,"type":"number","minimum":1}},{"name":"dateRange","in":"query","style":"deepObject","schema":{"type":"object","properties":{"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}}}},{"name":"refresh","in":"query","schema":{"type":"boolean"}},{"name":"from","in":"query","schema":{"type":"string"}},{"name":"to","in":"query","schema":{"type":"string"}},{"name":"filters","in":"query","description":"Filters to apply, as `{ field, op, values }` entries","schema":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","enum":["exitReason","maxStep","checkoutId","variantId","deviceType","ipCountry","billingCountry","currency","appSlugId","lastTransactionId","closed","armId"]},"op":{"type":"string","enum":["eq","ne","in","nin","contains","notContains","startsWith","notStartsWith","gt","gte","lt","lte","isEmpty","isNotEmpty"]},"values":{"type":"array"}},"required":["field"],"description":"A single search filter"},"maxItems":25}},{"name":"count","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"sessionId":{"type":"string"},"organizationId":{"type":"string"},"customerId":{"type":["string","null"]},"appSlugId":{"type":["string","null"]},"checkoutId":{"type":["string","null"]},"checkoutVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"variantId":{"type":["string","null"]},"deviceType":{"type":["string","null"]},"os":{"type":["string","null"]},"browser":{"type":["string","null"]},"ipCountry":{"type":["string","null"]},"billingCountry":{"type":["string","null"]},"currency":{"type":["string","null"]},"amount":{"type":["string","null"]},"locale":{"type":["string","null"]},"embedMode":{"type":["string","null"]},"direction":{"type":["string","null"]},"returning":{"type":["boolean","null"]},"createdAt":{"type":"string"},"openedAt":{"type":["string","null"]},"submittedAt":{"type":["string","null"]},"paidAt":{"type":["string","null"]},"maxStep":{"type":"integer","minimum":0,"maximum":6},"exitReason":{"anyOf":[{"type":"string","enum":["render_error","cancelled","declined","auth_failed","auth_timeout","poll_timeout","wallet_cancelled","sdk_failed","abandoned"]},{"type":"null"}]},"exitDetail":{"type":["string","null"]},"lastClientEvent":{"type":["string","null"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastTransactionId":{"type":["string","null"]},"lastState":{"type":["string","null"]},"lastStatusCode":{"type":["string","null"]},"closedAt":{"type":["string","null"]},"armId":{"type":["string","null"]},"lastUsedPromoted":{"type":["boolean","null"]},"authResult":{"anyOf":[{"type":"string","enum":["passed","failed","unknown"]},{"type":"null"}]},"pinnedOption":{"type":["string","null"]}},"required":["sessionId","organizationId","customerId","appSlugId","checkoutId","checkoutVersion","variantId","deviceType","os","browser","ipCountry","billingCountry","currency","amount","locale","embedMode","direction","returning","createdAt","openedAt","submittedAt","paidAt","maxStep","exitReason","exitDetail","lastClientEvent","attempts","lastTransactionId","lastState","lastStatusCode","closedAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"},"total":{"type":"number"}},"required":["page","pageSize","hasMore"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-insights/sessions/{sessionId}":{"get":{"description":"The session row plus its event timeline.","summary":"One checkout session","tags":["checkoutInsights"],"parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"sessionId":{"type":"string"},"organizationId":{"type":"string"},"customerId":{"type":["string","null"]},"appSlugId":{"type":["string","null"]},"checkoutId":{"type":["string","null"]},"checkoutVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"variantId":{"type":["string","null"]},"deviceType":{"type":["string","null"]},"os":{"type":["string","null"]},"browser":{"type":["string","null"]},"ipCountry":{"type":["string","null"]},"billingCountry":{"type":["string","null"]},"currency":{"type":["string","null"]},"amount":{"type":["string","null"]},"locale":{"type":["string","null"]},"embedMode":{"type":["string","null"]},"direction":{"type":["string","null"]},"returning":{"type":["boolean","null"]},"createdAt":{"type":"string"},"openedAt":{"type":["string","null"]},"submittedAt":{"type":["string","null"]},"paidAt":{"type":["string","null"]},"maxStep":{"type":"integer","minimum":0,"maximum":6},"exitReason":{"anyOf":[{"type":"string","enum":["render_error","cancelled","declined","auth_failed","auth_timeout","poll_timeout","wallet_cancelled","sdk_failed","abandoned"]},{"type":"null"}]},"exitDetail":{"type":["string","null"]},"lastClientEvent":{"type":["string","null"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastTransactionId":{"type":["string","null"]},"lastState":{"type":["string","null"]},"lastStatusCode":{"type":["string","null"]},"closedAt":{"type":["string","null"]},"armId":{"type":["string","null"]},"lastUsedPromoted":{"type":["boolean","null"]},"authResult":{"anyOf":[{"type":"string","enum":["passed","failed","unknown"]},{"type":"null"}]},"pinnedOption":{"type":["string","null"]}},"required":["sessionId","organizationId","customerId","appSlugId","checkoutId","checkoutVersion","variantId","deviceType","os","browser","ipCountry","billingCountry","currency","amount","locale","embedMode","direction","returning","createdAt","openedAt","submittedAt","paidAt","maxStep","exitReason","exitDetail","lastClientEvent","attempts","lastTransactionId","lastState","lastStatusCode","closedAt"],"additionalProperties":false},"transactionIds":{"type":"array","items":{"type":"string"}},"events":{"type":"array","items":{"type":"object","properties":{"_time":{"type":"string"},"source":{"type":"string","enum":["server","client"]},"event":{"type":"string"},"step":{"anyOf":[{"type":"integer","minimum":0,"maximum":6},{"type":"null"}]},"viewId":{"type":["string","null"]},"seq":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"option":{"type":["string","null"]},"optionIndex":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"field":{"type":["string","null"]},"errorCode":{"type":["string","null"]},"reason":{"type":["string","null"]},"outcome":{"type":["string","null"]},"state":{"type":["string","null"]},"statusCode":{"type":["string","null"]},"transactionId":{"type":["string","null"]},"durationMs":{"type":["number","null"]},"authResult":{"anyOf":[{"type":"string","enum":["passed","failed","unknown"]},{"type":"null"}]}},"required":["_time","source","event","step","viewId","seq","option","optionIndex","field","errorCode","reason","outcome","state","statusCode","transactionId","durationMs"],"additionalProperties":false}},"timelineAvailable":{"type":"boolean"}},"required":["session","transactionIds","events","timelineAvailable"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-insights/experiments":{"get":{"description":"Per-arm funnels of one variant's experiment over closed sessions, with a two-proportion z-test of each arm's Paid/Opened against the control (the first arm) and whether every arm reached the minimum sample.","summary":"A/B experiment results","tags":["checkoutInsights"],"parameters":[{"name":"checkoutId","in":"query","required":true,"schema":{"type":"string"}},{"name":"variantId","in":"query","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string"}},{"name":"to","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"checkoutId":{"type":"string"},"variantId":{"type":"string"},"experimentId":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["running","stopped"]},{"type":"null"}]},"controlArmId":{"type":["string","null"]},"arms":{"type":"array","items":{"type":"object","properties":{"armId":{"type":"string"},"name":{"type":["string","null"]},"weight":{"type":["number","null"]},"funnel":{"type":"object","properties":{"key":{"type":["string","null"]},"sessions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reached":{"minItems":7,"maxItems":7,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"exits":{"type":"object","propertyNames":{"type":"string","enum":["render_error","cancelled","declined","auth_failed","auth_timeout","poll_timeout","wallet_cancelled","sdk_failed","abandoned"]},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":["render_error","cancelled","declined","auth_failed","auth_timeout","poll_timeout","wallet_cancelled","sdk_failed","abandoned"]}},"required":["key","sessions","reached","exits"],"additionalProperties":false},"opened":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"conversion":{"type":["number","null"]},"vsControl":{"anyOf":[{"type":"object","properties":{"aRate":{"type":["number","null"]},"bRate":{"type":["number","null"]},"lift":{"type":["number","null"]},"z":{"type":"number"},"pValue":{"type":"number"},"significant95":{"type":"boolean"}},"required":["aRate","bRate","lift","z","pValue","significant95"],"additionalProperties":false},{"type":"null"}]},"minSampleReached":{"type":"boolean"}},"required":["armId","name","weight","funnel","opened","paid","conversion","vsControl","minSampleReached"],"additionalProperties":false}},"minSample":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minSampleReached":{"type":"boolean"},"from":{"type":"string"},"to":{"type":"string"},"truncated":{"type":"boolean","description":"True when a query hit a row cap and the numbers are a lower bound"}},"required":["checkoutId","variantId","experimentId","status","controlArmId","arms","minSample","minSampleReached","from","to","truncated"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-insights/cards":{"get":{"description":"The nightly top drop-offs per checkout, each with a ready-made prompt for \"Fix with Genie\". Dismissed cards are excluded unless asked for.","summary":"Insight cards","tags":["checkoutInsights"],"parameters":[{"name":"checkoutId","in":"query","schema":{"type":"string"}},{"name":"includeDismissed","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"cards":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"checkoutId":{"type":"string"},"variantId":{"type":["string","null"]},"kind":{"type":"string","enum":["step_drop","validation_errors","option_unavailable","decline_rate","slow_step","segment_gap","sdk_failures","render_errors"]},"title":{"type":"string"},"detail":{"type":"string"},"metric":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"number"},"baseline":{"type":["number","null"]},"unit":{"type":"string","enum":["ratio","count","ms"]},"sessions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","value","baseline","unit","sessions"],"additionalProperties":false},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}},"generatedAt":{"type":"string"},"dismissedAt":{"type":["string","null"]},"geniePrompt":{"type":"string"}},"required":["id","checkoutId","variantId","kind","title","detail","metric","generatedAt","dismissedAt","geniePrompt"],"additionalProperties":false}}},"required":["cards"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-insights/cards/{cardId}/dismiss":{"post":{"description":"Hides the card for everyone in the context until the nightly job finds something new.","summary":"Dismiss an insight card","tags":["checkoutInsights"],"parameters":[{"name":"cardId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"checkoutId":{"type":"string"},"variantId":{"type":["string","null"]},"kind":{"type":"string","enum":["step_drop","validation_errors","option_unavailable","decline_rate","slow_step","segment_gap","sdk_failures","render_errors"]},"title":{"type":"string"},"detail":{"type":"string"},"metric":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"number"},"baseline":{"type":["number","null"]},"unit":{"type":"string","enum":["ratio","count","ms"]},"sessions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","value","baseline","unit","sessions"],"additionalProperties":false},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}},"generatedAt":{"type":"string"},"dismissedAt":{"type":["string","null"]},"geniePrompt":{"type":"string"}},"required":["id","checkoutId","variantId","kind","title","detail","metric","generatedAt","dismissedAt","geniePrompt"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}},"/api/v1/checkout-insights/monitors":{"post":{"description":"Creates an ordinary monitor over `checkout-events` from a template (also used by \"Watch this version\" with expiresInHours=24).","summary":"Create a checkout monitor from a template","tags":["checkoutInsights"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"template":{"type":"string","enum":["conversion_anomaly","sdk_failure_rate","script_error_spike","render_error_spike","open_rate_low"]},"checkoutId":{"type":"string"},"variantId":{"type":"string"},"versionId":{"type":"string"},"threshold":{"type":"number"},"expiresInHours":{"type":"integer","minimum":1,"maximum":720},"emailRecipients":{"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}},"required":["template"]}}}},"responses":{"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"monitorId":{"type":"string"},"name":{"type":"string"}},"required":["monitorId","name"],"additionalProperties":false}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}}}}},"info":{"title":"API – Organization","version":"1.0.0"},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}},"security":[{"BearerAuth":[]}],"servers":[{"url":"https://api-sandbox.babelpay.io","description":"Current environment"}],"webhooks":{"paymentCallback":{"post":{"summary":"Payment webhook callback","description":"**Note: Never trust the callback data without signature verification!** The callback is sent to the callbackUrl provided in the payment request when the transaction reaches a final state. Delivered with up to 3 retries.\n\n## Amounts\n\n`amount` is what the payment was for; `txAmount` is what it was processed in.\n\n> **Warning:** `amount` is usually the amount and currency sent in the request that created the payment, but it can differ. For payment methods where the amount cannot be locked up front — such as a crypto deposit or a bank transfer — the payer decides what is actually sent. Always compare `amount` with your order before fulfilling it; never assume it equals what you requested.\n\n## Signature verification\n\nEvery webhook request includes two headers for signature verification:\n\n| Header | Description |\n| --- | --- |\n| `X-Webhook-Signature` | `sha256=<hex-encoded HMAC-SHA256>` |\n| `X-Webhook-Timestamp` | Unix epoch seconds when the request was signed |\n\nThe HMAC is computed over `{timestamp}.{raw JSON body}` using the `webhookSecret` (`whsec_…`) returned when the API key was created.\n\n### Verification steps\n\n1. Read `X-Webhook-Timestamp` and `X-Webhook-Signature` from the request headers.\n2. Reject the request if the timestamp is more than 5 minutes old (replay protection).\n3. Concatenate `{timestamp}.{raw request body}` (UTF-8).\n4. Compute `HMAC-SHA256(webhookSecret, concatenated string)` and hex-encode the result.\n5. Compare with the signature value after the `sha256=` prefix using a constant-time comparison.\n\n### Quick test — TypeScript Playground\n\nPaste the snippet below into [TypeScript Playground](https://www.typescriptlang.org/play), fill in the three values from an actual webhook request, and check the **Logs** tab.\n\n```typescript\n// ---- paste your values here ----\nconst webhookSecret    = \"whsec_...\";           // from API key creation\nconst signatureHeader  = \"sha256=...\";          // X-Webhook-Signature header\nconst timestampHeader  = \"1717344000\";          // X-Webhook-Timestamp header\nconst rawBody          = '{\"id\":\"...\"}';       // raw JSON body\n\n// ---- verify ----\n(async () => {\n  const enc = new TextEncoder();\n  const key = await crypto.subtle.importKey(\n    \"raw\", enc.encode(webhookSecret),\n    { name: \"HMAC\", hash: \"SHA-256\" }, false, [\"sign\"],\n  );\n  const sig = await crypto.subtle.sign(\n    \"HMAC\", key, enc.encode(`${timestampHeader}.${rawBody}`),\n  );\n  const expected = Array.from(new Uint8Array(sig))\n    .map(b => b.toString(16).padStart(2, \"0\")).join(\"\");\n  const received = signatureHeader.replace(/^sha256=/, \"\");\n\n  console.log(\"Expected:\", expected);\n  console.log(\"Received:\", received);\n  console.log(\"Valid:\", expected === received);\n})();\n```\n","requestBody":{"description":"The webhook callback payload containing the payment result.","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"txRefId":{"type":"string","maxLength":255},"state":{"type":"string","enum":["success","processing","waiting","approval","declined","unknown","error","cancelled"],"description":"Payment transaction state"},"statusCode":{"type":"string","enum":["approved","manually_approved","do_not_honor","suspected_fraud","invalid_trx","invalid_amt","invalid_account","invalid_response","no_transaction","restricted_card","insufficient_funds","expired_card","trx_not_permitted","exceeds_limit","exceeds_frequency","invalid_cvv","issuer_err","dest_not_found","psp_malfunction","psp_routing_error","unable_to_authorize","3ds_auth_failure","psp_limits_reached","psp_timeout","user_aborted_trx","avs_response","no_auth_corresponding","already_captured","already_cancelled","already_refunded","unknown_card","currency_not_supported","amt_over_max","amt_under_min","mobile_block","email_block","ip_block","bin_block","device_block","user_block","account_block","risk_block","duplicate_trx","already_chargedback","too_old_to_refund","no_partial_refund","partial_refund_over","redirect","redirect_timeout","blocked","processing","routing_error","system_error","psp_error","bad_request","other"],"description":"Harmonized response codes"},"amount":{"description":"The amount and currency of the payment.\n\n**Warning:** `amount` is usually the amount and currency sent in the request that created the payment, but it can differ. For payment methods where the amount cannot be locked up front — such as a crypto deposit or a bank transfer — the payer decides what is actually sent. Always compare `amount` with your order before fulfilling it; never assume it equals what you requested.","type":"object","properties":{"amt":{"type":"string","pattern":"^-?(?:0|[1-9][0-9]{0,17})(?:\\.[0-9]{0,17}[1-9])?$","description":"Decimal amount as a canonical string"},"cy":{"type":"string","enum":["USD","EUR","GBP","JPY","CHF","CAD","AUD","SEK","NOK","DKK","PLN","CZK","HUF","RUB","CNY","INR","KRW","SGD","HKD","NZD","MXN","BRL","ZAR","TRY","ILS","THB","MYR","IDR","PHP","VND","JOD","KWD","BHD","OMR","TND","LYD","CLP","COP","PEN","ARS","UYU","EGP","MAD","NGN","KES","GHS","BWP","ZMW","UGX","TZS","ETB","RWF","MUR","SCR","BTC","ETH","LTC","BCH","XRP","ADA","DOT","LINK","XLM","DOGE","BNB","SOL","MATIC","AVAX","ATOM","ALGO","TRX","USDT","USDC","DAI"]}},"required":["amt","cy"],"additionalProperties":false},"txAmount":{"description":"The amount and currency the payment was processed in. It can be in a different currency from `amount`, for example when the payment is converted or settled in crypto.","type":"object","properties":{"amt":{"type":"string","pattern":"^-?(?:0|[1-9][0-9]{0,17})(?:\\.[0-9]{0,17}[1-9])?$","description":"Decimal amount as a canonical string"},"cy":{"type":"string","enum":["USD","EUR","GBP","JPY","CHF","CAD","AUD","SEK","NOK","DKK","PLN","CZK","HUF","RUB","CNY","INR","KRW","SGD","HKD","NZD","MXN","BRL","ZAR","TRY","ILS","THB","MYR","IDR","PHP","VND","JOD","KWD","BHD","OMR","TND","LYD","CLP","COP","PEN","ARS","UYU","EGP","MAD","NGN","KES","GHS","BWP","ZMW","UGX","TZS","ETB","RWF","MUR","SCR","BTC","ETH","LTC","BCH","XRP","ADA","DOT","LINK","XLM","DOGE","BNB","SOL","MATIC","AVAX","ATOM","ALGO","TRX","USDT","USDC","DAI"]}},"required":["amt","cy"],"additionalProperties":false}},"required":["id"],"additionalProperties":false,"description":"Webhook callback payload sent to the customer callbackUrl"}}}},"parameters":[{"name":"X-Webhook-Signature","in":"header","required":false,"description":"HMAC-SHA256 signature: `sha256=<hex>`","schema":{"type":"string","example":"sha256=a1b2c3d4..."}},{"name":"X-Webhook-Timestamp","in":"header","required":false,"description":"Unix epoch seconds when the signature was computed","schema":{"type":"string","example":"1717344000"}}],"responses":{"200":{"description":"Callback received successfully. Any 2xx response is treated as success."}}}}}}