{"openapi":"3.1.0","info":{"title":"SplitArc API","version":"1.0.0","description":"SplitArc BNPL and installment plan management REST API."},"servers":[{"url":"https://splitarc.app","description":"SplitArc API server"}],"paths":{"/api/v1/auth/providers":{"get":{"operationId":"getAuthProviders","summary":"List enabled authentication providers","tags":["Auth"],"security":[],"responses":{"200":{"description":"Configured authentication providers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthProvidersResponse"}}}}}}},"/api/v1/me":{"get":{"operationId":"getMe","summary":"Get authenticated user profile and preferences","tags":["Account"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["profile:read"]}],"responses":{"200":{"description":"User profile and preferences","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"operationId":"updateMe","summary":"Update authenticated user profile and preferences","tags":["Account"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["profile:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPreferencesPatch"}}}},"responses":{"200":{"description":"Updated user profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"operationId":"deleteMe","summary":"Permanently delete user account and cascade all user data","tags":["Account"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["profile:write"]}],"responses":{"200":{"description":"Account deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAccountResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/lenders":{"get":{"operationId":"listLenders","summary":"List preset lenders and user custom lenders","tags":["Lenders"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["contracts:read"]}],"responses":{"200":{"description":"Preset and custom lenders","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LendersListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"operationId":"createCustomLender","summary":"Create a user custom lender","tags":["Lenders"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["contracts:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomLenderCreate"}}}},"responses":{"201":{"description":"Created custom lender","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LenderMutationResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/lenders/{id}":{"patch":{"operationId":"updateCustomLender","summary":"Update an owned custom lender","tags":["Lenders"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["contracts:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomLenderUpdate"}}}},"responses":{"200":{"description":"Updated custom lender","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LenderMutationResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Custom lender not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"operationId":"deleteCustomLender","summary":"Delete an unused owned custom lender","tags":["Lenders"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["contracts:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Custom lender deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Custom lender not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Custom lender is referenced by existing contracts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/contracts":{"get":{"operationId":"listContracts","summary":"Evaluate user contracts and compute portfolio summary","tags":["Contracts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["contracts:read"]}],"parameters":[{"name":"status","in":"query","required":false,"description":"Filter contracts by active, archived, or all","schema":{"default":"all","type":"string","enum":["active","archived","all"]}},{"name":"currency","in":"query","required":false,"description":"Optional ISO-4217 currency filter","schema":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]}},{"name":"today","in":"query","required":false,"description":"Reference evaluation date in YYYY-MM-DD format","schema":{"type":"string"}}],"responses":{"200":{"description":"Evaluated contracts and portfolio summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractsListResponse"}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"operationId":"createContract","summary":"Create a new BNPL or installment contract","tags":["Contracts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["contracts:write"]}],"parameters":[{"name":"today","in":"query","required":false,"description":"Reference evaluation date in YYYY-MM-DD format","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractCreate"}}}},"responses":{"201":{"description":"Created and evaluated contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractMutationResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Referenced custom lender not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/contracts/{id}":{"get":{"operationId":"getContract","summary":"Get a single evaluated contract and its installment overrides","tags":["Contracts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["contracts:read"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string","minLength":1}},{"name":"today","in":"query","required":false,"description":"Reference evaluation date in YYYY-MM-DD format","schema":{"type":"string"}}],"responses":{"200":{"description":"Contract detail and overrides","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractDetailResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Contract not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"operationId":"updateContract","summary":"Update an owned contract","tags":["Contracts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["contracts:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string","minLength":1}},{"name":"today","in":"query","required":false,"description":"Reference evaluation date in YYYY-MM-DD format","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractUpdate"}}}},"responses":{"200":{"description":"Updated evaluated contract","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractMutationResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Contract or custom lender not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"operationId":"deleteContract","summary":"Delete an owned contract","tags":["Contracts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["contracts:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Contract deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Contract not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/contracts/{id}/overrides":{"post":{"operationId":"upsertContractOverride","summary":"Create or update an installment override on an owned contract","tags":["Contracts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["contracts:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string","minLength":1}},{"name":"today","in":"query","required":false,"description":"Reference evaluation date in YYYY-MM-DD format","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallmentOverrideInput"}}}},"responses":{"200":{"description":"Updated contract detail and overrides","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractDetailResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Contract not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"operationId":"deleteContractOverride","summary":"Remove an installment override from an owned contract","tags":["Contracts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["contracts:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string","minLength":1}},{"name":"installmentIndex","in":"query","required":true,"description":"Zero-based installment index to clear","schema":{"type":"integer","minimum":0,"maximum":599}},{"name":"today","in":"query","required":false,"description":"Reference evaluation date in YYYY-MM-DD format","schema":{"type":"string"}}],"responses":{"200":{"description":"Updated contract detail and overrides","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractDetailResponse"}}}},"400":{"description":"Invalid installmentIndex parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Contract not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/contracts/{id}/settle":{"post":{"operationId":"settleContract","summary":"Settle an owned contract early","tags":["Contracts"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["contracts:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string","minLength":1}},{"name":"today","in":"query","required":false,"description":"Reference evaluation date in YYYY-MM-DD format","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettleContractInput"}}}},"responses":{"200":{"description":"Settled contract summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractMutationResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Contract not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/calendar":{"get":{"operationId":"getCalendarMonth","summary":"Build monthly charge calendar across user contracts","tags":["Calendar"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["contracts:read"]}],"parameters":[{"name":"month","in":"query","required":false,"description":"Calendar month in YYYY-MM format","schema":{"type":"string"}},{"name":"today","in":"query","required":false,"description":"Reference evaluation date in YYYY-MM-DD format","schema":{"type":"string"}}],"responses":{"200":{"description":"Monthly calendar grid and totals","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarMonthSummary"}}}},"400":{"description":"Invalid month or today query parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/fx":{"get":{"operationId":"getLatestFxRates","summary":"Get latest cached EUR-based exchange rates","tags":["FX"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["contracts:read"]}],"responses":{"200":{"description":"Latest EUR-based FX rates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FxRatesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/import/csv":{"post":{"operationId":"importContractsCsv","summary":"Atomically import contracts from a CSV payload","tags":["Import & Export"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["contracts:write"]}],"parameters":[{"name":"today","in":"query","required":false,"description":"Reference evaluation date in YYYY-MM-DD format","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CsvImportRequest"}},"text/csv":{"schema":{"type":"string"}}}},"responses":{"201":{"description":"Imported contracts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CsvImportResponse"}}}},"400":{"description":"CSV parse or row validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/export":{"get":{"operationId":"exportContracts","summary":"Export user contracts and preferences as JSON or CSV","tags":["Import & Export"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["contracts:read"]}],"parameters":[{"name":"format","in":"query","required":false,"description":"Export format (json or csv)","schema":{"default":"json","type":"string","enum":["json","csv"]}},{"name":"today","in":"query","required":false,"description":"Reference evaluation date in YYYY-MM-DD format","schema":{"type":"string"}}],"responses":{"200":{"description":"Exported JSON backup or CSV contract sheet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonExportBackup"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Invalid export format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/api-keys":{"get":{"operationId":"listApiKeys","summary":"List personal API keys owned by the authenticated user","tags":["API Keys"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["profile:write"]}],"responses":{"200":{"description":"User personal API keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeysListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"operationId":"createApiKey","summary":"Create a scoped personal API key (plaintext key returned once)","tags":["API Keys"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["profile:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}}},"responses":{"201":{"description":"Created personal API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/api-keys/{id}":{"delete":{"operationId":"revokeApiKey","summary":"Revoke a personal API key owned by the authenticated user","tags":["API Keys"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["profile:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"API key revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/oauth/consents":{"get":{"operationId":"listOAuthConsents","summary":"List OAuth 2.1 client consents granted by the authenticated user","tags":["OAuth"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["profile:write"]}],"responses":{"200":{"description":"Granted OAuth consents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthConsentsListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/oauth/consents/{id}":{"delete":{"operationId":"revokeOAuthConsent","summary":"Revoke an OAuth 2.1 client consent and all active tokens for that client","tags":["OAuth"],"security":[{"BearerAuth":[]},{"CookieAuth":[]},{"ApiKeyAuth":[]},{"OAuth2":["profile:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Consent and tokens revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Consent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Session bearer token or OAuth 2.1 access token (sa_oauth_...)"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"better-auth.session_token","description":"Session cookie issued by Better Auth"},"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Personal API key (sa_live_...)"},"OAuth2":{"type":"oauth2","description":"OAuth 2.1 Authorization Code with mandatory S256 PKCE","flows":{"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/api/oauth/token","scopes":{"contracts:read":"Read contracts, calendar, lenders, FX rates, and exports","contracts:write":"Create, update, settle, import, and delete contracts and custom lenders","profile:read":"Read user profile and preferences","profile:write":"Update user profile, manage API keys, and revoke OAuth consents"}}}}},"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"issues":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["error","code"],"additionalProperties":false},"DeletedResponse":{"type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"],"additionalProperties":false},"AuthProvidersResponse":{"type":"object","properties":{"emailPassword":{"type":"boolean","const":true},"passkey":{"type":"boolean","const":true},"totp":{"type":"boolean","const":true},"google":{"type":"boolean"},"apple":{"type":"boolean"},"smtp":{"type":"boolean"}},"required":["emailPassword","passkey","totp","google","apple","smtp"],"additionalProperties":false},"UserProfileResponse":{"type":"object","properties":{"id":{"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-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"emailVerified":{"type":"boolean"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":["string","null"]},"avatarSource":{"type":"string","enum":["gravatar","initials"]},"avatarUrl":{"type":"string","format":"uri"},"initials":{"type":"string"},"dashboardStyle":{"type":"string","enum":["warm","crisp"]},"themeMode":{"type":"string","enum":["light","dark","system"]},"homeCurrency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"twoFactorEnabled":{"type":"boolean"},"linkedProviders":{"type":"array","items":{"type":"string"}},"passkeyCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","email","emailVerified","name","firstName","lastName","avatarSource","avatarUrl","initials","dashboardStyle","themeMode","homeCurrency","twoFactorEnabled","linkedProviders","passkeyCount"],"additionalProperties":false},"UserPreferencesPatch":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":80},"lastName":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"avatarSource":{"type":"string","enum":["gravatar","initials"]},"dashboardStyle":{"type":"string","enum":["warm","crisp"]},"themeMode":{"type":"string","enum":["light","dark","system"]},"homeCurrency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]}},"additionalProperties":false},"DeleteAccountResponse":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"appleRevocation":{"type":"object","properties":{"revoked":{"type":"boolean"},"reason":{"type":"string","enum":["no_apple_account","no_refresh_token","apple_credentials_unconfigured","decryption_failed","upstream_error","request_failed"]},"warning":{"type":"string"}},"required":["revoked"],"additionalProperties":false}},"required":["deleted","appleRevocation"],"additionalProperties":false},"CustomLenderCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"colorHex":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"}},"required":["name","colorHex"],"additionalProperties":false},"CustomLenderUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"colorHex":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"}},"additionalProperties":false},"CustomLenderRecord":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"colorHex":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","userId","name","colorHex"],"additionalProperties":false},"LendersListResponse":{"type":"object","properties":{"presetLenders":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["klarna","humm","clearpay","paypal","revolut","affirm","monzo_flex","scalapay","zip"]},"name":{"type":"string"},"colorHex":{"type":"string"}},"required":["key","name","colorHex"],"additionalProperties":false}},"customLenders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"colorHex":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","userId","name","colorHex"],"additionalProperties":false}}},"required":["presetLenders","customLenders"],"additionalProperties":false},"LenderMutationResponse":{"type":"object","properties":{"lender":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"colorHex":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","userId","name","colorHex"],"additionalProperties":false}},"required":["lender"],"additionalProperties":false},"ContractCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"contractNumber":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"presetLenderKey":{"default":null,"anyOf":[{"type":"string","enum":["klarna","humm","clearpay","paypal","revolut","affirm","monzo_flex","scalapay","zip"]},{"type":"null"}]},"customLenderId":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}]},"currency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"principalMinor":{"type":"integer","minimum":1,"maximum":9007199254740991},"aprBps":{"default":0,"type":"integer","minimum":0,"maximum":100000},"installmentMinor":{"type":"integer","minimum":1,"maximum":9007199254740991},"finalInstallmentMinor":{"default":null,"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"installmentCount":{"type":"integer","minimum":1,"maximum":600},"frequency":{"type":"string","enum":["monthly","biweekly","weekly"]},"setupFeeMinor":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"accountKeepingFeeMinor":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"upfrontDepositMinor":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"firstChargeDate":{"type":"string"},"status":{"default":"active","type":"string","enum":["active","paused","settled_early","completed"]},"pausedAt":{"default":null,"type":["string","null"]},"settledDate":{"default":null,"type":["string","null"]},"settledAmountMinor":{"default":null,"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"syncProviderKey":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"syncExternalId":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["name","presetLenderKey","customLenderId","currency","principalMinor","aprBps","installmentMinor","finalInstallmentMinor","installmentCount","frequency","setupFeeMinor","accountKeepingFeeMinor","upfrontDepositMinor","firstChargeDate","status","pausedAt","settledDate","settledAmountMinor"],"additionalProperties":false},"ContractUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"contractNumber":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"presetLenderKey":{"anyOf":[{"type":"string","enum":["klarna","humm","clearpay","paypal","revolut","affirm","monzo_flex","scalapay","zip"]},{"type":"null"}]},"customLenderId":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}]},"currency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"principalMinor":{"type":"integer","minimum":1,"maximum":9007199254740991},"aprBps":{"type":"integer","minimum":0,"maximum":100000},"installmentMinor":{"type":"integer","minimum":1,"maximum":9007199254740991},"finalInstallmentMinor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"installmentCount":{"type":"integer","minimum":1,"maximum":600},"frequency":{"type":"string","enum":["monthly","biweekly","weekly"]},"setupFeeMinor":{"type":"integer","minimum":0,"maximum":9007199254740991},"accountKeepingFeeMinor":{"type":"integer","minimum":0,"maximum":9007199254740991},"upfrontDepositMinor":{"type":"integer","minimum":0,"maximum":9007199254740991},"firstChargeDate":{"type":"string"},"status":{"type":"string","enum":["active","paused","settled_early","completed"]},"pausedAt":{"type":["string","null"]},"settledDate":{"type":["string","null"]},"settledAmountMinor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"additionalProperties":false},"ContractRecord":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"contractNumber":{"type":["string","null"]},"presetLenderKey":{"anyOf":[{"type":"string","enum":["klarna","humm","clearpay","paypal","revolut","affirm","monzo_flex","scalapay","zip"]},{"type":"null"}]},"customLenderId":{"type":["string","null"]},"lenderName":{"type":"string"},"lenderColorHex":{"type":"string"},"currency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"principalMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"aprBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"installmentMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"finalInstallmentMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"installmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"frequency":{"type":"string","enum":["monthly","biweekly","weekly"]},"setupFeeMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accountKeepingFeeMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"upfrontDepositMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"firstChargeDate":{"type":"string"},"status":{"type":"string","enum":["active","paused","settled_early","completed"]},"pausedAt":{"type":["string","null"]},"settledDate":{"type":["string","null"]},"settledAmountMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"syncProviderKey":{"type":["string","null"]},"syncExternalId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userId","name","presetLenderKey","customLenderId","currency","principalMinor","aprBps","installmentMinor","finalInstallmentMinor","installmentCount","frequency","setupFeeMinor","upfrontDepositMinor","firstChargeDate","status","pausedAt","settledDate","settledAmountMinor"],"additionalProperties":false},"ComputedContractSummary":{"type":"object","properties":{"contract":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"contractNumber":{"type":["string","null"]},"presetLenderKey":{"anyOf":[{"type":"string","enum":["klarna","humm","clearpay","paypal","revolut","affirm","monzo_flex","scalapay","zip"]},{"type":"null"}]},"customLenderId":{"type":["string","null"]},"lenderName":{"type":"string"},"lenderColorHex":{"type":"string"},"currency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"principalMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"aprBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"installmentMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"finalInstallmentMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"installmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"frequency":{"type":"string","enum":["monthly","biweekly","weekly"]},"setupFeeMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accountKeepingFeeMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"upfrontDepositMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"firstChargeDate":{"type":"string"},"status":{"type":"string","enum":["active","paused","settled_early","completed"]},"pausedAt":{"type":["string","null"]},"settledDate":{"type":["string","null"]},"settledAmountMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"syncProviderKey":{"type":["string","null"]},"syncExternalId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userId","name","presetLenderKey","customLenderId","currency","principalMinor","aprBps","installmentMinor","finalInstallmentMinor","installmentCount","frequency","setupFeeMinor","upfrontDepositMinor","firstChargeDate","status","pausedAt","settledDate","settledAmountMinor"],"additionalProperties":false},"lenderName":{"type":"string"},"lenderColorHex":{"type":"string"},"currency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"installments":{"type":"array","items":{"type":"object","properties":{"installmentIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sequenceNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"scheduledDate":{"type":"string"},"chargeDate":{"type":"string"},"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["paid","upcoming","paused","skipped","paid_early","settled_early"]},"isPaid":{"type":"boolean"},"overrideStatus":{"anyOf":[{"type":"string","enum":["paid_early","skipped","rescheduled"]},{"type":"null"}]},"remainingAfterMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["installmentIndex","sequenceNumber","scheduledDate","chargeDate","amountMinor","status","isPaid","overrideStatus","remainingAfterMinor"],"additionalProperties":false}},"totalInstallmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"paidInstallmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remainingInstallmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"financedPrincipalMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalPayableMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"costOfCreditMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"paidMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remainingMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"progressRatio":{"type":"number"},"nextChargeDate":{"type":["string","null"]},"nextChargeAmountMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"finalChargeDate":{"type":["string","null"]},"monthsRemaining":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"effectiveStatus":{"type":"string","enum":["active","paused","settled_early","completed"]},"isArchived":{"type":"boolean"}},"required":["contract","lenderName","lenderColorHex","currency","installments","totalInstallmentCount","paidInstallmentCount","remainingInstallmentCount","financedPrincipalMinor","totalPayableMinor","costOfCreditMinor","paidMinor","remainingMinor","progressRatio","nextChargeDate","nextChargeAmountMinor","finalChargeDate","monthsRemaining","effectiveStatus","isArchived"],"additionalProperties":false},"PortfolioSummary":{"type":"object","properties":{"activeContractCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"archivedContractCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currencies":{"type":"array","items":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]}},"hasMultipleCurrencies":{"type":"boolean"},"primaryCurrency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"homeCurrency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"byCurrency":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"remainingMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dueThisMonthMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalPayableMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"paidMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"activeContractCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["currency","remainingMinor","dueThisMonthMinor","totalPayableMinor","paidMinor","activeContractCount"],"additionalProperties":false}},"totalRemainingMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"dueThisMonthMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"convertedTotalMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"convertedDueThisMonthMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"maxMonthsRemaining":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"debtFreeDate":{"type":["string","null"]}},"required":["activeContractCount","archivedContractCount","currencies","hasMultipleCurrencies","primaryCurrency","homeCurrency","byCurrency","totalRemainingMinor","dueThisMonthMinor","convertedTotalMinor","convertedDueThisMonthMinor","maxMonthsRemaining","debtFreeDate"],"additionalProperties":false},"ContractsListResponse":{"type":"object","properties":{"contracts":{"type":"array","items":{"type":"object","properties":{"contract":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"contractNumber":{"type":["string","null"]},"presetLenderKey":{"anyOf":[{"type":"string","enum":["klarna","humm","clearpay","paypal","revolut","affirm","monzo_flex","scalapay","zip"]},{"type":"null"}]},"customLenderId":{"type":["string","null"]},"lenderName":{"type":"string"},"lenderColorHex":{"type":"string"},"currency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"principalMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"aprBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"installmentMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"finalInstallmentMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"installmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"frequency":{"type":"string","enum":["monthly","biweekly","weekly"]},"setupFeeMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accountKeepingFeeMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"upfrontDepositMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"firstChargeDate":{"type":"string"},"status":{"type":"string","enum":["active","paused","settled_early","completed"]},"pausedAt":{"type":["string","null"]},"settledDate":{"type":["string","null"]},"settledAmountMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"syncProviderKey":{"type":["string","null"]},"syncExternalId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userId","name","presetLenderKey","customLenderId","currency","principalMinor","aprBps","installmentMinor","finalInstallmentMinor","installmentCount","frequency","setupFeeMinor","upfrontDepositMinor","firstChargeDate","status","pausedAt","settledDate","settledAmountMinor"],"additionalProperties":false},"lenderName":{"type":"string"},"lenderColorHex":{"type":"string"},"currency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"installments":{"type":"array","items":{"type":"object","properties":{"installmentIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sequenceNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"scheduledDate":{"type":"string"},"chargeDate":{"type":"string"},"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["paid","upcoming","paused","skipped","paid_early","settled_early"]},"isPaid":{"type":"boolean"},"overrideStatus":{"anyOf":[{"type":"string","enum":["paid_early","skipped","rescheduled"]},{"type":"null"}]},"remainingAfterMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["installmentIndex","sequenceNumber","scheduledDate","chargeDate","amountMinor","status","isPaid","overrideStatus","remainingAfterMinor"],"additionalProperties":false}},"totalInstallmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"paidInstallmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remainingInstallmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"financedPrincipalMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalPayableMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"costOfCreditMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"paidMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remainingMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"progressRatio":{"type":"number"},"nextChargeDate":{"type":["string","null"]},"nextChargeAmountMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"finalChargeDate":{"type":["string","null"]},"monthsRemaining":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"effectiveStatus":{"type":"string","enum":["active","paused","settled_early","completed"]},"isArchived":{"type":"boolean"}},"required":["contract","lenderName","lenderColorHex","currency","installments","totalInstallmentCount","paidInstallmentCount","remainingInstallmentCount","financedPrincipalMinor","totalPayableMinor","costOfCreditMinor","paidMinor","remainingMinor","progressRatio","nextChargeDate","nextChargeAmountMinor","finalChargeDate","monthsRemaining","effectiveStatus","isArchived"],"additionalProperties":false}},"portfolio":{"type":"object","properties":{"activeContractCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"archivedContractCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currencies":{"type":"array","items":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]}},"hasMultipleCurrencies":{"type":"boolean"},"primaryCurrency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"homeCurrency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"byCurrency":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"remainingMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dueThisMonthMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalPayableMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"paidMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"activeContractCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["currency","remainingMinor","dueThisMonthMinor","totalPayableMinor","paidMinor","activeContractCount"],"additionalProperties":false}},"totalRemainingMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"dueThisMonthMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"convertedTotalMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"convertedDueThisMonthMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"maxMonthsRemaining":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"debtFreeDate":{"type":["string","null"]}},"required":["activeContractCount","archivedContractCount","currencies","hasMultipleCurrencies","primaryCurrency","homeCurrency","byCurrency","totalRemainingMinor","dueThisMonthMinor","convertedTotalMinor","convertedDueThisMonthMinor","maxMonthsRemaining","debtFreeDate"],"additionalProperties":false},"ratesDate":{"type":["string","null"]}},"required":["contracts","portfolio","ratesDate"],"additionalProperties":false},"ContractMutationResponse":{"type":"object","properties":{"contract":{"type":"object","properties":{"contract":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"contractNumber":{"type":["string","null"]},"presetLenderKey":{"anyOf":[{"type":"string","enum":["klarna","humm","clearpay","paypal","revolut","affirm","monzo_flex","scalapay","zip"]},{"type":"null"}]},"customLenderId":{"type":["string","null"]},"lenderName":{"type":"string"},"lenderColorHex":{"type":"string"},"currency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"principalMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"aprBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"installmentMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"finalInstallmentMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"installmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"frequency":{"type":"string","enum":["monthly","biweekly","weekly"]},"setupFeeMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accountKeepingFeeMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"upfrontDepositMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"firstChargeDate":{"type":"string"},"status":{"type":"string","enum":["active","paused","settled_early","completed"]},"pausedAt":{"type":["string","null"]},"settledDate":{"type":["string","null"]},"settledAmountMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"syncProviderKey":{"type":["string","null"]},"syncExternalId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userId","name","presetLenderKey","customLenderId","currency","principalMinor","aprBps","installmentMinor","finalInstallmentMinor","installmentCount","frequency","setupFeeMinor","upfrontDepositMinor","firstChargeDate","status","pausedAt","settledDate","settledAmountMinor"],"additionalProperties":false},"lenderName":{"type":"string"},"lenderColorHex":{"type":"string"},"currency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"installments":{"type":"array","items":{"type":"object","properties":{"installmentIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sequenceNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"scheduledDate":{"type":"string"},"chargeDate":{"type":"string"},"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["paid","upcoming","paused","skipped","paid_early","settled_early"]},"isPaid":{"type":"boolean"},"overrideStatus":{"anyOf":[{"type":"string","enum":["paid_early","skipped","rescheduled"]},{"type":"null"}]},"remainingAfterMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["installmentIndex","sequenceNumber","scheduledDate","chargeDate","amountMinor","status","isPaid","overrideStatus","remainingAfterMinor"],"additionalProperties":false}},"totalInstallmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"paidInstallmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remainingInstallmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"financedPrincipalMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalPayableMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"costOfCreditMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"paidMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remainingMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"progressRatio":{"type":"number"},"nextChargeDate":{"type":["string","null"]},"nextChargeAmountMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"finalChargeDate":{"type":["string","null"]},"monthsRemaining":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"effectiveStatus":{"type":"string","enum":["active","paused","settled_early","completed"]},"isArchived":{"type":"boolean"}},"required":["contract","lenderName","lenderColorHex","currency","installments","totalInstallmentCount","paidInstallmentCount","remainingInstallmentCount","financedPrincipalMinor","totalPayableMinor","costOfCreditMinor","paidMinor","remainingMinor","progressRatio","nextChargeDate","nextChargeAmountMinor","finalChargeDate","monthsRemaining","effectiveStatus","isArchived"],"additionalProperties":false}},"required":["contract"],"additionalProperties":false},"ContractDetailResponse":{"type":"object","properties":{"contract":{"type":"object","properties":{"contract":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"contractNumber":{"type":["string","null"]},"presetLenderKey":{"anyOf":[{"type":"string","enum":["klarna","humm","clearpay","paypal","revolut","affirm","monzo_flex","scalapay","zip"]},{"type":"null"}]},"customLenderId":{"type":["string","null"]},"lenderName":{"type":"string"},"lenderColorHex":{"type":"string"},"currency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"principalMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"aprBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"installmentMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"finalInstallmentMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"installmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"frequency":{"type":"string","enum":["monthly","biweekly","weekly"]},"setupFeeMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accountKeepingFeeMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"upfrontDepositMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"firstChargeDate":{"type":"string"},"status":{"type":"string","enum":["active","paused","settled_early","completed"]},"pausedAt":{"type":["string","null"]},"settledDate":{"type":["string","null"]},"settledAmountMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"syncProviderKey":{"type":["string","null"]},"syncExternalId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userId","name","presetLenderKey","customLenderId","currency","principalMinor","aprBps","installmentMinor","finalInstallmentMinor","installmentCount","frequency","setupFeeMinor","upfrontDepositMinor","firstChargeDate","status","pausedAt","settledDate","settledAmountMinor"],"additionalProperties":false},"lenderName":{"type":"string"},"lenderColorHex":{"type":"string"},"currency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"installments":{"type":"array","items":{"type":"object","properties":{"installmentIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sequenceNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"scheduledDate":{"type":"string"},"chargeDate":{"type":"string"},"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["paid","upcoming","paused","skipped","paid_early","settled_early"]},"isPaid":{"type":"boolean"},"overrideStatus":{"anyOf":[{"type":"string","enum":["paid_early","skipped","rescheduled"]},{"type":"null"}]},"remainingAfterMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["installmentIndex","sequenceNumber","scheduledDate","chargeDate","amountMinor","status","isPaid","overrideStatus","remainingAfterMinor"],"additionalProperties":false}},"totalInstallmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"paidInstallmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remainingInstallmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"financedPrincipalMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalPayableMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"costOfCreditMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"paidMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remainingMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"progressRatio":{"type":"number"},"nextChargeDate":{"type":["string","null"]},"nextChargeAmountMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"finalChargeDate":{"type":["string","null"]},"monthsRemaining":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"effectiveStatus":{"type":"string","enum":["active","paused","settled_early","completed"]},"isArchived":{"type":"boolean"}},"required":["contract","lenderName","lenderColorHex","currency","installments","totalInstallmentCount","paidInstallmentCount","remainingInstallmentCount","financedPrincipalMinor","totalPayableMinor","costOfCreditMinor","paidMinor","remainingMinor","progressRatio","nextChargeDate","nextChargeAmountMinor","finalChargeDate","monthsRemaining","effectiveStatus","isArchived"],"additionalProperties":false},"overrides":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"contractId":{"type":"string"},"installmentIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"overrideStatus":{"type":"string","enum":["paid_early","skipped","rescheduled"]},"overrideDate":{"type":["string","null"]},"overrideAmountMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["installmentIndex","overrideStatus","overrideDate","overrideAmountMinor"],"additionalProperties":false}}},"required":["contract","overrides"],"additionalProperties":false},"InstallmentOverrideInput":{"type":"object","properties":{"installmentIndex":{"type":"integer","minimum":0,"maximum":599},"overrideStatus":{"type":"string","enum":["paid_early","skipped","rescheduled"]},"overrideDate":{"default":null,"type":["string","null"]},"overrideAmountMinor":{"default":null,"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["installmentIndex","overrideStatus","overrideDate","overrideAmountMinor"],"additionalProperties":false},"InstallmentOverrideRecord":{"type":"object","properties":{"id":{"type":"string"},"contractId":{"type":"string"},"installmentIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"overrideStatus":{"type":"string","enum":["paid_early","skipped","rescheduled"]},"overrideDate":{"type":["string","null"]},"overrideAmountMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["installmentIndex","overrideStatus","overrideDate","overrideAmountMinor"],"additionalProperties":false},"SettleContractInput":{"type":"object","properties":{"settledDate":{"type":"string"},"settledAmountMinor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["settledDate"],"additionalProperties":false},"CalendarMonthSummary":{"type":"object","properties":{"yearMonth":{"type":"string"},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"dayOfMonth":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"inCurrentMonth":{"type":"boolean"},"charges":{"type":"array","items":{"type":"object","properties":{"contractId":{"type":"string"},"contractName":{"type":"string"},"lenderName":{"type":"string"},"lenderColorHex":{"type":"string"},"currency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"chargeDate":{"type":"string"},"installmentIndex":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"contractTotalMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remainingAfterMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"monthsRemaining":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"finalChargeDate":{"type":"string"},"status":{"type":"string","enum":["paid","upcoming","paused","skipped","paid_early","settled_early"]},"isSettlement":{"type":"boolean"}},"required":["contractId","contractName","lenderName","lenderColorHex","currency","chargeDate","installmentIndex","amountMinor","contractTotalMinor","remainingAfterMinor","monthsRemaining","finalChargeDate","status","isSettlement"],"additionalProperties":false}}},"required":["date","dayOfMonth","inCurrentMonth","charges"],"additionalProperties":false}},"chargeCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currencies":{"type":"array","items":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]}},"hasMultipleCurrencies":{"type":"boolean"},"primaryCurrency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"homeCurrency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"totalsByCurrency":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"totalMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"chargeCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["currency","totalMinor","chargeCount"],"additionalProperties":false}},"totalMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"convertedTotalMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["yearMonth","days","chargeCount","currencies","hasMultipleCurrencies","primaryCurrency","homeCurrency","totalsByCurrency","totalMinor","convertedTotalMinor"],"additionalProperties":false},"FxRatesResponse":{"type":"object","properties":{"baseCurrency":{"type":"string","const":"EUR"},"rateDate":{"type":"string"},"rates":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}}},"required":["baseCurrency","rateDate","rates"],"additionalProperties":false},"CsvImportRequest":{"type":"object","properties":{"csv":{"type":"string","minLength":1},"mapping":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["csv"],"additionalProperties":false},"CsvImportResponse":{"type":"object","properties":{"importedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"contracts":{"type":"array","items":{"type":"object","properties":{"contract":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"contractNumber":{"type":["string","null"]},"presetLenderKey":{"anyOf":[{"type":"string","enum":["klarna","humm","clearpay","paypal","revolut","affirm","monzo_flex","scalapay","zip"]},{"type":"null"}]},"customLenderId":{"type":["string","null"]},"lenderName":{"type":"string"},"lenderColorHex":{"type":"string"},"currency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"principalMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"aprBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"installmentMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"finalInstallmentMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"installmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"frequency":{"type":"string","enum":["monthly","biweekly","weekly"]},"setupFeeMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accountKeepingFeeMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"upfrontDepositMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"firstChargeDate":{"type":"string"},"status":{"type":"string","enum":["active","paused","settled_early","completed"]},"pausedAt":{"type":["string","null"]},"settledDate":{"type":["string","null"]},"settledAmountMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"syncProviderKey":{"type":["string","null"]},"syncExternalId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userId","name","presetLenderKey","customLenderId","currency","principalMinor","aprBps","installmentMinor","finalInstallmentMinor","installmentCount","frequency","setupFeeMinor","upfrontDepositMinor","firstChargeDate","status","pausedAt","settledDate","settledAmountMinor"],"additionalProperties":false},"lenderName":{"type":"string"},"lenderColorHex":{"type":"string"},"currency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"installments":{"type":"array","items":{"type":"object","properties":{"installmentIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sequenceNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"scheduledDate":{"type":"string"},"chargeDate":{"type":"string"},"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["paid","upcoming","paused","skipped","paid_early","settled_early"]},"isPaid":{"type":"boolean"},"overrideStatus":{"anyOf":[{"type":"string","enum":["paid_early","skipped","rescheduled"]},{"type":"null"}]},"remainingAfterMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["installmentIndex","sequenceNumber","scheduledDate","chargeDate","amountMinor","status","isPaid","overrideStatus","remainingAfterMinor"],"additionalProperties":false}},"totalInstallmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"paidInstallmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remainingInstallmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"financedPrincipalMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalPayableMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"costOfCreditMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"paidMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remainingMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"progressRatio":{"type":"number"},"nextChargeDate":{"type":["string","null"]},"nextChargeAmountMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"finalChargeDate":{"type":["string","null"]},"monthsRemaining":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"effectiveStatus":{"type":"string","enum":["active","paused","settled_early","completed"]},"isArchived":{"type":"boolean"}},"required":["contract","lenderName","lenderColorHex","currency","installments","totalInstallmentCount","paidInstallmentCount","remainingInstallmentCount","financedPrincipalMinor","totalPayableMinor","costOfCreditMinor","paidMinor","remainingMinor","progressRatio","nextChargeDate","nextChargeAmountMinor","finalChargeDate","monthsRemaining","effectiveStatus","isArchived"],"additionalProperties":false}}},"required":["importedCount","contracts"],"additionalProperties":false},"JsonExportBackup":{"type":"object","properties":{"version":{"type":"number","const":1},"exportedAt":{"type":"string"},"user":{"type":"object","properties":{"id":{"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-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"firstName":{"type":"string"},"lastName":{"type":["string","null"]},"avatarSource":{"type":"string","enum":["gravatar","initials"]},"dashboardStyle":{"type":"string","enum":["warm","crisp"]},"themeMode":{"type":"string","enum":["light","dark","system"]},"homeCurrency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]}},"required":["id","email","firstName","lastName","avatarSource","dashboardStyle","themeMode","homeCurrency"],"additionalProperties":false},"customLenders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"colorHex":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","userId","name","colorHex"],"additionalProperties":false}},"contracts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"contractNumber":{"type":["string","null"]},"presetLenderKey":{"anyOf":[{"type":"string","enum":["klarna","humm","clearpay","paypal","revolut","affirm","monzo_flex","scalapay","zip"]},{"type":"null"}]},"customLenderId":{"type":["string","null"]},"lenderName":{"type":"string"},"lenderColorHex":{"type":"string"},"currency":{"type":"string","enum":["EUR","GBP","USD","AUD","CAD","CHF","AED","ALL","ARS","BAM","BGN","BHD","BRL","CLP","CNY","COP","CZK","DKK","EGP","GEL","HKD","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KRW","KWD","LYD","MAD","MDL","MKD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RWF","SAR","SEK","SGD","THB","TND","TRY","TWD","UAH","UGX","UYU","VND","XAF","XOF","ZAR"]},"principalMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"aprBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"installmentMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"finalInstallmentMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"installmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"frequency":{"type":"string","enum":["monthly","biweekly","weekly"]},"setupFeeMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accountKeepingFeeMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"upfrontDepositMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"firstChargeDate":{"type":"string"},"status":{"type":"string","enum":["active","paused","settled_early","completed"]},"pausedAt":{"type":["string","null"]},"settledDate":{"type":["string","null"]},"settledAmountMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"syncProviderKey":{"type":["string","null"]},"syncExternalId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"overrides":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"contractId":{"type":"string"},"installmentIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"overrideStatus":{"type":"string","enum":["paid_early","skipped","rescheduled"]},"overrideDate":{"type":["string","null"]},"overrideAmountMinor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["installmentIndex","overrideStatus","overrideDate","overrideAmountMinor"],"additionalProperties":false}}},"required":["id","userId","name","presetLenderKey","customLenderId","currency","principalMinor","aprBps","installmentMinor","finalInstallmentMinor","installmentCount","frequency","setupFeeMinor","upfrontDepositMinor","firstChargeDate","status","pausedAt","settledDate","settledAmountMinor","overrides"],"additionalProperties":false}}},"required":["version","exportedAt","user","customLenders","contracts"],"additionalProperties":false},"ApiKeyCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"scopes":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","enum":["contracts:read","contracts:write","profile:read","profile:write"]}},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["name","scopes"],"additionalProperties":false},"ApiKeySummary":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"keyPrefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["contracts:read","contracts:write","profile:read","profile:write"]}},"expiresAt":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]},"revokedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","name","keyPrefix","scopes","expiresAt","lastUsedAt","revokedAt","createdAt"],"additionalProperties":false},"ApiKeysListResponse":{"type":"object","properties":{"apiKeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"keyPrefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["contracts:read","contracts:write","profile:read","profile:write"]}},"expiresAt":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]},"revokedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","name","keyPrefix","scopes","expiresAt","lastUsedAt","revokedAt","createdAt"],"additionalProperties":false}}},"required":["apiKeys"],"additionalProperties":false},"ApiKeyCreateResponse":{"type":"object","properties":{"apiKey":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"keyPrefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["contracts:read","contracts:write","profile:read","profile:write"]}},"expiresAt":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]},"revokedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","name","keyPrefix","scopes","expiresAt","lastUsedAt","revokedAt","createdAt"],"additionalProperties":false},"key":{"type":"string"}},"required":["apiKey","key"],"additionalProperties":false},"OAuthConsentSummary":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"clientName":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["contracts:read","contracts:write","profile:read","profile:write"]}},"grantedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","clientId","clientName","scopes","grantedAt","updatedAt"],"additionalProperties":false},"OAuthConsentsListResponse":{"type":"object","properties":{"consents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"clientName":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["contracts:read","contracts:write","profile:read","profile:write"]}},"grantedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","clientId","clientName","scopes","grantedAt","updatedAt"],"additionalProperties":false}}},"required":["consents"],"additionalProperties":false}}}}