{"openapi":"3.0.0","paths":{"/auth/logout":{"post":{"operationId":"AuthController_logout","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoutDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Log out a user.","tags":["Auth"]}},"/auth/refresh":{"post":{"operationId":"AuthController_refresh","parameters":[{"name":"singlePageApplication","required":true,"in":"query","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokensDto"}}}}},"summary":"Refresh an access token.","tags":["Auth"]}},"/auth/test-login":{"post":{"operationId":"AuthController_test","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestUserLoginDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokensDto"}}}}},"summary":"Login with test user","tags":["Auth"]}},"/auth/exchange-code":{"post":{"operationId":"AuthController_exchangeCode","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeCodeDto"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ExchangeCodeSuccessResponseDto"},{"$ref":"#/components/schemas/ExchangeCodeUnverifiedResponseDto"}]}}},"description":""}},"tags":["Auth"]}},"/auth/verify/phone/request":{"post":{"operationId":"AuthController_requestPhoneVerification","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestPhoneVerificationDto"}}}},"responses":{"201":{"description":""}},"tags":["Auth"]}},"/auth/verify/phone/confirm":{"post":{"operationId":"AuthController_confirmPhoneVerification","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmPhoneVerificationDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokensDto"}}}}},"tags":["Auth"]}},"/auth/provider":{"get":{"operationId":"AuthController_getOrganizationAuthProvider","parameters":[{"name":"domain","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnProviderDto"}}}}},"tags":["Auth"]}},"/.well-known/jwks.json":{"get":{"operationId":"JwksController_getJwks","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["JWKS"]}},"/users":{"post":{"operationId":"UsersController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEntity"}}}}},"security":[{"bearer":[]}],"tags":["Users"]},"get":{"operationId":"UsersController_findAll","parameters":[{"required":false,"name":"query","in":"query","schema":{"additionalProperties":true,"type":"object"}},{"required":false,"name":"limit","in":"query","schema":{"minimum":1,"type":"number"}},{"required":false,"name":"offset","in":"query","schema":{"minimum":0,"type":"number"}},{"required":false,"name":"sort","in":"query","schema":{"type":"array","items":{"type":"object"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["data","_count"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UserEntity"}},"_count":{"type":"object","required":["result","total"],"properties":{"total":{"type":"number","nullable":true,"description":"The total count of the data"},"result":{"type":"number","description":"The count of the returned data"}}}}}}}}},"security":[{"bearer":[]}],"tags":["Users"]}},"/users/current":{"get":{"operationId":"UsersController_findCurrent","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEntity"}}}}},"security":[{"bearer":[]}],"tags":["Users"]}},"/users/{id}":{"get":{"operationId":"UsersController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEntity"}}}}},"security":[{"bearer":[]}],"tags":["Users"]},"patch":{"operationId":"UsersController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Users"]},"delete":{"operationId":"UsersController_remove","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Users"]}},"/users/{id}/profile-picture":{"post":{"operationId":"UsersController_uploadProfilePicture","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Users"]},"delete":{"operationId":"UsersController_deleteProfilePicture","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"tags":["Users"]}},"/users/{id}/block":{"patch":{"operationId":"UsersController_block","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Users"]}},"/users/{id}/unblock":{"patch":{"operationId":"UsersController_unblock","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Users"]}},"/users/{id}/role":{"patch":{"operationId":"UsersController_updateRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Users"]}},"/users/{id}/personal":{"post":{"operationId":"UsersController_activatePersonal","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEntity"}}}}},"security":[{"bearer":[]}],"tags":["Users"]},"delete":{"operationId":"UsersController_deactivatePersonal","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEntity"}}}}},"security":[{"bearer":[]}],"tags":["Users"]}},"/users/{id}/restore":{"post":{"operationId":"UsersController_restore","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Users"]}},"/users/{id}/paymentcard":{"post":{"operationId":"UsersController_addPaymentCard","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPaymentCardDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Users"]}},"/users/{id}/paymentcard/{paymentCardId}":{"patch":{"operationId":"UsersController_updatePaymentCard","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"paymentCardId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePaymentCardDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Users"]},"delete":{"operationId":"UsersController_removePaymentCard","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"paymentCardId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Users"]}},"/users/{id}/push-token":{"post":{"operationId":"UsersController_addPushToken","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPushTokenDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Users"]}},"/users/{id}/push-token/{pushToken}":{"delete":{"operationId":"UsersController_removePushToken","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"pushToken","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Users"]}},"/inbox":{"post":{"operationId":"InboxController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInboxDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxEntity"}}}}},"security":[{"bearer":[]}],"tags":["Inbox"]},"get":{"operationId":"InboxController_findByQuery","parameters":[{"name":"accountId","required":false,"in":"query","schema":{"type":"string"}},{"name":"userId","required":false,"in":"query","schema":{"type":"string"}},{"name":"inboxId","required":false,"in":"query","schema":{"type":"string"}},{"name":"email","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxEntity"}}}}},"security":[{"bearer":[]}],"tags":["Inbox"]}},"/inbox/{id}":{"patch":{"operationId":"InboxController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInboxDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxEntity"}}}}},"security":[{"bearer":[]}],"tags":["Inbox"]},"get":{"operationId":"InboxController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxEntity"}}}}},"security":[{"bearer":[]}],"tags":["Inbox"]}},"/inbox/availability":{"get":{"operationId":"InboxController_getInboxAvailability","parameters":[{"name":"email","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxAvailableResponse"}}}}},"security":[{"bearer":[]}],"tags":["Inbox"]}},"/inbox/{inboxId}/items":{"get":{"operationId":"InboxController_findItems","parameters":[{"name":"inboxId","required":true,"in":"path","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"$ref":"#/components/schemas/InboxItemStatus"}},{"name":"storageKey","required":false,"in":"query","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","schema":{"type":"string"}},{"name":"amount","required":false,"in":"query","schema":{"type":"number"}},{"name":"currency","required":false,"in":"query","schema":{"type":"string"}},{"name":"date","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"merchant","required":false,"in":"query","schema":{"type":"string"}},{"name":"description","required":false,"in":"query","schema":{"type":"string"}},{"name":"reservationId","required":false,"in":"query","schema":{"type":"string"}},{"name":"organizationId","required":false,"in":"query","schema":{"type":"string"}},{"name":"expenseId","required":false,"in":"query","schema":{"nullable":true,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InboxItemEntity"}}}}}},"security":[{"bearer":[]}],"tags":["Inbox"]},"post":{"operationId":"InboxController_addItem","parameters":[{"name":"inboxId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddInboxItemDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxItemEntity"}}}}},"security":[{"bearer":[]}],"tags":["Inbox"]}},"/inbox/{inboxId}/items/{inboxItemId}":{"post":{"operationId":"InboxController_addInboxItemAttachment","parameters":[{"name":"inboxId","required":true,"in":"path","schema":{"type":"string"}},{"name":"inboxItemId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"tags":["Inbox"]},"patch":{"operationId":"InboxController_updateItem","parameters":[{"name":"inboxId","required":true,"in":"path","schema":{"type":"string"}},{"name":"inboxItemId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInboxItemDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Inbox"]},"delete":{"operationId":"InboxController_deleteItem","parameters":[{"name":"inboxId","required":true,"in":"path","schema":{"type":"string"}},{"name":"inboxItemId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"tags":["Inbox"]}},"/inbox/parse":{"post":{"operationId":"InboxController_parse","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success","no_attachments","error"]},"recipient":{"type":"string"},"senderEmail":{"type":"string"},"senderName":{"type":"string"},"errorMessage":{"type":"string"},"files":{"type":"array","items":{"type":"string","format":"binary"}}},"required":["status"]}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Inbox"]}},"/accounts/provision":{"post":{"operationId":"AccountsController_provision","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionAccountDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountEntity"}}}}},"security":[{"bearer":[]}],"summary":"Provision a new user and account in one call. Requires the organization\nto have apiProvisioningEnabled = true. Differs from POST /accounts in\nthat this creates the underlying User if one doesn't exist by email or\nphone number.","tags":["Accounts"]}},"/accounts":{"post":{"operationId":"AccountsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"summary":"Create an account connecting a user to an organization","tags":["Accounts"]},"get":{"operationId":"AccountsController_findAll","parameters":[{"name":"organizationId","required":false,"in":"query","schema":{"type":"string"}},{"required":false,"name":"query","in":"query","schema":{"additionalProperties":true,"type":"object"}},{"required":false,"name":"limit","in":"query","schema":{"minimum":1,"type":"number"}},{"required":false,"name":"offset","in":"query","schema":{"minimum":0,"type":"number"}},{"required":false,"name":"sort","in":"query","schema":{"type":"array","items":{"type":"object"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["data","_count"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountEntity"}},"_count":{"type":"object","required":["result","total"],"properties":{"total":{"type":"number","nullable":true,"description":"The total count of the data"},"result":{"type":"number","description":"The count of the returned data"}}}}}}}}},"security":[{"bearer":[]}],"tags":["Accounts"]}},"/accounts/{id}":{"get":{"operationId":"AccountsController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountEntity"}}}}},"security":[{"bearer":[]}],"tags":["Accounts"]},"patch":{"operationId":"AccountsController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Accounts"]},"delete":{"operationId":"AccountsController_remove","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"tags":["Accounts"]}},"/accounts/{id}/restore":{"post":{"operationId":"AccountsController_restore","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"tags":["Accounts"]}},"/accounts/{id}/block":{"post":{"operationId":"AccountsController_block","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Accounts"]}},"/accounts/{id}/unblock":{"post":{"operationId":"AccountsController_unblock","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Accounts"]}},"/accounts/{id}/assign-subordinates":{"post":{"operationId":"AccountsController_assignSubordinates","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignAccountSubordinatesDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Accounts"]}},"/accounts/{id}/unassign-subordinates":{"post":{"operationId":"AccountsController_unassignSubordinates","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignAccountSubordinatesDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Accounts"]}},"/accounts/test-notification":{"post":{"operationId":"AccountsController_testNotification","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyAccountDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"}}}}}},"security":[{"bearer":[]}],"tags":["Accounts"]}},"/capture/attachments/expense":{"post":{"operationId":"AttachmentCaptureController_captureExpense","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseCaptureResponseDto"}}}}},"security":[{"bearer":[]}],"tags":["Attachment Capture"]}},"/capture/attachments/extract/expense-data":{"post":{"deprecated":true,"operationId":"AttachmentCaptureController_extractExpenseDataDeprecated","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseCaptureResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["Attachment Capture"]}},"/capture/attachments/accommodation":{"post":{"operationId":"AttachmentCaptureController_captureAccommodation","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccommodationCaptureResponseDto"}}}}},"security":[{"bearer":[]}],"tags":["Attachment Capture"]}},"/capture/attachments/extract/accommodation-data":{"post":{"deprecated":true,"operationId":"AttachmentCaptureController_extractAccommodationDataDeprecated","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccommodationCaptureResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["Attachment Capture"]}},"/capture/attachments/expense-description":{"post":{"operationId":"AttachmentCaptureController_captureExpenseDescription","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"bearer":[]}],"tags":["Attachment Capture"]}},"/capture/attachments/generate/expense-description":{"post":{"deprecated":true,"operationId":"AttachmentCaptureController_generateExpenseDescriptionDeprecated","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["Attachment Capture"]}},"/capture/attachments/ocr":{"post":{"operationId":"AttachmentCaptureController_ocr","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureOcrRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"bearer":[]}],"tags":["Attachment Capture"]}},"/ai/extract/expense-data":{"post":{"deprecated":true,"operationId":"LegacyAIController_extractExpenseData","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseCaptureResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["AI (Deprecated)"]}},"/ai/extract/accommodation-data":{"post":{"deprecated":true,"operationId":"LegacyAIController_extractAccommodationData","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccommodationCaptureResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["AI (Deprecated)"]}},"/ai/generate/expense-description":{"post":{"deprecated":true,"operationId":"LegacyAIController_generateExpenseDescription","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["AI (Deprecated)"]}},"/ai/ocr":{"post":{"deprecated":true,"operationId":"LegacyAIController_ocr","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureOcrRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["AI (Deprecated)"]}},"/organizations":{"post":{"operationId":"OrganizationsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Organizations"]},"get":{"operationId":"OrganizationsController_findAll","parameters":[{"required":false,"name":"query","in":"query","schema":{"additionalProperties":true,"type":"object"}},{"required":false,"name":"limit","in":"query","schema":{"minimum":1,"type":"number"}},{"required":false,"name":"offset","in":"query","schema":{"minimum":0,"type":"number"}},{"required":false,"name":"sort","in":"query","schema":{"type":"array","items":{"type":"object"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["data","_count"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationEntity"}},"_count":{"type":"object","required":["result","total"],"properties":{"total":{"type":"number","nullable":true,"description":"The total count of the data"},"result":{"type":"number","description":"The count of the returned data"}}}}}}}}},"security":[{"bearer":[]}],"tags":["Organizations"]}},"/organizations/exists":{"get":{"operationId":"OrganizationsController_exists","parameters":[{"name":"orgnumber","required":false,"in":"query","schema":{"type":"string"}},{"name":"handle","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}},"security":[{"bearer":[]}],"tags":["Organizations"]}},"/organizations/{id}":{"get":{"operationId":"OrganizationsController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationEntity"}}}}},"security":[{"bearer":[]}],"tags":["Organizations"]},"patch":{"operationId":"OrganizationsController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Organizations"]},"delete":{"operationId":"OrganizationsController_remove","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Organizations"]}},"/organizations/{id}/entitlements":{"get":{"operationId":"OrganizationsController_getEntitlements","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"tags":["Organizations"]}},"/organizations/{id}/ehfstatus":{"get":{"operationId":"OrganizationsController_getEhfStatus","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}},"security":[{"bearer":[]}],"tags":["Organizations"]}},"/organizations/{id}/auth-provider":{"get":{"operationId":"OrganizationsController_getAuthProvider","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/OrganizationAuthProviderDto"}]}}}}},"security":[{"bearer":[]}],"tags":["Organizations"]},"patch":{"operationId":"OrganizationsController_upsertAuthProvider","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertOrganizationAuthProviderDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationAuthProviderDto"}}}}},"security":[{"bearer":[]}],"tags":["Organizations"]},"delete":{"operationId":"OrganizationsController_removeAuthProvider","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"security":[{"bearer":[]}],"tags":["Organizations"]}},"/organizations/{id}/sync-usage":{"post":{"operationId":"OrganizationsController_syncUsage","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Organizations"]}},"/organizations/{id}/reset-categories":{"post":{"operationId":"OrganizationsController_resetCategories","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Organizations"]}},"/organizations/{id}/clear-categories":{"post":{"operationId":"OrganizationsController_clearCategories","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"}}}}}},"security":[{"bearer":[]}],"tags":["Organizations"]}},"/organizations/{id}/comments":{"get":{"operationId":"OrganizationCommentsController_getComments","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationCommentEntity"}}}}}},"security":[{"bearer":[]}],"tags":["Organization Comments"]},"post":{"operationId":"OrganizationCommentsController_addComment","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationCommentDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Organization Comments"]}},"/organizations/{id}/comments/{commentId}":{"patch":{"operationId":"OrganizationCommentsController_updateComment","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"commentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationCommentDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Organization Comments"]},"delete":{"operationId":"OrganizationCommentsController_deleteComment","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"commentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Organization Comments"]}},"/categories":{"post":{"operationId":"CategoriesController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCategoryDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Categories"]},"get":{"operationId":"CategoriesController_findAll","parameters":[{"required":false,"name":"query","in":"query","schema":{"additionalProperties":true,"type":"object"}},{"required":false,"name":"limit","in":"query","schema":{"minimum":1,"type":"number"}},{"required":false,"name":"offset","in":"query","schema":{"minimum":0,"type":"number"}},{"required":false,"name":"sort","in":"query","schema":{"type":"array","items":{"type":"object"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryEntity"}}}}}},"security":[{"bearer":[]}],"tags":["Categories"]}},"/categories/{id}":{"get":{"operationId":"CategoriesController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryEntity"}}}}},"security":[{"bearer":[]}],"tags":["Categories"]},"patch":{"operationId":"CategoriesController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCategoryDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Categories"]},"delete":{"operationId":"CategoriesController_remove","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Categories"]}},"/enterprise":{"post":{"operationId":"EnterpriseController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEnterpriseDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterpriseEntity"}}}}},"security":[{"bearer":[]}],"tags":["Enterprise"]},"get":{"operationId":"EnterpriseController_findAll","parameters":[{"required":false,"name":"query","in":"query","schema":{"additionalProperties":true,"type":"object"}},{"required":false,"name":"limit","in":"query","schema":{"minimum":1,"type":"number"}},{"required":false,"name":"offset","in":"query","schema":{"minimum":0,"type":"number"}},{"required":false,"name":"sort","in":"query","schema":{"type":"array","items":{"type":"object"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["data","_count"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EnterpriseEntity"}},"_count":{"type":"object","required":["result","total"],"properties":{"total":{"type":"number","nullable":true,"description":"The total count of the data"},"result":{"type":"number","description":"The count of the returned data"}}}}}}}}},"security":[{"bearer":[]}],"tags":["Enterprise"]}},"/enterprise/{id}":{"get":{"operationId":"EnterpriseController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterpriseEntity"}}}}},"security":[{"bearer":[]}],"tags":["Enterprise"]},"patch":{"operationId":"EnterpriseController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEnterpriseDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterpriseEntity"}}}}},"security":[{"bearer":[]}],"tags":["Enterprise"]},"delete":{"operationId":"EnterpriseController_remove","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Enterprise"]}},"/enterprise/{id}/organizations":{"get":{"operationId":"EnterpriseController_findOrganizations","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"required":false,"name":"query","in":"query","schema":{"additionalProperties":true,"type":"object"}},{"required":false,"name":"limit","in":"query","schema":{"minimum":1,"type":"number"}},{"required":false,"name":"offset","in":"query","schema":{"minimum":0,"type":"number"}},{"required":false,"name":"sort","in":"query","schema":{"type":"array","items":{"type":"object"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["data","_count"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationEntity"}},"_count":{"type":"object","required":["result","total"],"properties":{"total":{"type":"number","nullable":true,"description":"The total count of the data"},"result":{"type":"number","description":"The count of the returned data"}}}}}}}}},"security":[{"bearer":[]}],"tags":["Enterprise"]},"post":{"operationId":"EnterpriseController_createOrganization","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationInEnterpriseDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationEntity"}}}}},"security":[{"bearer":[]}],"tags":["Enterprise"]}},"/enterprise/{id}/organizations/{organizationId}":{"post":{"operationId":"EnterpriseController_addOrganization","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddOrganizationToEnterpriseDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Enterprise"]},"delete":{"operationId":"EnterpriseController_removeOrganization","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Enterprise"]}},"/enterprise/{enterpriseId}/products":{"get":{"operationId":"EnterpriseProductsController_findAll","parameters":[{"name":"enterpriseId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EnterpriseProductEntity"}}}}}},"security":[{"bearer":[]}],"tags":["Enterprise Products"]},"post":{"operationId":"EnterpriseProductsController_create","parameters":[{"name":"enterpriseId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEnterpriseProductDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterpriseProductEntity"}}}}},"security":[{"bearer":[]}],"tags":["Enterprise Products"]}},"/enterprise/{enterpriseId}/products/{productId}":{"delete":{"operationId":"EnterpriseProductsController_remove","parameters":[{"name":"enterpriseId","required":true,"in":"path","schema":{"type":"string"}},{"name":"productId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Enterprise Products"]}},"/enterprise/{enterpriseId}/accounts":{"get":{"operationId":"EnterpriseAccountsController_findAll","parameters":[{"name":"enterpriseId","required":true,"in":"path","schema":{"type":"string"}},{"required":false,"name":"query","in":"query","schema":{"additionalProperties":true,"type":"object"}},{"required":false,"name":"limit","in":"query","schema":{"minimum":1,"type":"number"}},{"required":false,"name":"offset","in":"query","schema":{"minimum":0,"type":"number"}},{"required":false,"name":"sort","in":"query","schema":{"type":"array","items":{"type":"object"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["data","_count"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EnterpriseAccountEntity"}},"_count":{"type":"object","required":["result","total"],"properties":{"total":{"type":"number","nullable":true,"description":"The total count of the data"},"result":{"type":"number","description":"The count of the returned data"}}}}}}}}},"security":[{"bearer":[]}],"tags":["Enterprise Accounts"]},"post":{"operationId":"EnterpriseAccountsController_create","parameters":[{"name":"enterpriseId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEnterpriseAccountDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterpriseAccountEntity"}}}}},"security":[{"bearer":[]}],"tags":["Enterprise Accounts"]}},"/enterprise/{enterpriseId}/accounts/{accountId}":{"get":{"operationId":"EnterpriseAccountsController_findOne","parameters":[{"name":"enterpriseId","required":true,"in":"path","schema":{"type":"string"}},{"name":"accountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterpriseAccountEntity"}}}}},"security":[{"bearer":[]}],"tags":["Enterprise Accounts"]},"patch":{"operationId":"EnterpriseAccountsController_update","parameters":[{"name":"enterpriseId","required":true,"in":"path","schema":{"type":"string"}},{"name":"accountId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEnterpriseAccountDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterpriseAccountEntity"}}}}},"security":[{"bearer":[]}],"tags":["Enterprise Accounts"]},"delete":{"operationId":"EnterpriseAccountsController_remove","parameters":[{"name":"enterpriseId","required":true,"in":"path","schema":{"type":"string"}},{"name":"accountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Enterprise Accounts"]}},"/enterprise/{enterpriseId}/categories":{"get":{"operationId":"EnterpriseCategoriesController_findAll","parameters":[{"name":"enterpriseId","required":true,"in":"path","schema":{"type":"string"}},{"required":false,"name":"query","in":"query","schema":{"additionalProperties":true,"type":"object"}},{"required":false,"name":"limit","in":"query","schema":{"minimum":1,"type":"number"}},{"required":false,"name":"offset","in":"query","schema":{"minimum":0,"type":"number"}},{"required":false,"name":"sort","in":"query","schema":{"type":"array","items":{"type":"object"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["data","_count"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EnterpriseCategoryEntity"}},"_count":{"type":"object","required":["result","total"],"properties":{"total":{"type":"number","nullable":true,"description":"The total count of the data"},"result":{"type":"number","description":"The count of the returned data"}}}}}}}}},"security":[{"bearer":[]}],"tags":["Enterprise Categories"]},"post":{"operationId":"EnterpriseCategoriesController_create","parameters":[{"name":"enterpriseId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEnterpriseCategoryDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterpriseCategoryEntity"}}}}},"security":[{"bearer":[]}],"tags":["Enterprise Categories"]}},"/enterprise/{enterpriseId}/categories/{categoryId}":{"get":{"operationId":"EnterpriseCategoriesController_findOne","parameters":[{"name":"enterpriseId","required":true,"in":"path","schema":{"type":"string"}},{"name":"categoryId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterpriseCategoryEntity"}}}}},"security":[{"bearer":[]}],"tags":["Enterprise Categories"]},"patch":{"operationId":"EnterpriseCategoriesController_update","parameters":[{"name":"enterpriseId","required":true,"in":"path","schema":{"type":"string"}},{"name":"categoryId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEnterpriseCategoryDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterpriseCategoryEntity"}}}}},"security":[{"bearer":[]}],"tags":["Enterprise Categories"]},"delete":{"operationId":"EnterpriseCategoriesController_remove","parameters":[{"name":"enterpriseId","required":true,"in":"path","schema":{"type":"string"}},{"name":"categoryId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Enterprise Categories"]}},"/enterprise/{enterpriseId}/users/search":{"get":{"operationId":"EnterpriseUsersController_searchUsers","parameters":[{"name":"enterpriseId","required":true,"in":"path","schema":{"type":"string"}},{"name":"q","required":true,"in":"query","description":"Search query (name, email, or phone)","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Maximum results to return","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EnterpriseUserSearchResultDto"}}}}}},"security":[{"bearer":[]}],"summary":"Search users across all organizations in the enterprise","tags":["Enterprise Users"]}},"/enterprise/{enterpriseId}/invitations":{"post":{"operationId":"EnterpriseInvitationsController_create","parameters":[{"name":"enterpriseId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEnterpriseInvitationDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterpriseInvitationEntity"}}}}},"security":[{"bearer":[]}],"summary":"Create an invitation to join the enterprise","tags":["Enterprise Invitations"]},"get":{"operationId":"EnterpriseInvitationsController_findAll","parameters":[{"name":"enterpriseId","required":true,"in":"path","schema":{"type":"string"}},{"required":false,"name":"query","in":"query","schema":{"additionalProperties":true,"type":"object"}},{"required":false,"name":"limit","in":"query","schema":{"minimum":1,"type":"number"}},{"required":false,"name":"offset","in":"query","schema":{"minimum":0,"type":"number"}},{"required":false,"name":"sort","in":"query","schema":{"type":"array","items":{"type":"object"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["data","_count"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EnterpriseInvitationEntity"}},"_count":{"type":"object","required":["result","total"],"properties":{"total":{"type":"number","nullable":true,"description":"The total count of the data"},"result":{"type":"number","description":"The count of the returned data"}}}}}}}}},"security":[{"bearer":[]}],"summary":"List all invitations for the enterprise","tags":["Enterprise Invitations"]}},"/enterprise/{enterpriseId}/invitations/{invitationId}":{"delete":{"operationId":"EnterpriseInvitationsController_revoke","parameters":[{"name":"enterpriseId","required":true,"in":"path","schema":{"type":"string"}},{"name":"invitationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Revoke an invitation","tags":["Enterprise Invitations"]}},"/enterprise/invitations/{token}":{"get":{"operationId":"EnterpriseInvitationsController_findByToken","parameters":[{"name":"token","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterpriseInvitationEntity"}}}}},"security":[{"bearer":[]}],"summary":"Get invitation details by token (for accept page)","tags":["Enterprise Invitations"]}},"/enterprise/invitations/{token}/accept":{"post":{"operationId":"EnterpriseInvitationsController_accept","parameters":[{"name":"token","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterpriseInvitationEntity"}}}}},"security":[{"bearer":[]}],"summary":"Accept an invitation and join the enterprise","tags":["Enterprise Invitations"]}},"/search":{"post":{"operationId":"SearchController_search","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiSearchParamsDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiSearchResponseDto"}}}}},"security":[{"bearer":[]}],"tags":["Search"]}},"/search/sync":{"post":{"operationId":"SearchController_syncIndexes","parameters":[],"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Search"]}},"/departments":{"post":{"operationId":"DepartmentsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDepartmentDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentEntity"}}}}},"security":[{"bearer":[]}],"tags":["Departments"]},"get":{"operationId":"DepartmentsController_findAll","parameters":[{"required":false,"name":"query","in":"query","schema":{"additionalProperties":true,"type":"object"}},{"required":false,"name":"limit","in":"query","schema":{"minimum":1,"type":"number"}},{"required":false,"name":"offset","in":"query","schema":{"minimum":0,"type":"number"}},{"required":false,"name":"sort","in":"query","schema":{"type":"array","items":{"type":"object"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentEntity"}}}}}},"security":[{"bearer":[]}],"tags":["Departments"]}},"/departments/{id}":{"get":{"operationId":"DepartmentsController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentEntity"}}}}},"security":[{"bearer":[]}],"tags":["Departments"]},"patch":{"operationId":"DepartmentsController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDepartmentDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Departments"]},"delete":{"operationId":"DepartmentsController_remove","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Departments"]}},"/departments/{id}/accounts/{accountId}":{"patch":{"operationId":"DepartmentsController_updateDepartmentAssignmentRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"accountId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDepartmentAssignmentRoleDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Departments"]}},"/departments/{id}/accounts/connect":{"post":{"operationId":"DepartmentsController_connectAccounts","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectOrDisconnectAccountsDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Departments"]}},"/departments/{id}/accounts/disconnect":{"post":{"operationId":"DepartmentsController_disconnectAccounts","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectOrDisconnectAccountsDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Departments"]}},"/departments/{id}/projects/connect":{"post":{"operationId":"DepartmentsController_connectProjects","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectProjectsDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Departments"]}},"/departments/{id}/projects/disconnect":{"post":{"operationId":"DepartmentsController_disconnectProjects","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectProjectsDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Departments"]}},"/reports":{"post":{"operationId":"ReportsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReportDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}}},"security":[{"bearer":[]}],"tags":["Reports"]},"get":{"operationId":"ReportsController_findAll","parameters":[{"name":"review-filter","required":false,"in":"query","description":"Filter reports by review assignment: all (default) or assigned (only reports where user matches pending review criteria)","schema":{"enum":["all","assigned"],"type":"string"}},{"required":false,"name":"query","in":"query","schema":{"additionalProperties":true,"type":"object"}},{"required":false,"name":"limit","in":"query","schema":{"minimum":1,"type":"number"}},{"required":false,"name":"offset","in":"query","schema":{"minimum":0,"type":"number"}},{"required":false,"name":"sort","in":"query","schema":{"type":"array","items":{"type":"object"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["data","_count"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReportEntity"}},"_count":{"type":"object","required":["result","total"],"properties":{"total":{"type":"number","nullable":true,"description":"The total count of the data"},"result":{"type":"number","description":"The count of the returned data"}}}}}}}}},"security":[{"bearer":[]}],"tags":["Reports"]}},"/reports/{id}":{"patch":{"operationId":"ReportsController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateReportDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Reports"]},"delete":{"operationId":"ReportsController_remove","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"tags":["Reports"]},"get":{"operationId":"ReportsController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}}},"security":[{"bearer":[]}],"tags":["Reports"]}},"/reports/{id}/restore":{"patch":{"operationId":"ReportsController_restore","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"tags":["Reports"]}},"/reports/{id}/submit":{"post":{"operationId":"ReportsController_submit","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"400":{"description":"Validation failed: some required fields are missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorMessageResponseDto"}}}}},"security":[{"bearer":[]}],"tags":["Reports"]}},"/reports/{id}/unsubmit":{"post":{"operationId":"ReportsController_unsubmit","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"tags":["Reports"]}},"/reports/{id}/transfer":{"post":{"operationId":"ReportsController_transfer","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferReportDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferReportResponseDto"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferReportResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Transfer a draft report to another organization","tags":["Reports"]}},"/reports/{id}/approve":{"post":{"operationId":"ReportsController_approve","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"tags":["Reports"]}},"/reports/{id}/unapprove":{"post":{"operationId":"ReportsController_unapprove","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"tags":["Reports"]}},"/reports/{id}/reject":{"post":{"operationId":"ReportsController_reject","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewReportDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"tags":["Reports"]}},"/reports/{id}/unreject":{"post":{"operationId":"ReportsController_unreject","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"tags":["Reports"]}},"/reports/{id}/recompute-amount":{"post":{"operationId":"ReportsController_recomputeAmount","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"summary":"Recompute report.amount from its underlying child rows.","tags":["Reports"]}},"/reports/{id}/reviews":{"get":{"operationId":"ReportsController_reviews","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReviewEntity"}}}}}},"security":[{"bearer":[]}],"tags":["Reports"]}},"/reports/{id}/preview":{"get":{"operationId":"ReportsController_preview","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"bearer":[]}],"tags":["Reports"]}},"/reports/reviews/{reviewId}/reassign":{"patch":{"description":"Marks the original review as REASSIGNED and creates a new pending review with updated criteria. Requires ADMIN+ permissions.","operationId":"ReportsController_reassignReview","parameters":[{"name":"reviewId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReassignReviewDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewEntity"}}}}},"security":[{"bearer":[]}],"summary":"Reassign a pending review to a new reviewer","tags":["Reports"]}},"/reports/reviews/{reviewId}/override":{"post":{"description":"Marks the review as OVERRIDDEN, allowing the flow to continue past this step. Requires ADMIN+ permissions and a reason.","operationId":"ReportsController_overrideReview","parameters":[{"name":"reviewId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverrideReviewDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewEntity"}}}},"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Override a pending review step","tags":["Reports"]}},"/reports/{id}/travels":{"post":{"operationId":"TravelsController_create","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTravelDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"tags":["Travels"]},"get":{"operationId":"TravelsController_findByReportId","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Travels"]}},"/reports/{id}/travels/{travelId}":{"patch":{"operationId":"TravelsController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"travelId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTravelDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"tags":["Travels"]},"get":{"operationId":"TravelsController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"travelId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"tags":["Travels"]}},"/reports/{reportId}/travels/{travelId}/accommodations":{"post":{"operationId":"AccommodationsController_create","parameters":[{"name":"reportId","required":true,"in":"path","schema":{"type":"string"}},{"name":"travelId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccommodationDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TravelAccommodationEntity"}}}}},"security":[{"bearer":[]}],"tags":["Accommodations"]}},"/reports/{reportId}/travels/{travelId}/accommodations/{accommodationId}":{"patch":{"operationId":"AccommodationsController_update","parameters":[{"name":"reportId","required":true,"in":"path","schema":{"type":"string"}},{"name":"travelId","required":true,"in":"path","schema":{"type":"string"}},{"name":"accommodationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccommodationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TravelAccommodationEntity"}}}}},"security":[{"bearer":[]}],"tags":["Accommodations"]},"delete":{"operationId":"AccommodationsController_delete","parameters":[{"name":"reportId","required":true,"in":"path","schema":{"type":"string"}},{"name":"travelId","required":true,"in":"path","schema":{"type":"string"}},{"name":"accommodationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TravelAccommodationEntity"}}}}},"security":[{"bearer":[]}],"tags":["Accommodations"]}},"/reports/{reportId}/travels/{travelId}/accommodations/{accommodationId}/attachments":{"get":{"operationId":"AccommodationsController_getAttachments","parameters":[{"name":"reportId","required":true,"in":"path","schema":{"type":"string"}},{"name":"travelId","required":true,"in":"path","schema":{"type":"string"}},{"name":"accommodationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentEntity"}}}}}},"security":[{"bearer":[]}],"tags":["Accommodations"]},"post":{"operationId":"AccommodationsController_uploadAttachment","parameters":[{"name":"reportId","required":true,"in":"path","schema":{"type":"string"}},{"name":"travelId","required":true,"in":"path","schema":{"type":"string"}},{"name":"accommodationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadAccommodationAttachmentDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Accommodations"]}},"/invoices":{"get":{"operationId":"InvoicesController_findAll","parameters":[{"required":false,"name":"query","in":"query","schema":{"additionalProperties":true,"type":"object"}},{"required":false,"name":"limit","in":"query","schema":{"minimum":1,"type":"number"}},{"required":false,"name":"offset","in":"query","schema":{"minimum":0,"type":"number"}},{"required":false,"name":"sort","in":"query","schema":{"type":"array","items":{"type":"object"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["data","_count"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceEntity"}},"_count":{"type":"object","required":["result","total"],"properties":{"total":{"type":"number","nullable":true,"description":"The total count of the data"},"result":{"type":"number","description":"The count of the returned data"}}}}}}}}},"security":[{"bearer":[]}],"tags":["Invoices"]},"post":{"operationId":"InvoicesController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceEntity"}}}}},"security":[{"bearer":[]}],"tags":["Invoices"]}},"/invoices/{id}":{"get":{"operationId":"InvoicesController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceEntity"}}}}},"security":[{"bearer":[]}],"tags":["Invoices"]},"patch":{"operationId":"InvoicesController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoiceDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceEntity"}}}}},"security":[{"bearer":[]}],"tags":["Invoices"]}},"/invoices/regenerate":{"post":{"operationId":"InvoicesController_regenerate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegenerateInvoiceDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceEntity"}}}}},"security":[{"bearer":[]}],"tags":["Invoices"]}},"/invoices/generate-ehf":{"post":{"operationId":"InvoicesController_generateEhf","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateEhfInvoiceDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"bearer":[]}],"tags":["Invoices"]}},"/invoices/{id}/replace":{"post":{"operationId":"InvoicesController_replace","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Invoices"]}},"/invoices/{id}/send":{"post":{"operationId":"InvoicesController_send","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendInvoiceDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Invoices"]}},"/rates":{"post":{"operationId":"RatesController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRateDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Rates"]},"get":{"operationId":"RatesController_findAll","parameters":[{"required":false,"name":"query","in":"query","schema":{"additionalProperties":true,"type":"object"}},{"required":false,"name":"limit","in":"query","schema":{"minimum":1,"type":"number"}},{"required":false,"name":"offset","in":"query","schema":{"minimum":0,"type":"number"}},{"required":false,"name":"sort","in":"query","schema":{"type":"array","items":{"type":"object"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["data","_count"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RateEntity"}},"_count":{"type":"object","required":["result","total"],"properties":{"total":{"type":"number","nullable":true,"description":"The total count of the data"},"result":{"type":"number","description":"The count of the returned data"}}}}}}}}},"tags":["Rates"]}},"/rates/{id}":{"get":{"operationId":"RatesController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateEntity"}}}}},"tags":["Rates"]},"patch":{"operationId":"RatesController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRateDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Rates"]},"delete":{"operationId":"RatesController_remove","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Rates"]}},"/flows":{"post":{"operationId":"FlowsController_create","parameters":[{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFlowDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowDto"}}}}},"security":[{"bearer":[]}],"tags":["Flows"]},"get":{"operationId":"FlowsController_findAll","parameters":[{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FlowListItemDto"}}}}}},"security":[{"bearer":[]}],"tags":["Flows"]}},"/flows/import":{"post":{"operationId":"FlowsController_importFlow","parameters":[{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowDto"}}}}},"security":[{"bearer":[]}],"tags":["Flows"]}},"/flows/triggers":{"get":{"operationId":"FlowsController_getTriggers","parameters":[{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TriggerInfoDto"}}}}}},"security":[{"bearer":[]}],"tags":["Flows"]}},"/flows/schema/{trigger}":{"get":{"operationId":"FlowsController_getSchema","parameters":[{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}},{"name":"trigger","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerSchemaDto"}}}}},"security":[{"bearer":[]}],"tags":["Flows"]}},"/flows/context-schema":{"get":{"operationId":"FlowsController_getDomainSchema","parameters":[{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}},{"name":"domain","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainSchemaDto"}}}}},"security":[{"bearer":[]}],"tags":["Flows"]}},"/flows/{id}":{"get":{"operationId":"FlowsController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowDto"}}}}},"security":[{"bearer":[]}],"tags":["Flows"]},"patch":{"operationId":"FlowsController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFlowDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowDto"}}}}},"security":[{"bearer":[]}],"tags":["Flows"]},"delete":{"operationId":"FlowsController_remove","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"security":[{"bearer":[]}],"tags":["Flows"]}},"/flows/{id}/validate":{"post":{"operationId":"FlowsController_validate","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowValidationResultDto"}}}}},"security":[{"bearer":[]}],"tags":["Flows"]}},"/flows/{id}/simulate":{"post":{"operationId":"FlowsController_simulate","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowSimulationRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowSimulationResultDto"}}}}},"security":[{"bearer":[]}],"tags":["Flows"]}},"/flows/{id}/simulate/{subjectId}":{"post":{"operationId":"FlowsController_simulateWithSubject","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"subjectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowSimulationRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowSimulationResultDto"}}}}},"security":[{"bearer":[]}],"tags":["Flows"]}},"/flows/{id}/duplicate":{"post":{"operationId":"FlowsController_duplicate","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowDto"}}}}},"security":[{"bearer":[]}],"tags":["Flows"]}},"/flows/{id}/publish":{"post":{"operationId":"FlowsController_publish","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowDto"}}}}},"security":[{"bearer":[]}],"summary":"Publish a flow - validates and snapshots draft to published version","tags":["Flows"]}},"/flows/{id}/discard":{"post":{"operationId":"FlowsController_discardDraft","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowDto"}}}}},"security":[{"bearer":[]}],"summary":"Discard draft changes - resets to published version","tags":["Flows"]}},"/flows/{id}/traces":{"get":{"operationId":"FlowsController_getTraces","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}},{"required":false,"name":"query","in":"query","schema":{"additionalProperties":true,"type":"object"}},{"required":false,"name":"limit","in":"query","schema":{"minimum":1,"type":"number"}},{"required":false,"name":"offset","in":"query","schema":{"minimum":0,"type":"number"}},{"required":false,"name":"sort","in":"query","schema":{"type":"array","items":{"type":"object"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["data","_count"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FlowTraceDto"}},"_count":{"type":"object","required":["result","total"],"properties":{"total":{"type":"number","nullable":true,"description":"The total count of the data"},"result":{"type":"number","description":"The count of the returned data"}}}}}}}}},"security":[{"bearer":[]}],"summary":"Get execution traces for a flow (paginated)","tags":["Flows"]}},"/flows/{id}/traces/{traceId}":{"get":{"operationId":"FlowsController_getTrace","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"traceId","required":true,"in":"path","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowTraceWithLogsDto"}}}}},"security":[{"bearer":[]}],"summary":"Get a single trace with full execution logs","tags":["Flows"]}},"/flows/{id}/versions":{"get":{"operationId":"FlowsController_listVersions","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Flows"]}},"/flows/{id}/versions/{versionId}":{"get":{"operationId":"FlowsController_getVersion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"versionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get a specific version's details","tags":["Flows"]}},"/flows/{id}/versions/{versionId}/restore":{"post":{"operationId":"FlowsController_restoreVersion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"versionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowDto"}}}}},"security":[{"bearer":[]}],"summary":"Restore a previous version into the draft (does not auto-publish)","tags":["Flows"]}},"/flows/{id}/export":{"get":{"operationId":"FlowsController_exportFlow","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}},{"name":"format","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Flows"]}},"/attachments/{id}/fingerprints":{"get":{"operationId":"FingerprintController_getAttachmentMatches","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FingerprintMatchDto"}}}}}},"tags":["Fingerprint"]}},"/reports/{id}/fingerprint":{"get":{"operationId":"FingerprintController_getReportSummary","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FingerprintMatchSummaryDto"}}}}},"tags":["Fingerprint"]}},"/organizations/{id}/fingerprint":{"get":{"operationId":"FingerprintController_getOrgStats","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Fingerprint"]}},"/fingerprints/{id}":{"get":{"operationId":"FingerprintController_getMatchDetails","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FingerprintMatchDetailsDto"}}}}},"tags":["Fingerprint"]}},"/fingerprints/{id}/resolutions":{"get":{"operationId":"FingerprintController_getResolutionHistory","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FingerprintResolutionDto"}}}}}},"tags":["Fingerprint"]}},"/fingerprints/{id}/dismiss":{"post":{"operationId":"FingerprintController_dismissMatch","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DismissMatchDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FingerprintMatchDto"}}}}},"tags":["Fingerprint"]}},"/fingerprints/{id}/confirm":{"post":{"operationId":"FingerprintController_confirmMatch","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmMatchDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FingerprintMatchDto"}}}}},"tags":["Fingerprint"]}},"/fingerprints/{id}/unresolve":{"post":{"operationId":"FingerprintController_unresolveMatch","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FingerprintMatchDto"}}}}},"tags":["Fingerprint"]}},"/expenses":{"post":{"operationId":"ExpensesController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExpenseDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseEntity"}}}}},"security":[{"bearer":[]}],"tags":["Expenses"]},"get":{"operationId":"ExpensesController_findAll","parameters":[{"name":"reportId","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"}}}}}},"security":[{"bearer":[]}],"tags":["Expenses"]}},"/expenses/{id}":{"patch":{"operationId":"ExpensesController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExpenseDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Expenses"]},"get":{"operationId":"ExpensesController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseEntity"}}}}},"security":[{"bearer":[]}],"tags":["Expenses"]},"delete":{"operationId":"ExpensesController_remove","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Expenses"]}},"/expenses/exchangerate":{"post":{"operationId":"ExpensesController_getExchangeRate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeRateDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"default":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}}},"security":[{"bearer":[]}],"tags":["Expenses"]}},"/attachments":{"get":{"operationId":"AttachmentsController_findAll","parameters":[{"name":"expenseId","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentEntity"}}}}}},"security":[{"bearer":[]}],"tags":["Attachments"]},"post":{"operationId":"AttachmentsController_uploadAttachment","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadAttachmentDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"tags":["Attachments"]}},"/attachments/{id}":{"get":{"operationId":"AttachmentsController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentEntity"}}}}},"security":[{"bearer":[]}],"tags":["Attachments"]},"delete":{"operationId":"AttachmentsController_deleteAttachment","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Attachments"]}},"/drives/distance":{"post":{"operationId":"DrivesController_calculateDistance","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculateDriveDistanceDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveDistanceResponseDto"}}}}},"security":[{"bearer":[]}],"tags":["Drives"]}},"/drives":{"post":{"operationId":"DrivesController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDriveDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveEntity"}}}}},"security":[{"bearer":[]}],"tags":["Drives"]},"get":{"operationId":"DrivesController_findAll","parameters":[{"name":"reportId","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"}}}}}},"security":[{"bearer":[]}],"tags":["Drives"]}},"/drives/{id}":{"patch":{"operationId":"DrivesController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDriveDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveEntity"}}}}},"security":[{"bearer":[]}],"tags":["Drives"]},"get":{"operationId":"DrivesController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveEntity"}}}}},"security":[{"bearer":[]}],"tags":["Drives"]},"delete":{"operationId":"DrivesController_remove","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Drives"]}},"/per-diems":{"get":{"operationId":"PerDiemsController_findAll","parameters":[{"name":"reportId","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PerDiemEntity"}}}}}},"security":[{"bearer":[]}],"tags":["PerDiems"]}},"/per-diems/{id}":{"get":{"operationId":"PerDiemsController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerDiemEntity"}}}}},"security":[{"bearer":[]}],"tags":["PerDiems"]},"patch":{"operationId":"PerDiemsController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPerDiemDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["PerDiems"]}},"/invitations":{"get":{"operationId":"InvitationsController_getInvitationsByUser","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvitationEntity"}}}}}},"security":[{"bearer":[]}],"tags":["Invitations"]},"post":{"operationId":"InvitationsController_getInvitationByToken","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetInviteTokenDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationEntity"}}}},"404":{"description":"Invitation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorCodeResponseDto"}}}}},"security":[{"bearer":[]}],"tags":["Invitations"]}},"/invitations/email":{"post":{"operationId":"InvitationsController_inviteByEmail","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteByEmailDto"}}}},"responses":{"201":{"description":""},"400":{"description":"Email is malformed, Failed to create invitation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorCodeResponseDto"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorCodeResponseDto"}}}}},"security":[{"bearer":[]}],"tags":["Invitations"]}},"/invitations/phone":{"post":{"operationId":"InvitationsController_inviteByPhone","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteByPhoneDto"}}}},"responses":{"201":{"description":""},"400":{"description":"Phone number is malformed, Failed to create invitation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorCodeResponseDto"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorCodeResponseDto"}}}}},"security":[{"bearer":[]}],"tags":["Invitations"]}},"/invitations/link":{"post":{"operationId":"InvitationsController_inviteByLink","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteByLinkDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}},"201":{"description":""},"400":{"description":"Failed to create invitation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorCodeResponseDto"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorCodeResponseDto"}}}}},"security":[{"bearer":[]}],"tags":["Invitations"]}},"/invitations/revoke":{"post":{"operationId":"InvitationsController_revokeInviteByToken","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeInviteTokenDto"}}}},"responses":{"201":{"description":""},"400":{"description":"Failed to revoke invite token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorCodeResponseDto"}}}}},"security":[{"bearer":[]}],"tags":["Invitations"]}},"/invitations/accept":{"post":{"operationId":"InvitationsController_acceptInviteByToken","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInviteTokenDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInviteResponseDto"}}}},"400":{"description":"Missing invitation token, Invalid has expired, Invitation already accepted, Invitation revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorCodeResponseDto"}}}},"404":{"description":"Invitation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorCodeResponseDto"}}}},"409":{"description":"User is already a member of the organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorCodeResponseDto"}}}}},"security":[{"bearer":[]}],"tags":["Invitations"]}},"/projects":{"post":{"operationId":"ProjectsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"tags":["Projects"]},"get":{"operationId":"ProjectsController_findAll","parameters":[{"required":false,"name":"query","in":"query","schema":{"additionalProperties":true,"type":"object"}},{"required":false,"name":"limit","in":"query","schema":{"minimum":1,"type":"number"}},{"required":false,"name":"offset","in":"query","schema":{"minimum":0,"type":"number"}},{"required":false,"name":"sort","in":"query","schema":{"type":"array","items":{"type":"object"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["data","_count"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProjectEntity"}},"_count":{"type":"object","required":["result","total"],"properties":{"total":{"type":"number","nullable":true,"description":"The total count of the data"},"result":{"type":"number","description":"The count of the returned data"}}}}}}}}},"security":[{"bearer":[]}],"tags":["Projects"]}},"/projects/bulk":{"post":{"operationId":"ProjectsController_createMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"tags":["Projects"]}},"/projects/{id}":{"get":{"operationId":"ProjectsController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectEntity"}}}}},"security":[{"bearer":[]}],"tags":["Projects"]},"patch":{"operationId":"ProjectsController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Projects"]},"delete":{"operationId":"ProjectsController_remove","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Projects"]}},"/projects/{id}/accounts/connect":{"post":{"operationId":"ProjectsController_connectAccounts","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectAccountsDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Projects"]}},"/projects/{id}/accounts/disconnect":{"post":{"operationId":"ProjectsController_disconnectAccounts","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisconnectAccountsDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"tags":["Projects"]}},"/projects/{id}/accounts/{accountId}":{"patch":{"operationId":"ProjectsController_updateProjectAssignmentRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"accountId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectAssignmentRoleDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Projects"]}},"/sse/events":{"get":{"operationId":"SseController_sse","parameters":[{"name":"scopes","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Sse"]}}},"info":{"title":"Utleggsappen API","description":"\n## Getting Started\n\n1. **Register an Account**  \n   Sign up at [utlegg.app](https://www.utlegg.app).\n\n2. **Generate a Personal Access Token**  \n   Under **Settings** > **Developer** > **Personal Access Tokens**, generate a new token.\n\n3. **Authenticate**\n    Use the generated token to authenticate the API requests. Add the token to the `Authorization` header as a Bearer Token:\n    ```http\n      Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN\n    ```\n    **Note**: A valid user account on [utlegg.app](https://www.utlegg.app) is required to use the API.\n\n\n## Client Generation\nThis swagger document (available as a JSON at `/api-docs-json`) is intended to be used with a client generator.\n\nDepending on the language you are using, you can use the following tools to generate a client:\n- **TypeScript**: [swagger-typescript-api](https://www.npmjs.com/package/swagger-typescript-api)\n- **Python**: [openapi-python-client](https://pypi.org/project/openapi-python-client/)\n- **Java**: [openapi-generator](https://github.com/OpenAPITools/openapi-generator)\n- **C#**: [NSwag](https://github.com/RicoSuter/NSwag)\n\n  ","version":"3.3.6","contact":{}},"tags":[{"name":"Users","description":""},{"name":"Accounts","description":""},{"name":"Organizations","description":""},{"name":"Departments","description":""},{"name":"Reports","description":""},{"name":"Expenses","description":""},{"name":"Categories","description":""},{"name":"Projects","description":""}],"servers":[{"url":"https://api.utlegg.app"}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"},"apiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"DigestRateEnum":{"type":"string","enum":["daily","weekly","monthly"]},"TriggerDigestDto":{"type":"object","properties":{"digestRate":{"$ref":"#/components/schemas/DigestRateEnum"},"apiKey":{"type":"string"}},"required":["digestRate","apiKey"]},"LogoutDto":{"type":"object","properties":{"refreshToken":{"type":"string"},"pushToken":{"type":"string"}}},"RefreshDto":{"type":"object","properties":{"refreshToken":{"type":"string"}},"required":["refreshToken"]},"TokensDto":{"type":"object","properties":{"accessToken":{"type":"string"},"refreshToken":{"type":"string"}},"required":["accessToken","refreshToken"]},"TestUserLoginDto":{"type":"object","properties":{"password":{"type":"string"}},"required":["password"]},"ExchangeCodeSuccessResponseDto":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"accessToken":{"type":"string"},"refreshToken":{"type":"string"}},"required":["status","accessToken","refreshToken"]},"ExchangeCodeUnverifiedResponseDto":{"type":"object","properties":{"status":{"type":"string","enum":["unverified"]},"sessionToken":{"type":"string"}},"required":["status","sessionToken"]},"ExchangeCodeDto":{"type":"object","properties":{"code":{"type":"string"}},"required":["code"]},"RequestPhoneVerificationDto":{"type":"object","properties":{"phoneNumber":{"type":"string"},"sessionToken":{"type":"string"}},"required":["phoneNumber","sessionToken"]},"ConfirmPhoneVerificationDto":{"type":"object","properties":{"code":{"type":"number"},"sessionToken":{"type":"string"}},"required":["code","sessionToken"]},"LoginProvider":{"type":"string","enum":["EMAIL","APPLE","GOOGLE","VIPPS","ENTRA"]},"ReturnProviderDto":{"type":"object","properties":{"provider":{"$ref":"#/components/schemas/LoginProvider"}},"required":["provider"]},"CreatePersonalAccessTokenDto":{"type":"object","properties":{"expiresAt":{"format":"date-time","type":"string"},"name":{"type":"string"}},"required":["expiresAt"]},"AccountBillingType":{"type":"string","enum":["PERIODIC","PER_REPORT"]},"OrganizationTravelRateLevel":{"type":"string","enum":["ALL","TAXABLE","TAX_FREE","NONE"]},"OrganizationDriveRateLevel":{"type":"string","enum":["TAXFREE","TAXABLE","CUSTOM"]},"CategoryVisibility":{"type":"string","enum":["VISIBLE","HIDDEN"]},"RateCriteria":{"type":"string","enum":["PER_DIEM_TAX_ABROAD_COMPENSATION","PER_DIEM_TAX_FROM_6_TO_12_HOURS","PER_DIEM_TAX_OVER_12_HOURS_WITHOUT_ACCOMMODATION","PER_DIEM_TAX_OVER_12_HOURS_WITH_ACCOMMODATION","DRIVE_TAX_MILEAGE","DRIVE_TAX_MILEAGE_WITH_PASSENGER","DRIVE_TAX_MILEAGE_WITH_TRAILER","DRIVE_TAX_MILEAGE_OFFROAD","PER_DIEM_TAXFREE_FROM_6_TO_12_HOURS","PER_DIEM_TAXFREE_OVER_12_HOURS_WITHOUT_ACCOMMODATION","PER_DIEM_TAXFREE_OVERNIGHT_WITH_HOTEL","PER_DIEM_TAXFREE_OVERNIGHT_WITH_COOKING","PER_DIEM_TAXFREE_OVERNIGHT_WITHOUT_COOKING","PER_DIEM_TAXFREE_OVERNIGHT_TRUCKER","PER_DIEM_TAXFREE_NIGHT_DOMESTIC","DRIVE_TAXFREE_MILEAGE","DRIVE_TAXFREE_MILEAGE_WITH_PASSENGER","DRIVE_TAXFREE_MILEAGE_WITH_TRAILER","DRIVE_TAXFREE_MILEAGE_OFFROAD"]},"ReportStatus":{"type":"string","enum":["DRAFT","PENDING","APPROVED","REJECTED","BLOCKED"]},"ReportType":{"type":"string","enum":["TRAVEL","EXPENSE","DRIVE","EXPENSEGROUP"]},"ReportFingerprintSummaryDto":{"type":"object","properties":{"pendingCount":{"type":"number","description":"Number of PENDING or CONFIRMED matches (blocking)"},"dismissedCount":{"type":"number","description":"Number of DISMISSED matches (resolved)"}},"required":["pendingCount","dismissedCount"]},"TravelAccommodationType":{"type":"string","enum":["HOTEL","COOKING_AVAILABLE","COOKING_UNAVAILABLE","NONE"]},"TravelRateLevel":{"type":"string","enum":["NONE","TAX_FREE","TAXABLE","CUSTOM"]},"PaymentMethod":{"type":"string","enum":["CARD","COMPANY_CARD","INVOICE"]},"PaymentCard":{"type":"object","properties":{"id":{"type":"string"},"last4":{"type":"string"},"brand":{"type":"string"},"isDefault":{"type":"boolean"},"description":{"type":"string"},"organizationId":{"type":"string"},"userId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"}},"required":["id","last4","brand","isDefault","description","userId","createdAt","updatedAt"]},"DriveEntity":{"type":"object","properties":{"id":{"type":"string"},"date":{"format":"date-time","type":"string"},"amount":{"format":"int64","type":"integer"},"mileageAmount":{"format":"int64","type":"integer"},"tollAmount":{"format":"int64","type":"integer"},"description":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"fromPlaceId":{"type":"string"},"toPlaceId":{"type":"string"},"distance":{"type":"number"},"returnTrip":{"type":"boolean"},"mileageRate":{"type":"number"},"vehicle":{"type":"string"},"shouldCalculateToll":{"type":"boolean"},"passengerNumber":{"type":"number"},"passengerNames":{"type":"string"},"isOffroad":{"type":"boolean"},"hasTrailer":{"type":"boolean"},"passengerRate":{"type":"number"},"passengerAmount":{"format":"int64","type":"integer"},"trailerRate":{"type":"number"},"trailerAmount":{"format":"int64","type":"integer"},"offroadRate":{"type":"number"},"offroadAmount":{"format":"int64","type":"integer"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"departmentId":{"type":"string"},"projectId":{"type":"string"},"taxCategoryId":{"type":"string"},"taxFreeCategoryId":{"type":"string"},"reportId":{"type":"string"},"department":{"$ref":"#/components/schemas/DepartmentEntity"},"project":{"$ref":"#/components/schemas/ProjectEntity"},"taxCategory":{"$ref":"#/components/schemas/CategoryEntity"},"taxFreeCategory":{"$ref":"#/components/schemas/CategoryEntity"},"report":{"$ref":"#/components/schemas/ReportEntity"}},"required":["id","amount","mileageAmount","tollAmount","distance","returnTrip","mileageRate","shouldCalculateToll","passengerNumber","isOffroad","hasTrailer","passengerRate","passengerAmount","trailerRate","trailerAmount","offroadRate","offroadAmount","createdAt","updatedAt","reportId"]},"InvitationEntity":{"type":"object","properties":{"id":{"type":"string"},"token":{"type":"string"},"email":{"type":"string"},"phoneNumber":{"type":"string"},"role":{"type":"number"},"expiresAt":{"format":"date-time","type":"string"},"invitedCount":{"type":"number"},"redeemedCount":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"createdByUserId":{"type":"string"},"revokedAt":{"format":"date-time","type":"string"},"revokedByUserId":{"type":"string"},"invalidRedemtionCount":{"type":"number"},"organizationId":{"type":"string"},"createdByUser":{"$ref":"#/components/schemas/UserEntity"},"revokedByUser":{"$ref":"#/components/schemas/UserEntity"},"organization":{"$ref":"#/components/schemas/OrganizationEntity"},"departments":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentEntity"}}},"required":["id","token","role","redeemedCount","createdAt","invalidRedemtionCount","organizationId"]},"DepartmentConfigurationEntity":{"type":"object","properties":{"id":{"type":"string"},"shouldOverrideInvoiceBuyer":{"type":"boolean"},"invoiceLegalName":{"type":"string"},"invoiceOrgNumber":{"type":"string"},"invoiceAddress":{"type":"string"},"invoicePostalCode":{"type":"string"},"invoiceRegion":{"type":"string"},"invoicePaymentTerms":{"type":"number"},"deliverByEhf":{"type":"boolean"},"deliverByEmail":{"type":"boolean"},"deliveryEmail":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"departmentId":{"type":"string"},"department":{"$ref":"#/components/schemas/DepartmentEntity"}},"required":["id","shouldOverrideInvoiceBuyer","deliverByEhf","deliverByEmail","createdAt","updatedAt","departmentId"]},"DepartmentAssignmentEntity":{"type":"object","properties":{"accountId":{"type":"string"},"departmentId":{"type":"string"},"role":{"type":"number"},"account":{"$ref":"#/components/schemas/AccountEntity"},"department":{"$ref":"#/components/schemas/DepartmentEntity"}},"required":["accountId","departmentId","role"]},"DepartmentEntity":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"accountingCode":{"type":"string"},"accountingDescription":{"type":"string"},"description":{"type":"string"},"organizationId":{"type":"string"},"isStaff":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"isPublic":{"type":"boolean"},"managedByIntegrationId":{"type":"string"},"organization":{"$ref":"#/components/schemas/OrganizationEntity"},"expenses":{"type":"array","items":{"$ref":"#/components/schemas/ExpenseEntity"}},"drives":{"type":"array","items":{"$ref":"#/components/schemas/DriveEntity"}},"projects":{"type":"array","items":{"$ref":"#/components/schemas/ProjectEntity"}},"reports":{"type":"array","items":{"$ref":"#/components/schemas/ReportEntity"}},"invitations":{"type":"array","items":{"$ref":"#/components/schemas/InvitationEntity"}},"configuration":{"$ref":"#/components/schemas/DepartmentConfigurationEntity"},"departmentAssignments":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentAssignmentEntity"}}},"required":["id","title","organizationId","isStaff","createdAt","updatedAt","isPublic"]},"CaptureDomain":{"type":"string","enum":["EXPENSE","ACCOMMODATION"]},"CaptureSourceType":{"type":"string","enum":["ATTACHMENT","EMAIL_BODY"]},"Capture":{"type":"object","properties":{"id":{"type":"number"},"domain":{"$ref":"#/components/schemas/CaptureDomain"},"sourceType":{"$ref":"#/components/schemas/CaptureSourceType"},"inputText":{"type":"string"},"amount":{"format":"int64","type":"integer"},"amountIncludingVat":{"format":"int64","type":"integer"},"amountExcludingVat":{"format":"int64","type":"integer"},"vatRate":{"type":"number"},"vatAmount":{"format":"int64","type":"integer"},"currency":{"type":"string"},"date":{"format":"date-time","type":"string"},"merchant":{"type":"string"},"description":{"type":"string"},"categoryId":{"type":"string"},"executionTime":{"type":"number"},"modelId":{"type":"string"},"promptProfileId":{"type":"string"},"fallbackMode":{"type":"string"},"fallbackUsed":{"type":"boolean"},"result":{"type":"object","additionalProperties":true,"nullable":true},"assessment":{"type":"object","additionalProperties":true,"nullable":true},"createdAt":{"format":"date-time","type":"string"},"attachmentId":{"type":"string"}},"required":["id","domain","sourceType","inputText","fallbackUsed","createdAt"]},"AttachmentEntity":{"type":"object","properties":{"id":{"type":"string"},"storageKey":{"type":"string"},"expenseId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"ocrText":{"type":"string"},"amountIncludingVat":{"format":"int64","type":"integer"},"amountExcludingVat":{"format":"int64","type":"integer"},"vatRate":{"type":"number"},"vatAmount":{"format":"int64","type":"integer"},"currency":{"type":"string"},"date":{"format":"date-time","type":"string"},"merchant":{"type":"string"},"description":{"type":"string"},"categoryId":{"type":"string"},"sha256":{"type":"string"},"pHash":{"type":"string"},"dHash":{"type":"string"},"embeddingId":{"type":"string"},"captures":{"description":"The most recent Attachment Capture record for this attachment","type":"array","items":{"$ref":"#/components/schemas/Capture"}},"autofill":{"type":"object","description":"Autofill outcome for the attachment upload request, including skip reason when expense fields were not applied."},"url":{"type":"string"},"expense":{"$ref":"#/components/schemas/ExpenseEntity"}},"required":["id","storageKey","expenseId","createdAt","updatedAt"]},"InboxItemStatus":{"type":"string","enum":["RESERVED","CLEARED"]},"InboxEntity":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"userId":{"type":"string"},"user":{"$ref":"#/components/schemas/UserEntity"},"inboxItems":{"type":"array","items":{"$ref":"#/components/schemas/InboxItemEntity"}}},"required":["id","createdAt","updatedAt"]},"InboxItemAttachmentEntity":{"type":"object","properties":{"id":{"type":"string"},"storageKey":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"inboxItemId":{"type":"string"},"url":{"type":"string"},"inboxItem":{"$ref":"#/components/schemas/InboxItemEntity"}},"required":["id","storageKey","createdAt","updatedAt","inboxItemId"]},"InboxItemEntity":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"from":{"type":"string"},"amount":{"format":"int64","type":"integer"},"currency":{"type":"string"},"date":{"format":"date-time","type":"string"},"merchant":{"type":"string"},"description":{"type":"string"},"reservationId":{"type":"string"},"status":{"$ref":"#/components/schemas/InboxItemStatus"},"organizationId":{"type":"string"},"expenseId":{"type":"string"},"inboxId":{"type":"string"},"organization":{"$ref":"#/components/schemas/OrganizationEntity"},"inbox":{"$ref":"#/components/schemas/InboxEntity"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/InboxItemAttachmentEntity"}},"expense":{"$ref":"#/components/schemas/ExpenseEntity"}},"required":["id","createdAt","updatedAt"]},"ExpenseEntity":{"type":"object","properties":{"id":{"type":"string"},"date":{"format":"date-time","type":"string"},"amount":{"format":"int64","type":"integer"},"title":{"type":"string"},"description":{"type":"string"},"departmentId":{"type":"string"},"projectId":{"type":"string"},"reportId":{"type":"string"},"categoryId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"paymentMethod":{"$ref":"#/components/schemas/PaymentMethod"},"paymentCardId":{"type":"string"},"deletedAt":{"format":"date-time","type":"string"},"currency":{"type":"string"},"exchangeRate":{"type":"number"},"amountInBaseCurrency":{"format":"int64","type":"integer"},"vatRate":{"type":"number"},"vatAmount":{"format":"int64","type":"integer"},"isVatDeductible":{"type":"boolean"},"report":{"$ref":"#/components/schemas/ReportEntity"},"paymentCard":{"$ref":"#/components/schemas/PaymentCard"},"department":{"$ref":"#/components/schemas/DepartmentEntity"},"project":{"$ref":"#/components/schemas/ProjectEntity"},"category":{"$ref":"#/components/schemas/CategoryEntity"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentEntity"}},"inboxItems":{"type":"array","items":{"$ref":"#/components/schemas/InboxItemEntity"}}},"required":["id","amount","reportId","createdAt","updatedAt"]},"ProjectEntity":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"accountingCode":{"type":"string"},"accountingDescription":{"type":"string"},"description":{"type":"string"},"isStaff":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"managedByIntegrationId":{"type":"string"},"organizationId":{"type":"string"},"reports":{"type":"array","items":{"$ref":"#/components/schemas/ReportEntity"}},"expenses":{"type":"array","items":{"$ref":"#/components/schemas/ExpenseEntity"}},"drives":{"type":"array","items":{"$ref":"#/components/schemas/DriveEntity"}},"departments":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentEntity"}},"organization":{"$ref":"#/components/schemas/OrganizationEntity"}},"required":["id","title","isStaff","createdAt","updatedAt","organizationId"]},"TravelAccommodationEntity":{"type":"object","properties":{"id":{"type":"string"},"travelId":{"type":"string"},"name":{"type":"string"},"placeId":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"region":{"type":"string"},"checkInAt":{"format":"date-time","type":"string"},"checkOutAt":{"format":"date-time","type":"string"},"type":{"$ref":"#/components/schemas/TravelAccommodationType"},"rateLevel":{"$ref":"#/components/schemas/TravelRateLevel"},"description":{"type":"string"},"amount":{"format":"int64","type":"integer"},"currency":{"type":"string"},"exchangeRate":{"type":"number"},"paymentMethod":{"$ref":"#/components/schemas/PaymentMethod"},"paymentCardId":{"type":"string"},"transactionDate":{"format":"date-time","type":"string"},"breakfastAmount":{"format":"int64","type":"integer"},"projectId":{"type":"string"},"expenseId":{"type":"string"},"breakfastExpenseId":{"type":"string"},"travel":{"$ref":"#/components/schemas/TravelEntity"},"project":{"$ref":"#/components/schemas/ProjectEntity"},"paymentCard":{"$ref":"#/components/schemas/PaymentCard"},"expense":{"$ref":"#/components/schemas/ExpenseEntity"},"breakfastExpense":{"$ref":"#/components/schemas/ExpenseEntity"},"perDiems":{"type":"array","items":{"$ref":"#/components/schemas/PerDiemEntity"}}},"required":["id","travelId","type","rateLevel"]},"TravelEntity":{"type":"object","properties":{"id":{"type":"string"},"fromDateTime":{"format":"date-time","type":"string"},"toDateTime":{"format":"date-time","type":"string"},"fromLocationName":{"type":"string"},"toLocationName":{"type":"string"},"fromLocationPlaceId":{"type":"string"},"toLocationPlaceId":{"type":"string"},"fromLocationCity":{"type":"string"},"toLocationCity":{"type":"string"},"fromLocationCountry":{"type":"string"},"toLocationCountry":{"type":"string"},"fromLocationRegion":{"type":"string"},"toLocationRegion":{"type":"string"},"purpose":{"type":"string"},"typeOfAccommodation":{"$ref":"#/components/schemas/TravelAccommodationType"},"advanceAmount":{"format":"int64","type":"integer"},"rateLevel":{"$ref":"#/components/schemas/TravelRateLevel"},"reportId":{"type":"string"},"report":{"$ref":"#/components/schemas/ReportEntity"},"accommodations":{"type":"array","items":{"$ref":"#/components/schemas/TravelAccommodationEntity"}}},"required":["id","typeOfAccommodation","rateLevel","reportId"]},"InvoiceStatus":{"type":"string","enum":["CREATING","CREATED","SENDING","SENT","DELIVERED","FAILED"]},"InvoiceEntity":{"type":"object","properties":{"id":{"type":"string"},"status":{"$ref":"#/components/schemas/InvoiceStatus"},"deliveredAs":{"type":"string"},"errorDescription":{"type":"string"},"ehfMessageNumber":{"type":"number"},"pdfStorageKey":{"type":"string"},"ehfStorageKey":{"type":"string"},"invoiceNumber":{"type":"number"},"dueDate":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"organizationId":{"type":"string"},"reportId":{"type":"string"},"orgNumber":{"type":"string"},"url":{"type":"string"},"ehfUrl":{"type":"string"},"report":{"$ref":"#/components/schemas/ReportEntity"},"organization":{"$ref":"#/components/schemas/OrganizationEntity"}},"required":["id","status","invoiceNumber","dueDate","createdAt","updatedAt","organizationId","reportId"]},"ReviewResult":{"type":"string","enum":["COMMENT","PENDING","APPROVED","REJECTED","UNAPPROVED","UNREJECTED","OVERRIDDEN","REASSIGNED","WITHDRAWN","INVALIDATED"]},"ReviewEntity":{"type":"object","properties":{"id":{"type":"string"},"reportId":{"type":"string"},"reviewerAccountId":{"type":"string"},"requestedReviewer":{"type":"object","additionalProperties":true,"nullable":true},"dedupeKey":{"type":"string"},"result":{"$ref":"#/components/schemas/ReviewResult"},"comment":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"reviewedAt":{"format":"date-time","type":"string"},"report":{"$ref":"#/components/schemas/ReportEntity"},"reviewer":{"$ref":"#/components/schemas/AccountEntity"}},"required":["id","reportId","result","createdAt","updatedAt"]},"ReportEntity":{"type":"object","properties":{"id":{"type":"string"},"status":{"$ref":"#/components/schemas/ReportStatus"},"type":{"$ref":"#/components/schemas/ReportType"},"amount":{"format":"int64","type":"integer"},"baseCurrency":{"type":"string"},"accountId":{"type":"string"},"organizationId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"shouldReinvoice":{"type":"boolean"},"departmentId":{"type":"string"},"projectId":{"type":"string"},"reviewComment":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"publishedAt":{"format":"date-time","type":"string"},"submittedAt":{"format":"date-time","type":"string"},"fingerprints":{"$ref":"#/components/schemas/ReportFingerprintSummaryDto"},"account":{"$ref":"#/components/schemas/AccountEntity"},"organization":{"$ref":"#/components/schemas/OrganizationEntity"},"travel":{"$ref":"#/components/schemas/TravelEntity"},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceEntity"}},"department":{"$ref":"#/components/schemas/DepartmentEntity"},"project":{"$ref":"#/components/schemas/ProjectEntity"},"reviews":{"type":"array","items":{"$ref":"#/components/schemas/ReviewEntity"}},"expenses":{"type":"array","items":{"$ref":"#/components/schemas/ExpenseEntity"}},"drives":{"type":"array","items":{"$ref":"#/components/schemas/DriveEntity"}},"perDiems":{"type":"array","items":{"$ref":"#/components/schemas/PerDiemEntity"}}},"required":["id","status","type","amount","baseCurrency","accountId","organizationId","createdAt","updatedAt"]},"PerDiemEntity":{"type":"object","properties":{"id":{"type":"string"},"date":{"format":"date-time","type":"string"},"isHalfDay":{"type":"boolean"},"breakfast":{"type":"boolean"},"lunch":{"type":"boolean"},"dinner":{"type":"boolean"},"fullFareAmount":{"format":"int64","type":"integer"},"taxAmount":{"format":"int64","type":"integer"},"taxFreeAmount":{"format":"int64","type":"integer"},"amount":{"format":"int64","type":"integer"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"taxCategoryId":{"type":"string"},"taxFreeCategoryId":{"type":"string"},"rateId":{"type":"string"},"reportId":{"type":"string"},"travelAccommodationId":{"type":"string"},"taxCategory":{"$ref":"#/components/schemas/CategoryEntity"},"taxFreeCategory":{"$ref":"#/components/schemas/CategoryEntity"},"rate":{"$ref":"#/components/schemas/RateEntity"},"report":{"$ref":"#/components/schemas/ReportEntity"}},"required":["id","isHalfDay","breakfast","lunch","dinner","createdAt","updatedAt","reportId"]},"RateAmountEntity":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"number"},"applicableYear":{"type":"number"},"rateId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"rate":{"$ref":"#/components/schemas/RateEntity"}},"required":["id","value","rateId","createdAt","updatedAt"]},"RateEntity":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"criteria":{"$ref":"#/components/schemas/RateCriteria"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"organizationId":{"type":"string"},"organization":{"$ref":"#/components/schemas/OrganizationEntity"},"categories":{"type":"array","items":{"$ref":"#/components/schemas/CategoryEntity"}},"perDiems":{"type":"array","items":{"$ref":"#/components/schemas/PerDiemEntity"}},"amounts":{"type":"array","items":{"$ref":"#/components/schemas/RateAmountEntity"}}},"required":["id","criteria","createdAt","updatedAt"]},"CategoryEntity":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"accountingCode":{"type":"string"},"altAccountingCode":{"type":"string"},"externalId":{"type":"string"},"description":{"type":"string"},"guidance":{"type":"string"},"context":{"type":"string"},"visibility":{"$ref":"#/components/schemas/CategoryVisibility"},"rateId":{"type":"string"},"managedByIntegrationId":{"type":"string"},"organizationId":{"type":"string"},"deletedAt":{"format":"date-time","type":"string"},"accommodationHotelOrganizationId":{"type":"string"},"accommodationCookingOrganizationId":{"type":"string"},"accommodationOtherOrganizationId":{"type":"string"},"accommodationBreakfastOrganizationId":{"type":"string"},"rate":{"$ref":"#/components/schemas/RateEntity"},"organization":{"$ref":"#/components/schemas/OrganizationEntity"},"expenses":{"type":"array","items":{"$ref":"#/components/schemas/ExpenseEntity"}},"driveTaxExpenses":{"type":"array","items":{"$ref":"#/components/schemas/DriveEntity"}},"driveTaxFreeExpenses":{"type":"array","items":{"$ref":"#/components/schemas/DriveEntity"}},"perDiemTaxExpenses":{"type":"array","items":{"$ref":"#/components/schemas/PerDiemEntity"}},"perDiemTaxFreeExpenses":{"type":"array","items":{"$ref":"#/components/schemas/PerDiemEntity"}}},"required":["id","title","visibility","organizationId"]},"PriceInterval":{"type":"string","enum":["MONTH","QUARTER","YEAR"]},"SubscriptionStatus":{"type":"string","enum":["active","canceled","trialing"]},"PriceType":{"type":"string","enum":["FIXED","PER_ACCOUNT","PER_EXPENSE","PER_REPORT","PER_INVOICE"]},"ProductType":{"type":"string","enum":["PLAN","ADD_ON","INTEGRATION"]},"CouponDuration":{"type":"string","enum":["FOREVER","ONCE","REPEATING"]},"CouponCodeEntity":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"active":{"type":"boolean"},"expiresAt":{"format":"date-time","type":"string"},"maxRedemptions":{"type":"number"},"redeemedCount":{"type":"number"},"firstTimeRedemptionOnly":{"type":"boolean"},"couponId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"organizationId":{"type":"string"},"coupon":{"$ref":"#/components/schemas/CouponEntity"},"organization":{"$ref":"#/components/schemas/OrganizationEntity"}},"required":["id","code","active","redeemedCount","firstTimeRedemptionOnly","couponId","createdAt","updatedAt"]},"AppliedCouponEntity":{"type":"object","properties":{"id":{"type":"string"},"couponId":{"type":"string"},"subscriptionItemId":{"type":"string"},"appliedAt":{"format":"date-time","type":"string"},"expiresAt":{"format":"date-time","type":"string"},"lastUsedAt":{"format":"date-time","type":"string"},"coupon":{"$ref":"#/components/schemas/CouponEntity"},"subscriptionItem":{"$ref":"#/components/schemas/SubscriptionItemEntity"}},"required":["id","couponId","subscriptionItemId","appliedAt"]},"CouponEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"duration":{"$ref":"#/components/schemas/CouponDuration"},"durationInMonths":{"type":"number"},"percentOff":{"type":"number"},"expiresAt":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"appliesTo":{"type":"array","items":{"$ref":"#/components/schemas/ProductEntity"}},"couponCodes":{"type":"array","items":{"$ref":"#/components/schemas/CouponCodeEntity"}},"usedBy":{"type":"array","items":{"$ref":"#/components/schemas/AppliedCouponEntity"}}},"required":["id","name","duration","percentOff","createdAt","updatedAt"]},"ProductFeatureEntity":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"productId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"product":{"$ref":"#/components/schemas/ProductEntity"}},"required":["id","title","productId","createdAt","updatedAt"]},"ProductEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string"},"description":{"type":"string"},"isDefault":{"type":"boolean"},"type":{"$ref":"#/components/schemas/ProductType"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceEntity"}},"coupons":{"type":"array","items":{"$ref":"#/components/schemas/CouponEntity"}},"dependsOn":{"type":"array","items":{"$ref":"#/components/schemas/ProductEntity"}},"dependents":{"type":"array","items":{"$ref":"#/components/schemas/ProductEntity"}},"features":{"type":"array","items":{"$ref":"#/components/schemas/ProductFeatureEntity"}}},"required":["id","name","type","createdAt","updatedAt"]},"PriceEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"amount":{"type":"number"},"isDefault":{"type":"boolean"},"recurringInterval":{"$ref":"#/components/schemas/PriceInterval"},"type":{"$ref":"#/components/schemas/PriceType"},"isActive":{"type":"boolean"},"productId":{"type":"string"},"poProductId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"product":{"$ref":"#/components/schemas/ProductEntity"},"subscriptionItems":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionItemEntity"}}},"required":["id","amount","recurringInterval","type","isActive","productId","createdAt","updatedAt"]},"SubscriptionItemEntity":{"type":"object","properties":{"id":{"type":"string"},"subscriptionId":{"type":"string"},"activeFrom":{"format":"date-time","type":"string"},"billableFrom":{"format":"date-time","type":"string"},"activeTo":{"format":"date-time","type":"string"},"priceId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"subscription":{"$ref":"#/components/schemas/SubscriptionEntity"},"price":{"$ref":"#/components/schemas/PriceEntity"},"appliedCoupon":{"$ref":"#/components/schemas/AppliedCouponEntity"},"total":{"type":"number"}},"required":["id","subscriptionId","activeFrom","priceId","createdAt","updatedAt"]},"SubscriptionEntity":{"type":"object","properties":{"id":{"type":"string"},"recurringInterval":{"$ref":"#/components/schemas/PriceInterval"},"subscriptionStatus":{"$ref":"#/components/schemas/SubscriptionStatus"},"trialPeriodEnd":{"format":"date-time","type":"string"},"cancelAtPeriodEnd":{"type":"boolean"},"autoInvoice":{"type":"boolean"},"billingPeriodStart":{"format":"date-time","type":"string"},"billingPeriodEnd":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"canceledAt":{"format":"date-time","type":"string"},"muteNotifications":{"type":"boolean"},"paidSeats":{"type":"number"},"lastSeatTrueUpAt":{"format":"date-time","type":"string"},"organizationId":{"type":"string"},"organization":{"$ref":"#/components/schemas/OrganizationEntity"},"items":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionItemEntity"}}},"required":["id","recurringInterval","cancelAtPeriodEnd","autoInvoice","billingPeriodStart","createdAt","updatedAt","muteNotifications","paidSeats","organizationId"]},"Usage":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"usersCount":{"type":"number"},"reportsCount":{"type":"number"},"expensesCount":{"type":"number"},"drivesCount":{"type":"number"},"travelsCount":{"type":"number"},"categoriesCount":{"type":"number"},"departmentsCount":{"type":"number"},"projectsCount":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","organizationId","usersCount","reportsCount","expensesCount","drivesCount","travelsCount","categoriesCount","departmentsCount","projectsCount","createdAt","updatedAt"]},"UsageStatistic":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"usersCount":{"type":"number"},"expensesCount":{"type":"number"},"drivesCount":{"type":"number"},"travelsCount":{"type":"number"},"categoriesCount":{"type":"number"},"departmentsCount":{"type":"number"},"date":{"format":"date-time","type":"string"}},"required":["id","organizationId","usersCount","expensesCount","drivesCount","travelsCount","categoriesCount","departmentsCount","date"]},"OrganizationMonthlyUsage":{"type":"object","properties":{"organizationId":{"type":"string"},"monthStart":{"format":"date-time","type":"string"},"expensesCount":{"type":"number"},"drivesCount":{"type":"number"},"travelsCount":{"type":"number"},"totalUsageCount":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["organizationId","monthStart","expensesCount","drivesCount","travelsCount","totalUsageCount","createdAt","updatedAt"]},"CommunicationChannel":{"type":"string","enum":["EMAIL","SMS","PUSH","SLACK"]},"CommunicationEntity":{"type":"object","properties":{"id":{"type":"number"},"to":{"type":"string"},"subject":{"type":"string"},"message":{"type":"string"},"userId":{"type":"string"},"accountId":{"type":"string"},"organizationId":{"type":"string"},"dateTime":{"format":"date-time","type":"string"},"channel":{"$ref":"#/components/schemas/CommunicationChannel"},"user":{"$ref":"#/components/schemas/UserEntity"},"account":{"$ref":"#/components/schemas/AccountEntity"},"organization":{"$ref":"#/components/schemas/OrganizationEntity"}},"required":["id","dateTime","channel"]},"OrganizationAuthProvider":{"type":"object","properties":{"id":{"type":"string"},"provider":{"$ref":"#/components/schemas/LoginProvider"},"domain":{"type":"string"},"isEnabled":{"type":"boolean"},"organizationId":{"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","provider","domain","isEnabled","organizationId","updatedAt","createdAt"]},"ServiceAccountScope":{"type":"string","enum":["GLOBAL","ORGANIZATION"]},"ServiceAccessTokenEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tokenHash":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"},"revokedAt":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"},"serviceAccountId":{"type":"string"},"serviceAccount":{"$ref":"#/components/schemas/ServiceAccountEntity"}},"required":["id","tokenHash","createdAt"]},"IntegrationEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"webhookUrl":{"type":"string"},"hmacSecret":{"type":"string"},"events":{"type":"string"},"serviceAccountId":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"integrationProviderId":{"type":"string"},"serviceAccount":{"$ref":"#/components/schemas/ServiceAccountEntity"},"organization":{"$ref":"#/components/schemas/OrganizationEntity"}},"required":["id","webhookUrl","hmacSecret","organizationId","createdAt","updatedAt"]},"ServiceAccountEntity":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"number"},"name":{"type":"string"},"scope":{"$ref":"#/components/schemas/ServiceAccountScope"},"organizationId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"organization":{"$ref":"#/components/schemas/OrganizationEntity"},"serviceAccessTokens":{"type":"array","items":{"$ref":"#/components/schemas/ServiceAccessTokenEntity"}},"integration":{"$ref":"#/components/schemas/IntegrationEntity"}},"required":["id","role","name","scope","createdAt","updatedAt"]},"RateAbroad":{"type":"object","properties":{"id":{"type":"string"},"country":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"applicableYear":{"type":"number"},"organizationId":{"type":"string"}},"required":["id","amount","currency","createdAt","updatedAt"]},"EnterpriseAccountEntity":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"number"},"enterpriseId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"userId":{"type":"string"},"enterprise":{"$ref":"#/components/schemas/EnterpriseEntity"},"user":{"$ref":"#/components/schemas/UserEntity"}},"required":["id","role","enterpriseId","createdAt","updatedAt","userId"]},"EnterpriseProductEntity":{"type":"object","properties":{"id":{"type":"string"},"enterpriseId":{"type":"string"},"productId":{"type":"string"},"activeFrom":{"format":"date-time","type":"string"},"activeTo":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"enterprise":{"$ref":"#/components/schemas/EnterpriseEntity"},"product":{"$ref":"#/components/schemas/ProductEntity"}},"required":["id","enterpriseId","productId","activeFrom","createdAt","updatedAt"]},"EnterpriseEntity":{"type":"object","properties":{"id":{"type":"string"},"legalName":{"type":"string"},"displayName":{"type":"string"},"orgNumber":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"region":{"type":"string"},"contactPerson":{"type":"string"},"contactPersonEmail":{"type":"string"},"invoiceEmail":{"type":"string"},"iconStorageKey":{"type":"string"},"consolidatedBilling":{"type":"boolean"},"billingAnchorDay":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"poCustomerId":{"type":"string"},"iconUrl":{"type":"string"},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationEntity"}},"enterpriseAccounts":{"type":"array","items":{"$ref":"#/components/schemas/EnterpriseAccountEntity"}},"enterpriseProducts":{"type":"array","items":{"$ref":"#/components/schemas/EnterpriseProductEntity"}}},"required":["id","legalName","displayName","consolidatedBilling","billingAnchorDay","createdAt","updatedAt"]},"OrganizationCommentEntity":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"authorId":{"type":"string"},"content":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"author":{"$ref":"#/components/schemas/UserEntity"},"organization":{"$ref":"#/components/schemas/OrganizationEntity"}},"required":["id","organizationId","authorId","content","createdAt","updatedAt"]},"OrganizationEntity":{"type":"object","properties":{"id":{"type":"string"},"legalName":{"type":"string"},"displayName":{"type":"string"},"departmentDisplayNames":{"type":"object","nullable":true,"additionalProperties":{"type":"object","additionalProperties":false,"required":["singular","plural"],"properties":{"singular":{"type":"string"},"plural":{"type":"string"}}},"example":{"nb":{"singular":"Avdeling","plural":"Avdelinger"},"en":{"singular":"Department","plural":"Departments"}},"description":"Localized department labels keyed by locale, with singular and plural forms per locale."},"projectDisplayNames":{"type":"object","nullable":true,"additionalProperties":{"type":"object","additionalProperties":false,"required":["singular","plural"],"properties":{"singular":{"type":"string"},"plural":{"type":"string"}}},"example":{"nb":{"singular":"Avdeling","plural":"Avdelinger"},"en":{"singular":"Department","plural":"Departments"}},"description":"Localized project labels keyed by locale, with singular and plural forms per locale."},"handle":{"type":"string"},"isCategoryRequired":{"type":"boolean"},"isDepartmentRequired":{"type":"boolean"},"isProjectRequired":{"type":"boolean"},"invoiceEmail":{"type":"string"},"orgNumber":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"region":{"type":"string"},"contactPerson":{"type":"string"},"contactPersonEmail":{"type":"string"},"isVatRegistered":{"type":"boolean"},"invoiceAsEhf":{"type":"boolean"},"iconStorageKey":{"type":"string"},"paymentTerms":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"isApprovalFlowActive":{"type":"boolean"},"isTravelActive":{"type":"boolean"},"isDriveActive":{"type":"boolean"},"isPersonal":{"type":"boolean"},"isOnboardingCompleted":{"type":"boolean"},"isAltCategoriesEnabled":{"type":"boolean"},"useFlowBasedReviews":{"type":"boolean"},"poCustomerId":{"type":"string"},"driveTaxFreeAccountingCode":{"type":"string"},"driveTaxableAccountingCode":{"type":"string"},"tollAccountingCode":{"type":"string"},"passengerAccountingCode":{"type":"string"},"perDiemTaxFreeAccountingCode":{"type":"string"},"perDiemTaxFreeNoOvernightAccountingCode":{"type":"string"},"perDiemTaxFreeHotelAccountingCode":{"type":"string"},"perDiemTaxFreeWithCookingAccountingCode":{"type":"string"},"perDiemTaxFreeWithoutCookingAccountingCode":{"type":"string"},"perDiemTaxableAccountingCode":{"type":"string"},"travelRateLevel":{"$ref":"#/components/schemas/OrganizationTravelRateLevel"},"driveRateLevel":{"$ref":"#/components/schemas/OrganizationDriveRateLevel"},"notes":{"type":"string"},"enterpriseId":{"type":"string"},"fingerprintEnabled":{"type":"boolean"},"apiProvisioningEnabled":{"type":"boolean"},"baseCurrency":{"type":"string"},"iconUrl":{"type":"string"},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/AccountEntity"}},"categories":{"type":"array","items":{"$ref":"#/components/schemas/CategoryEntity"}},"departments":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentEntity"}},"reports":{"type":"array","items":{"$ref":"#/components/schemas/ReportEntity"}},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceEntity"}},"subscription":{"$ref":"#/components/schemas/SubscriptionEntity"},"usage":{"$ref":"#/components/schemas/Usage"},"usageStatistics":{"type":"array","items":{"$ref":"#/components/schemas/UsageStatistic"}},"monthlyUsage":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationMonthlyUsage"}},"rates":{"type":"array","items":{"$ref":"#/components/schemas/RateEntity"}},"invitations":{"type":"array","items":{"$ref":"#/components/schemas/InvitationEntity"}},"couponCodes":{"type":"array","items":{"$ref":"#/components/schemas/CouponCodeEntity"}},"communications":{"type":"array","items":{"$ref":"#/components/schemas/CommunicationEntity"}},"projects":{"type":"array","items":{"$ref":"#/components/schemas/ProjectEntity"}},"authProvider":{"$ref":"#/components/schemas/OrganizationAuthProvider"},"serviceAccounts":{"type":"array","items":{"$ref":"#/components/schemas/ServiceAccountEntity"}},"integrations":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationEntity"}},"RateAbroad":{"type":"array","items":{"$ref":"#/components/schemas/RateAbroad"}},"inboxItems":{"type":"array","items":{"$ref":"#/components/schemas/InboxItemEntity"}},"enterprise":{"$ref":"#/components/schemas/EnterpriseEntity"},"comments":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationCommentEntity"}}},"required":["id","displayName","handle","isCategoryRequired","isDepartmentRequired","isProjectRequired","isVatRegistered","invoiceAsEhf","paymentTerms","createdAt","updatedAt","isApprovalFlowActive","isTravelActive","isDriveActive","isPersonal","isOnboardingCompleted","isAltCategoriesEnabled","useFlowBasedReviews","travelRateLevel","driveRateLevel","fingerprintEnabled","apiProvisioningEnabled","baseCurrency"]},"SlackInstallation":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"teamName":{"type":"string"},"userId":{"type":"string"},"botToken":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"accountId":{"type":"string"}},"required":["id","teamId","teamName","userId","botToken","createdAt","updatedAt","accountId"]},"AccountNotificationConfiguration":{"type":"object","properties":{"id":{"type":"string"},"mutedChannels":{"type":"string"},"invitationAccepted":{"type":"string"},"reportSubmitted":{"type":"string"},"reportApproved":{"type":"string"},"reportRejected":{"type":"string"},"subscriptionUpdates":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"accountId":{"type":"string"}},"required":["id","createdAt","updatedAt","accountId"]},"ProjectAssignment":{"type":"object","properties":{"accountId":{"type":"string"},"projectId":{"type":"string"},"organizationId":{"type":"string"},"role":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["accountId","projectId","organizationId","role","createdAt","updatedAt"]},"AccountEntity":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"number"},"digest":{"type":"number"},"isNotificationsEnabled":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"userId":{"type":"string"},"organizationId":{"type":"string"},"isBlocked":{"type":"boolean"},"isStaff":{"type":"boolean"},"deletedAt":{"format":"date-time","type":"string"},"email":{"type":"string"},"accountNumber":{"type":"string"},"employeeNumber":{"type":"string"},"billingType":{"$ref":"#/components/schemas/AccountBillingType"},"user":{"$ref":"#/components/schemas/UserEntity"},"organization":{"$ref":"#/components/schemas/OrganizationEntity"},"slackInstallation":{"$ref":"#/components/schemas/SlackInstallation"},"notificationConfiguration":{"$ref":"#/components/schemas/AccountNotificationConfiguration"},"departmentAssignments":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentAssignmentEntity"}},"projectAssignments":{"type":"array","items":{"$ref":"#/components/schemas/ProjectAssignment"}},"communications":{"type":"array","items":{"$ref":"#/components/schemas/CommunicationEntity"}},"reviews":{"type":"array","items":{"$ref":"#/components/schemas/ReviewEntity"}},"reports":{"type":"array","items":{"$ref":"#/components/schemas/ReportEntity"}},"subordinateAccounts":{"type":"array","items":{"$ref":"#/components/schemas/AccountEntity"}},"managerAccounts":{"type":"array","items":{"$ref":"#/components/schemas/AccountEntity"}}},"required":["id","role","digest","isNotificationsEnabled","createdAt","updatedAt","isStaff"]},"RefreshTokenEntity":{"type":"object","properties":{"id":{"type":"number"},"tokenId":{"type":"string"},"tokenHash":{"type":"string"},"tokenFingerprint":{"type":"string"},"expires":{"format":"date-time","type":"string"},"created":{"format":"date-time","type":"string"},"createdByIp":{"type":"string"},"revoked":{"format":"date-time","type":"string"},"revokedByIp":{"type":"string"},"replacedByTokenId":{"type":"string"},"userId":{"type":"string"},"user":{"$ref":"#/components/schemas/UserEntity"}},"required":["id","tokenId","tokenHash","expires","created","userId"]},"PushPlatform":{"type":"string","enum":["EPS","APNS","FCM"]},"PushTokenEntity":{"type":"object","properties":{"id":{"type":"string"},"token":{"type":"string"},"platform":{"$ref":"#/components/schemas/PushPlatform"},"userId":{"type":"string"},"user":{"$ref":"#/components/schemas/UserEntity"}},"required":["id","platform","userId"]},"LoginMethod":{"type":"object","properties":{"id":{"type":"number"},"provider":{"$ref":"#/components/schemas/LoginProvider"},"externalId":{"type":"string"},"userId":{"type":"string"},"lastUsed":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","provider","externalId","createdAt"]},"PersonalAccessToken":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tokenHash":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"},"revokedAt":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"},"userId":{"type":"string"}},"required":["id","tokenHash","expiresAt","createdAt","userId"]},"UserNotificationConfiguration":{"type":"object","properties":{"id":{"type":"string"},"mutedChannels":{"type":"string"},"inboxItemCreated":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"userId":{"type":"string"}},"required":["id","createdAt","updatedAt","userId"]},"Chat":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"userId":{"type":"string"}},"required":["id","title","createdAt","updatedAt","userId"]},"UserEntity":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"number"},"email":{"type":"string"},"phoneNumber":{"type":"string"},"givenName":{"type":"string"},"familyName":{"type":"string"},"fullName":{"type":"string"},"streetAddress":{"type":"string"},"postalCode":{"type":"string"},"region":{"type":"string"},"birthdate":{"format":"date-time","type":"string"},"accountNumber":{"type":"string"},"profilePictureStorageKey":{"type":"string"},"isNotificationsEnabled":{"type":"boolean"},"isOnboardingCompleted":{"type":"boolean"},"isNewsletterConsentGiven":{"type":"boolean"},"isCustomMarketingConsentGiven":{"type":"boolean"},"isBlocked":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"deletedAt":{"format":"date-time","type":"string"},"profilePictureUrl":{"type":"string"},"intercomWebHash":{"type":"string"},"intercomIosHash":{"type":"string"},"intercomAndroidHash":{"type":"string"},"sessionToken":{"type":"string"},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/AccountEntity"}},"enterpriseAccounts":{"type":"array","items":{"$ref":"#/components/schemas/EnterpriseAccountEntity"}},"refreshTokens":{"type":"array","items":{"$ref":"#/components/schemas/RefreshTokenEntity"}},"pushTokens":{"type":"array","items":{"$ref":"#/components/schemas/PushTokenEntity"}},"paymentCards":{"type":"array","items":{"$ref":"#/components/schemas/PaymentCard"}},"invitationsCreated":{"type":"array","items":{"$ref":"#/components/schemas/InvitationEntity"}},"invitationsRevoked":{"type":"array","items":{"$ref":"#/components/schemas/InvitationEntity"}},"communications":{"type":"array","items":{"$ref":"#/components/schemas/CommunicationEntity"}},"loginMethods":{"type":"array","items":{"$ref":"#/components/schemas/LoginMethod"}},"personalAccessTokens":{"type":"array","items":{"$ref":"#/components/schemas/PersonalAccessToken"}},"notificationConfiguration":{"$ref":"#/components/schemas/UserNotificationConfiguration"},"chats":{"type":"array","items":{"$ref":"#/components/schemas/Chat"}},"inbox":{"$ref":"#/components/schemas/InboxEntity"}},"required":["id","role","isNotificationsEnabled","isOnboardingCompleted","isNewsletterConsentGiven","isCustomMarketingConsentGiven","createdAt","updatedAt"]},"PersonalAccessTokenResponseDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"},"revokedAt":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"},"userId":{"type":"string"},"user":{"$ref":"#/components/schemas/UserEntity"}},"required":["id","expiresAt","createdAt","userId"]},"Address":{"type":"object","properties":{"streetAddress":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}},"CreateUserDto":{"type":"object","properties":{"vippsId":{"type":"string"},"address":{"$ref":"#/components/schemas/Address"},"birthdate":{"format":"date-time","type":"string"},"givenName":{"type":"string"},"familyName":{"type":"string"},"phoneNumber":{"type":"string"},"email":{"type":"string","format":"email"},"accountNumber":{"type":"string"},"isEmailVerified":{"type":"boolean"}}},"UpdateUserNotificationConfigurationDto":{"type":"object","properties":{"mutedChannels":{"type":"string"},"id":{"type":"string"},"inboxItemCreated":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"userId":{"type":"string"}}},"UpdateUserDto":{"type":"object","properties":{"resetTokenExpires":{"format":"date-time","type":"string"},"resetToken":{"type":"string"},"streetAddress":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"isCustomMarketingConsentGiven":{"type":"boolean"},"isNotificationsEnabled":{"type":"boolean"},"isOnboardingCompleted":{"type":"boolean"},"isNewsletterConsentGiven":{"type":"boolean"},"lastLogin":{"format":"date-time","type":"string"},"notificationConfiguration":{"$ref":"#/components/schemas/UpdateUserNotificationConfigurationDto"},"accountNumber":{"type":"string"},"email":{"type":"string","format":"email"},"givenName":{"type":"string"},"familyName":{"type":"string"}}},"UpdateUserRoleDto":{"type":"object","properties":{"role":{"type":"number"}},"required":["role"]},"AddPaymentCardDto":{"type":"object","properties":{"last4":{"type":"string"},"brand":{"type":"string"},"description":{"type":"string"},"isDefault":{"type":"boolean"},"organizationId":{"type":"string","nullable":true}},"required":["last4","brand","description","isDefault","organizationId"]},"UpdatePaymentCardDto":{"type":"object","properties":{"last4":{"type":"string"},"brand":{"type":"string"},"description":{"type":"string"},"isDefault":{"type":"boolean"},"organizationId":{"type":"string","nullable":true}}},"AddPushTokenDto":{"type":"object","properties":{"platform":{"default":"EPS","$ref":"#/components/schemas/PushPlatform"},"token":{"type":"string"}},"required":["platform","token"]},"CreateInboxDto":{"type":"object","properties":{"userId":{"type":"string"},"email":{"type":"string"}},"required":["userId"]},"UpdateInboxDto":{"type":"object","properties":{"email":{"type":"string"}}},"InboxAvailableResponse":{"type":"object","properties":{"available":{"type":"boolean"}},"required":["available"]},"AddInboxItemDto":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/InboxItemStatus"},"storageKey":{"type":"string"},"from":{"type":"string"},"amount":{"type":"integer","format":"int64"},"currency":{"type":"string"},"date":{"format":"date-time","type":"string"},"merchant":{"type":"string"},"description":{"type":"string"},"reservationId":{"type":"string"},"organizationId":{"type":"string"},"expenseId":{"type":"string","nullable":true}}},"UpdateInboxItemDto":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/InboxItemStatus"},"storageKey":{"type":"string"},"from":{"type":"string"},"amount":{"type":"integer","format":"int64"},"currency":{"type":"string"},"date":{"format":"date-time","type":"string"},"merchant":{"type":"string"},"description":{"type":"string"},"reservationId":{"type":"string"},"organizationId":{"type":"string"},"expenseId":{"type":"string","nullable":true}}},"ProvisionDepartmentAssignmentDto":{"type":"object","properties":{"departmentId":{"type":"string","format":"uuid"},"role":{"type":"number"}},"required":["departmentId"]},"ProvisionAccountDto":{"type":"object","properties":{"billingType":{"$ref":"#/components/schemas/AccountBillingType"},"organizationId":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"phoneNumber":{"type":"string"},"givenName":{"type":"string"},"familyName":{"type":"string"},"streetAddress":{"type":"string"},"postalCode":{"type":"string"},"region":{"type":"string"},"birthdate":{"format":"date-time","type":"string"},"userAccountNumber":{"type":"string","description":"Bank account number set on the User (used for payouts)"},"role":{"type":"number"},"accountEmail":{"type":"string","description":"Notification email override on the Account","format":"email"},"accountNumber":{"type":"string"},"employeeNumber":{"type":"string","minLength":0,"maxLength":20,"pattern":"/^[a-zA-Z0-9-]*$/"},"isStaff":{"type":"boolean"},"digest":{"type":"number"},"isNotificationsEnabled":{"type":"boolean"},"managerAccountIds":{"type":"array","items":{"type":"string","format":"uuid"}},"departmentAssignments":{"type":"array","items":{"$ref":"#/components/schemas/ProvisionDepartmentAssignmentDto"}}},"required":["organizationId"]},"CreateAccountDto":{"type":"object","properties":{"billingType":{"$ref":"#/components/schemas/AccountBillingType"},"userId":{"type":"string","description":"Id of user linked to the account"},"organizationId":{"type":"string","description":"Organization id - a UUIDv4 string","example":"6c49b764-fe3b-4c98-8c98-1a1042606253"},"role":{"type":"number","description":"Role\nAdmin = 1, Dashboard access = 2, User = 4"},"email":{"type":"string","format":"email"},"accountNumber":{"type":"string"},"isStaff":{"type":"boolean"},"digest":{"type":"number"},"isNotificationsEnabled":{"type":"boolean"},"employeeNumber":{"type":"string"}},"required":["userId","organizationId"]},"UpdateAccountNotificationConfigurationDto":{"type":"object","properties":{"mutedChannels":{"type":"string"},"invitationAccepted":{"type":"string"},"subscriptionUpdates":{"type":"string","nullable":true},"reportRejected":{"type":"string","nullable":true},"id":{"type":"string"},"reportSubmitted":{"type":"string","nullable":true},"reportApproved":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"accountId":{"type":"string"}}},"UpdateAccountDto":{"type":"object","properties":{"billingType":{"$ref":"#/components/schemas/AccountBillingType"},"notificationConfiguration":{"$ref":"#/components/schemas/UpdateAccountNotificationConfigurationDto"},"userId":{"type":"string","description":"Id of user linked to the account"},"organizationId":{"type":"string","description":"Organization id - a UUIDv4 string","example":"6c49b764-fe3b-4c98-8c98-1a1042606253"},"role":{"type":"number","description":"Role\nAdmin = 1, Dashboard access = 2, User = 4"},"email":{"type":"string","format":"email"},"accountNumber":{"type":"string"},"isStaff":{"type":"boolean"},"digest":{"type":"number"},"isNotificationsEnabled":{"type":"boolean"},"employeeNumber":{"type":"string"}}},"AssignAccountSubordinatesDto":{"type":"object","properties":{"subordinateAccountIds":{"type":"array","items":{"type":"string"}}},"required":["subordinateAccountIds"]},"NotifyAccountDto":{"type":"object","properties":{"accountId":{"type":"string"},"channels":{"minItems":1,"type":"array","items":{"type":"object"}},"subject":{"type":"string"},"text":{"type":"string"}},"required":["accountId","channels","subject","text"]},"Actor":{"type":"string","enum":["SYSTEM","USER","SERVICE_ACCOUNT"]},"EventSubjectType":{"type":"string","enum":["ACCOUNT","CATEGORY","DEPARTMENT","EXPENSE","DRIVE","PER_DIEM","ORGANIZATION","PROJECT","RATE","RATE_ABROAD","REPORT","USER","SUBSCRIPTION","SUBSCRIPTIONTIER","SUBSCRIPTIONTIERPRICE","TRAVEL","ATTACHMENT","ENTERPRISE","FINGERPRINT_MATCH","ENTITLEMENT"]},"EventType":{"type":"string","enum":["CREATED","UPDATED","DELETED"]},"History":{"type":"object","properties":{"authorType":{"$ref":"#/components/schemas/Actor"},"eventSubjectType":{"$ref":"#/components/schemas/EventSubjectType"},"eventType":{"$ref":"#/components/schemas/EventType"},"id":{"type":"number"},"state":{"type":"object"},"eventSubjectId":{"type":"string"},"authorId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["authorType","eventSubjectType","eventType","id","state","eventSubjectId","authorId","createdAt"]},"CaptureRequestCategoryDto":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"context":{"type":"string"},"description":{"type":"string"}},"required":["id","title"]},"CaptureRequestDto":{"type":"object","properties":{"ocr":{"type":"string"},"categories":{"type":"array","items":{"$ref":"#/components/schemas/CaptureRequestCategoryDto"}},"correlationId":{"type":"string"}},"required":["ocr"]},"ExpenseCaptureResponseDto":{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"merchant":{"type":"string"},"amount":{"type":"number"},"amountIncludingVat":{"type":"number"},"amountExcludingVat":{"type":"number"},"vatAmount":{"type":"number"},"vatRate":{"type":"number"},"currency":{"type":"string"},"description":{"type":"string"},"categoryId":{"type":"string"}}},"AccommodationCaptureResponseDto":{"type":"object","properties":{"date":{"type":"string","nullable":true,"format":"date-time"},"merchant":{"type":"string","nullable":true},"amountIncludingVat":{"type":"number","nullable":true},"amountExcludingVat":{"type":"number","nullable":true},"vatAmount":{"type":"number","nullable":true},"vatRate":{"type":"number","nullable":true},"currency":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"breakfastAmount":{"type":"number","nullable":true},"accommodationType":{"type":"string","nullable":true}},"required":["merchant","amountIncludingVat","amountExcludingVat","vatAmount","vatRate","currency","description","breakfastAmount","accommodationType"]},"CaptureResourceType":{"type":"string","enum":["image","pdf"]},"CaptureOcrRequestDto":{"type":"object","properties":{"resourceType":{"$ref":"#/components/schemas/CaptureResourceType"},"resourceUrl":{"type":"string","format":"uri","pattern":"/^https:\\/\\/[a-z0-9-]+\\.s3\\.[a-z0-9-]+\\.amazonaws\\.com\\//"}},"required":["resourceType","resourceUrl"]},"CreateOrganizationDto":{"type":"object","properties":{"departmentDisplayNames":{"type":"object","nullable":true,"additionalProperties":{"type":"object","additionalProperties":false,"required":["singular","plural"],"properties":{"singular":{"type":"string"},"plural":{"type":"string"}}},"example":{"nb":{"singular":"Avdeling","plural":"Avdelinger"},"en":{"singular":"Department","plural":"Departments"}},"description":"Localized department labels keyed by locale, with singular and plural forms per locale."},"projectDisplayNames":{"type":"object","nullable":true,"additionalProperties":{"type":"object","additionalProperties":false,"required":["singular","plural"],"properties":{"singular":{"type":"string"},"plural":{"type":"string"}}},"example":{"nb":{"singular":"Avdeling","plural":"Avdelinger"},"en":{"singular":"Department","plural":"Departments"}},"description":"Localized project labels keyed by locale, with singular and plural forms per locale."},"legalName":{"type":"string"},"displayName":{"type":"string"},"handle":{"type":"string"},"orgNumber":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"region":{"type":"string"},"invoiceEmail":{"type":"string","nullable":true,"format":"email"},"trial":{"type":"boolean"},"cancelAtPeriodEnd":{"type":"boolean"},"isOnboardingCompleted":{"type":"boolean"},"contactPerson":{"type":"string"},"contactPersonEmail":{"type":"string","format":"email"},"poCustomerId":{"type":"string"},"perDiemTaxFreeAccountingCode":{"type":"string"},"perDiemTaxFreeNoOvernightAccountingCode":{"type":"string"},"perDiemTaxFreeHotelAccountingCode":{"type":"string"},"perDiemTaxFreeWithCookingAccountingCode":{"type":"string"},"perDiemTaxFreeWithoutCookingAccountingCode":{"type":"string"},"perDiemTaxableAccountingCode":{"type":"string"},"enterpriseId":{"type":"string"}},"required":["legalName","displayName"]},"UpsertOrganizationAuthProviderDto":{"type":"object","properties":{"provider":{"$ref":"#/components/schemas/LoginProvider"},"domain":{"type":"string","pattern":"/^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/","example":"example.com"},"isEnabled":{"type":"boolean"}},"required":["provider","domain","isEnabled"]},"OrganizationAuthProviderDto":{"type":"object","properties":{"provider":{"$ref":"#/components/schemas/LoginProvider"},"domain":{"type":"string"},"isEnabled":{"type":"boolean"}},"required":["provider","domain","isEnabled"]},"UpdateOrganizationDto":{"type":"object","properties":{"departmentDisplayNames":{"type":"object","nullable":true,"additionalProperties":{"type":"object","additionalProperties":false,"required":["singular","plural"],"properties":{"singular":{"type":"string"},"plural":{"type":"string"}}},"example":{"nb":{"singular":"Avdeling","plural":"Avdelinger"},"en":{"singular":"Department","plural":"Departments"}},"description":"Localized department labels keyed by locale, with singular and plural forms per locale."},"projectDisplayNames":{"type":"object","nullable":true,"additionalProperties":{"type":"object","additionalProperties":false,"required":["singular","plural"],"properties":{"singular":{"type":"string"},"plural":{"type":"string"}}},"example":{"nb":{"singular":"Avdeling","plural":"Avdelinger"},"en":{"singular":"Department","plural":"Departments"}},"description":"Localized project labels keyed by locale, with singular and plural forms per locale."},"travelRateLevel":{"$ref":"#/components/schemas/OrganizationTravelRateLevel"},"driveRateLevel":{"$ref":"#/components/schemas/OrganizationDriveRateLevel"},"invoiceAsEhf":{"type":"boolean"},"invoiceEmail":{"type":"string","nullable":true,"format":"email"},"paymentTerms":{"type":"number"},"contactPerson":{"type":"string"},"contactPersonEmail":{"type":"string","format":"email"},"isTravelActive":{"type":"boolean"},"isDriveActive":{"type":"boolean"},"isApprovalFlowActive":{"type":"boolean"},"isDepartmentRequired":{"type":"boolean"},"isProjectRequired":{"type":"boolean"},"isCategoryRequired":{"type":"boolean"},"notes":{"type":"string"},"driveTaxFreeAccountingCode":{"type":"string"},"driveTaxableAccountingCode":{"type":"string"},"tollAccountingCode":{"type":"string"},"passengerAccountingCode":{"type":"string"},"perDiemTaxFreeAccountingCode":{"type":"string"},"perDiemTaxFreeNoOvernightAccountingCode":{"type":"string"},"perDiemTaxFreeHotelAccountingCode":{"type":"string"},"perDiemTaxFreeWithCookingAccountingCode":{"type":"string"},"perDiemTaxFreeWithoutCookingAccountingCode":{"type":"string"},"perDiemTaxableAccountingCode":{"type":"string"},"useFlowBasedReviews":{"type":"boolean"},"isAltCategoriesEnabled":{"type":"boolean"},"fingerprintEnabled":{"type":"boolean"},"legalName":{"type":"string"},"displayName":{"type":"string"},"handle":{"type":"string"},"orgNumber":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"region":{"type":"string"},"trial":{"type":"boolean"},"cancelAtPeriodEnd":{"type":"boolean"},"isOnboardingCompleted":{"type":"boolean"},"poCustomerId":{"type":"string"},"enterpriseId":{"type":"string"}}},"CreateOrganizationCommentDto":{"type":"object","properties":{"content":{"type":"string"}},"required":["content"]},"UpdateOrganizationCommentDto":{"type":"object","properties":{"content":{"type":"string"}}},"CreateCategoryDto":{"type":"object","properties":{"title":{"type":"string"},"accountingCode":{"type":"string"},"altAccountingCode":{"type":"string"},"externalId":{"type":"string"},"description":{"type":"string"},"guidance":{"type":"string"},"context":{"type":"string"},"visibility":{"type":"object"},"rateId":{"type":"string"},"organizationId":{"type":"string"},"accommodationHotelOrganizationId":{"type":"string"},"accommodationCookingOrganizationId":{"type":"string"},"accommodationOtherOrganizationId":{"type":"string"},"accommodationBreakfastOrganizationId":{"type":"string"}},"required":["title","organizationId"]},"UpdateCategoryDto":{"type":"object","properties":{"title":{"type":"string"},"accountingCode":{"type":"string"},"altAccountingCode":{"type":"string"},"externalId":{"type":"string"},"description":{"type":"string"},"guidance":{"type":"string"},"context":{"type":"string"},"visibility":{"type":"object"},"rateId":{"type":"string"},"organizationId":{"type":"string"},"accommodationHotelOrganizationId":{"type":"string"},"accommodationCookingOrganizationId":{"type":"string"},"accommodationOtherOrganizationId":{"type":"string"},"accommodationBreakfastOrganizationId":{"type":"string"}}},"UpdateSubscriptionDto":{"type":"object","properties":{"recurringInterval":{"$ref":"#/components/schemas/PriceInterval"},"priceUpdates":{"type":"object","description":"Required when changing recurringInterval. Maps subscription item IDs to new price IDs.","example":{"item-uuid-1":"price-uuid-1","item-uuid-2":"price-uuid-2"}},"cancelAtPeriodEnd":{"type":"boolean"},"autoInvoice":{"type":"boolean"},"muteNotifications":{"type":"boolean"},"billingPeriodStart":{"format":"date-time","type":"string"},"billingPeriodEnd":{"format":"date-time","type":"string"},"trialPeriodEnd":{"format":"date-time","type":"string"}}},"CreateSubscriptionDto":{"type":"object","properties":{"recurringInterval":{"$ref":"#/components/schemas/PriceInterval"},"cancelAtPeriodEnd":{"type":"boolean"},"organizationId":{"type":"string"},"billingPeriodStart":{"format":"date-time","type":"string"},"trial":{"type":"boolean"},"includeDefaultProducts":{"type":"boolean"},"muteNotifications":{"type":"boolean","description":"Suppress all billing-related notification emails for this subscription."},"autoInvoice":{"type":"boolean","description":"Whether to generate PowerOffice sales orders for this subscription."}},"required":["organizationId"]},"AddSubscriptionItemDto":{"type":"object","properties":{"priceId":{"type":"string"},"activeFrom":{"format":"date-time","type":"string"},"billableFrom":{"format":"date-time","type":"string"},"activeTo":{"format":"date-time","type":"string"}},"required":["priceId"]},"UpdateSubscriptionItemDto":{"type":"object","properties":{"priceId":{"type":"string"},"activeFrom":{"format":"date-time","type":"string"},"billableFrom":{"format":"date-time","type":"string"},"activeTo":{"format":"date-time","type":"string"}}},"ApplyCouponDto":{"type":"object","properties":{"couponId":{"type":"string"},"couponCodeId":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"}},"required":["couponId"]},"ReactivateSubscriptionDto":{"type":"object","properties":{"couponCode":{"type":"string"}}},"SetTrialDto":{"type":"object","properties":{"days":{"type":"number","minimum":1}},"required":["days"]},"SwitchPlanDto":{"type":"object","properties":{"priceId":{"type":"string"}},"required":["priceId"]},"ForceSwitchPlanDto":{"type":"object","properties":{"priceId":{"type":"string"}},"required":["priceId"]},"CreateCouponDto":{"type":"object","properties":{"duration":{"$ref":"#/components/schemas/CouponDuration"},"appliesTo":{"description":"List of product ids the coupon applies to. If not provided, the coupon applies to all products.","type":"array","items":{"type":"string"}},"name":{"type":"string"},"durationInMonths":{"type":"number"},"percentOff":{"type":"number"},"expiresAt":{"format":"date-time","type":"string"}},"required":["duration","name","percentOff"]},"UpdateCouponDto":{"type":"object","properties":{"duration":{"$ref":"#/components/schemas/CouponDuration"},"appliesTo":{"description":"List of product ids the coupon applies to. If not provided, the coupon applies to all products.","type":"array","items":{"type":"string"}},"name":{"type":"string"},"durationInMonths":{"type":"number"},"percentOff":{"type":"number"},"expiresAt":{"format":"date-time","type":"string"}}},"AddProductsToCouponDto":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}}}},"CreateCouponCodeDto":{"type":"object","properties":{"code":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"},"maxRedemptions":{"type":"number"},"firstTimeRedemptionOnly":{"type":"boolean"},"organizationId":{"type":"string"}},"required":["code"]},"UpdateCouponCodeDto":{"type":"object","properties":{"active":{"type":"boolean"}}},"CreateServiceAccountDto":{"type":"object","properties":{"name":{"type":"string"},"role":{"type":"number"}},"required":["name","role"]},"UpdateServiceAccountDto":{"type":"object","properties":{"name":{"type":"string"},"role":{"type":"number"}},"required":["name","role"]},"CreateServiceAccessTokenDto":{"type":"object","properties":{"expiresAt":{"format":"date-time","type":"string"},"name":{"type":"string"}}},"ServiceAccessTokenResponseDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"},"revokedAt":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"},"serviceAccountId":{"type":"string"},"serviceAccount":{"$ref":"#/components/schemas/ServiceAccountEntity"}},"required":["id","createdAt"]},"CreateEnterpriseDto":{"type":"object","properties":{"displayName":{"type":"string"},"legalName":{"type":"string"},"orgNumber":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"region":{"type":"string"},"invoiceEmail":{"type":"string","format":"email"},"contactPerson":{"type":"string"},"contactPersonEmail":{"type":"string","format":"email"},"poCustomerId":{"type":"string"},"consolidatedBilling":{"type":"boolean"},"billingAnchorDay":{"type":"number","minimum":1,"maximum":28}},"required":["displayName","legalName","orgNumber"]},"UpdateEnterpriseDto":{"type":"object","properties":{"displayName":{"type":"string"},"legalName":{"type":"string"},"orgNumber":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"region":{"type":"string"},"invoiceEmail":{"type":"string","format":"email"},"contactPerson":{"type":"string"},"contactPersonEmail":{"type":"string","format":"email"},"poCustomerId":{"type":"string"},"consolidatedBilling":{"type":"boolean"},"billingAnchorDay":{"type":"number","minimum":1,"maximum":28}}},"CreateOrganizationInEnterpriseDto":{"type":"object","properties":{"departmentDisplayNames":{"type":"object","nullable":true,"additionalProperties":{"type":"object","additionalProperties":false,"required":["singular","plural"],"properties":{"singular":{"type":"string"},"plural":{"type":"string"}}},"example":{"nb":{"singular":"Avdeling","plural":"Avdelinger"},"en":{"singular":"Department","plural":"Departments"}},"description":"Localized department labels keyed by locale, with singular and plural forms per locale."},"projectDisplayNames":{"type":"object","nullable":true,"additionalProperties":{"type":"object","additionalProperties":false,"required":["singular","plural"],"properties":{"singular":{"type":"string"},"plural":{"type":"string"}}},"example":{"nb":{"singular":"Avdeling","plural":"Avdelinger"},"en":{"singular":"Department","plural":"Departments"}},"description":"Localized project labels keyed by locale, with singular and plural forms per locale."},"legalName":{"type":"string"},"displayName":{"type":"string"},"handle":{"type":"string"},"orgNumber":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"region":{"type":"string"},"invoiceEmail":{"type":"string","nullable":true,"format":"email"},"trial":{"type":"boolean"},"cancelAtPeriodEnd":{"type":"boolean"},"isOnboardingCompleted":{"type":"boolean"},"contactPerson":{"type":"string"},"contactPersonEmail":{"type":"string","format":"email"},"poCustomerId":{"type":"string"},"perDiemTaxFreeAccountingCode":{"type":"string"},"perDiemTaxFreeNoOvernightAccountingCode":{"type":"string"},"perDiemTaxFreeHotelAccountingCode":{"type":"string"},"perDiemTaxFreeWithCookingAccountingCode":{"type":"string"},"perDiemTaxFreeWithoutCookingAccountingCode":{"type":"string"},"perDiemTaxableAccountingCode":{"type":"string"}},"required":["legalName","displayName"]},"AddOrganizationToEnterpriseDto":{"type":"object","properties":{"applyEnterpriseCategories":{"type":"boolean"}}},"CreateEnterpriseProductDto":{"type":"object","properties":{"productId":{"type":"string","format":"uuid"},"activeFrom":{"type":"string"},"activeTo":{"type":"string"}},"required":["productId"]},"CreateEnterpriseAccountDto":{"type":"object","properties":{"userId":{"type":"string"},"role":{"type":"number","enum":[0,1]}},"required":["userId","role"]},"UpdateEnterpriseAccountDto":{"type":"object","properties":{"role":{"type":"number","enum":[0,1]}},"required":["role"]},"EnterpriseCategoryEntity":{"type":"object","properties":{"id":{"type":"string"},"enterpriseId":{"type":"string"},"title":{"type":"string"},"accountingCode":{"type":"string"},"altAccountingCode":{"type":"string"},"description":{"type":"string"},"guidance":{"type":"string"},"context":{"type":"string"},"visibility":{"type":"string","enum":["VISIBLE","HIDDEN"]},"rateId":{"type":"string"},"autoPropagate":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"enterprise":{"$ref":"#/components/schemas/EnterpriseEntity"}},"required":["id","enterpriseId","title","visibility","autoPropagate","createdAt","updatedAt"]},"CreateEnterpriseCategoryDto":{"type":"object","properties":{"title":{"type":"string"},"accountingCode":{"type":"string"},"altAccountingCode":{"type":"string"},"description":{"type":"string"},"guidance":{"type":"string"},"context":{"type":"string"},"visibility":{"type":"object"},"rateId":{"type":"string"},"autoPropagate":{"type":"boolean"},"propagateToExisting":{"type":"boolean"},"targetOrganizationIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["title"]},"UpdateEnterpriseCategoryDto":{"type":"object","properties":{"title":{"type":"string"},"accountingCode":{"type":"string"},"altAccountingCode":{"type":"string"},"description":{"type":"string"},"guidance":{"type":"string"},"context":{"type":"string"},"visibility":{"type":"object"},"rateId":{"type":"string"},"autoPropagate":{"type":"boolean"}}},"OrganizationRefDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"EnterpriseUserSearchResultDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationRefDto"}}},"required":["id","name","email","phone","organizations"]},"CreateEnterpriseInvitationDto":{"type":"object","properties":{"email":{"type":"string","format":"email"},"phoneNumber":{"type":"string"},"role":{"type":"number","enum":[0,1]}},"required":["role"]},"EnterpriseInvitationEntity":{"type":"object","properties":{"id":{"type":"string"},"token":{"type":"string"},"email":{"type":"string"},"phoneNumber":{"type":"string"},"role":{"type":"number"},"enterpriseId":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"},"redeemedAt":{"format":"date-time","type":"string"},"revokedAt":{"format":"date-time","type":"string"},"createdByUserId":{"type":"string"},"redeemedByUserId":{"type":"string"},"enterprise":{"$ref":"#/components/schemas/EnterpriseEntity"},"createdByUser":{"$ref":"#/components/schemas/UserEntity"},"redeemedByUser":{"$ref":"#/components/schemas/UserEntity"}},"required":["id","token","role","enterpriseId","createdAt"]},"MultiSearchQueryDto":{"type":"object","properties":{"q":{"type":"string"},"offset":{"type":"number"},"limit":{"type":"number"},"attributesToHighlight":{"type":"array","items":{"type":"string"}},"highlightPreTag":{"type":"string"},"highlightPostTag":{"type":"string"},"attributesToCrop":{"type":"array","items":{"type":"string"}},"cropLength":{"type":"number"},"cropMarker":{"type":"string"},"filter":{"type":"object"},"sort":{"type":"array","items":{"type":"string"}},"facets":{"type":"array","items":{"type":"string"}},"attributesToRetrieve":{"type":"array","items":{"type":"string"}},"showMatchesPosition":{"type":"boolean"},"matchingStrategy":{"type":"object"},"hitsPerPage":{"type":"number"},"page":{"type":"number"},"facetName":{"type":"string"},"facetQuery":{"type":"string"},"vector":{"type":"array","items":{"type":"number"}},"showRankingScore":{"type":"boolean"},"showRankingScoreDetails":{"type":"boolean"},"rankingScoreThreshold":{"type":"number"},"attributesToSearchOn":{"type":"array","items":{"type":"string"}},"hybrid":{"type":"object"},"distinct":{"type":"string"},"retrieveVectors":{"type":"boolean"},"locales":{"type":"array","items":{"type":"string"}},"indexUid":{"type":"string"}},"required":["indexUid"]},"MultiSearchParamsDto":{"type":"object","properties":{"queries":{"type":"array","items":{"$ref":"#/components/schemas/MultiSearchQueryDto"}}},"required":["queries"]},"MultiSearchResponseDto":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object"}}},"required":["results"]},"DepartmentConfigurationDto":{"type":"object","properties":{"invoicePaymentTerms":{"type":"number"},"deliverByEhf":{"type":"boolean"},"deliverByEmail":{"type":"boolean"},"deliveryEmail":{"type":"string"},"shouldOverrideInvoiceBuyer":{"type":"boolean"},"invoiceOrgNumber":{"type":"string"},"invoiceLegalName":{"type":"string"},"invoiceAddress":{"type":"string"},"invoiceRegion":{"type":"string"},"invoicePostalCode":{"type":"string"}}},"CreateDepartmentDto":{"type":"object","properties":{"title":{"type":"string"},"isStaff":{"type":"boolean"},"organizationId":{"type":"string"},"configuration":{"$ref":"#/components/schemas/DepartmentConfigurationDto"},"isPublic":{"type":"boolean"},"managedByIntegrationId":{"type":"string"},"accountingCode":{"type":"string"}},"required":["title","organizationId"]},"UpdateDepartmentDto":{"type":"object","properties":{"title":{"type":"string"},"isStaff":{"type":"boolean"},"organizationId":{"type":"string"},"configuration":{"$ref":"#/components/schemas/DepartmentConfigurationDto"},"isPublic":{"type":"boolean"},"managedByIntegrationId":{"type":"string"},"accountingCode":{"type":"string"}}},"UpdateDepartmentAssignmentRoleDto":{"type":"object","properties":{"role":{"type":"number"}},"required":["role"]},"ConnectOrDisconnectAccountsDto":{"type":"object","properties":{"accountIds":{"type":"array","items":{"type":"string"}}},"required":["accountIds"]},"ConnectProjectsDto":{"type":"object","properties":{"projectIds":{"type":"array","items":{"type":"string"}}},"required":["projectIds"]},"CreateReportDto":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ReportType"},"shouldReinvoice":{"type":"boolean","nullable":true},"title":{"type":"string"},"accountId":{"type":"string"},"description":{"type":"string"},"departmentId":{"type":"string"},"projectId":{"type":"string"}},"required":["accountId"]},"UpdateReportDto":{"type":"object","properties":{"shouldReinvoice":{"type":"boolean","nullable":true},"title":{"type":"string"},"accountId":{"type":"string"},"description":{"type":"string"},"departmentId":{"type":"string"},"projectId":{"type":"string"}}},"ValidationErrorMessageResponseDto":{"type":"object","properties":{"message":{"oneOf":[{"$ref":"#/components/schemas/ValidationErrorMessageDto"},{"type":"string"}]},"errorCode":{"type":"string"},"statusCode":{"type":"number"}},"required":["message","errorCode","statusCode"]},"RequiredFieldsDto":{"type":"object","properties":{"report":{"description":"Missing fields directly on the report itself","example":["departmentId"],"type":"array","items":{"type":"string"}},"travel":{"description":"Missing fields travel","example":["fromDateTime","toDateTime"],"type":"array","items":{"type":"string"}},"expenses":{"type":"object","description":"Missing fields for expenses","example":{"expenseId_123":["currency"],"expenseId_456":["amount","description"]},"additionalProperties":{"type":"array","items":{"type":"string"}}},"drives":{"type":"object","description":"Missing fields for drives","additionalProperties":{"type":"array","items":{"type":"string"}}},"perDiems":{"type":"object","description":"Missing fields for per diems","additionalProperties":{"type":"array","items":{"type":"string"}}},"accommodations":{"type":"object","description":"Missing fields for accommodations (flattened across both expenses for UI display)","example":{"accommodationId_123":["categoryId","date","description"]},"additionalProperties":{"type":"array","items":{"type":"string"}}},"accommodationExpenses":{"type":"object","description":"Detailed missing fields for accommodation expenses (per-expense breakdown for debugging)","example":{"accommodationId_123":{"mainExpense":["categoryId","date"],"breakfastExpense":["description"]}},"additionalProperties":{"$ref":"#/components/schemas/AccommodationExpenseValidationDto"}}}},"ValidationErrorMessageDto":{"type":"object","properties":{"requiredFields":{"$ref":"#/components/schemas/RequiredFieldsDto"}},"required":["requiredFields"]},"AccommodationExpenseValidationDto":{"type":"object","properties":{"mainExpense":{"description":"Missing fields on main accommodation expense","example":["categoryId","date"],"type":"array","items":{"type":"string"}},"breakfastExpense":{"description":"Missing fields on breakfast expense","example":["description","currency"],"type":"array","items":{"type":"string"}}}},"TransferReportDto":{"type":"object","properties":{"targetOrganizationId":{"type":"string","description":"The organization ID to transfer the report to"}},"required":["targetOrganizationId"]},"TransferReportResponseDto":{"type":"object","properties":{"sourceReportId":{"type":"string"},"targetReportId":{"type":"string"}},"required":["sourceReportId","targetReportId"]},"ReviewReportDto":{"type":"object","properties":{"comment":{"type":"string"}}},"AccountRole":{"type":"number","enum":[0,1,2,3],"description":"Account role level required for the review"},"DepartmentRole":{"type":"number","enum":[0,1,2,3],"description":"Department role level required for the review"},"ReassignReviewDto":{"type":"object","properties":{"accountId":{"type":"string","description":"Specific account ID to assign the review to"},"accountRole":{"description":"Account role level required for the review","$ref":"#/components/schemas/AccountRole"},"departmentRole":{"description":"Department role level required for the review","$ref":"#/components/schemas/DepartmentRole"},"managerOfSubmitter":{"type":"boolean","description":"Assign to the manager of the report submitter"},"reason":{"type":"string","description":"Optional reason for reassigning the review"}}},"OverrideReviewDto":{"type":"object","properties":{"reason":{"type":"string","description":"Required reason for overriding this review step","example":"Reviewer is on vacation, urgent report needs processing"}},"required":["reason"]},"CreateTravelDto":{"type":"object","properties":{"typeOfAccommodation":{"$ref":"#/components/schemas/TravelAccommodationType"},"fromDateTime":{"format":"date-time","type":"string"},"toDateTime":{"format":"date-time","type":"string"},"fromLocationName":{"type":"string"},"toLocationName":{"type":"string"},"fromLocationPlaceId":{"type":"string"},"toLocationPlaceId":{"type":"string"},"fromLocationCity":{"type":"string"},"toLocationCity":{"type":"string"},"fromLocationCountry":{"type":"string"},"toLocationCountry":{"type":"string"},"fromLocationRegion":{"type":"string"},"toLocationRegion":{"type":"string"},"purpose":{"type":"string"},"advanceAmount":{"type":"integer","format":"int64"},"disablePerDiemCalculation":{"type":"boolean"}},"required":["typeOfAccommodation","fromDateTime","toDateTime","fromLocationName","toLocationName","fromLocationPlaceId","toLocationPlaceId","fromLocationCity","toLocationCity","fromLocationCountry","toLocationCountry","fromLocationRegion","toLocationRegion","purpose"]},"UpdateTravelDto":{"type":"object","properties":{"typeOfAccommodation":{"$ref":"#/components/schemas/TravelAccommodationType"},"fromDateTime":{"format":"date-time","type":"string"},"toDateTime":{"format":"date-time","type":"string"},"fromLocationName":{"type":"string"},"toLocationName":{"type":"string"},"fromLocationPlaceId":{"type":"string"},"toLocationPlaceId":{"type":"string"},"fromLocationCity":{"type":"string"},"toLocationCity":{"type":"string"},"fromLocationCountry":{"type":"string"},"toLocationCountry":{"type":"string"},"fromLocationRegion":{"type":"string"},"toLocationRegion":{"type":"string"},"purpose":{"type":"string"},"advanceAmount":{"type":"integer","format":"int64"},"disablePerDiemCalculation":{"type":"boolean"}}},"CreateAccommodationDto":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/TravelAccommodationType"},"paymentMethod":{"$ref":"#/components/schemas/PaymentMethod"},"name":{"type":"string"},"placeId":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"region":{"type":"string"},"checkInAt":{"format":"date-time","type":"string"},"checkOutAt":{"format":"date-time","type":"string"},"description":{"type":"string"},"projectId":{"type":"string"},"amount":{"type":"integer","format":"int64"},"currency":{"type":"string"},"exchangeRate":{"type":"number"},"paymentCardId":{"type":"string"},"transactionDate":{"format":"date-time","type":"string"},"breakfastAmount":{"type":"integer","format":"int64"}}},"UpdateAccommodationDto":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/TravelAccommodationType"},"paymentMethod":{"$ref":"#/components/schemas/PaymentMethod"},"name":{"type":"string"},"placeId":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"region":{"type":"string"},"checkInAt":{"format":"date-time","type":"string"},"checkOutAt":{"format":"date-time","type":"string"},"description":{"type":"string"},"projectId":{"type":"string"},"amount":{"type":"integer","format":"int64"},"currency":{"type":"string"},"exchangeRate":{"type":"number"},"paymentCardId":{"type":"string"},"transactionDate":{"format":"date-time","type":"string"},"breakfastAmount":{"type":"integer","format":"int64"}}},"UploadAccommodationAttachmentDto":{"type":"object","properties":{"correlationId":{"type":"string"},"performCapture":{"type":"boolean"},"performScan":{"type":"boolean"},"ocrText":{"type":"string"},"populateExpense":{"type":"string","enum":["none","empty","all"]}}},"CreateInvoiceDto":{"type":"object","properties":{"reportId":{"type":"string"}},"required":["reportId"]},"UpdateInvoiceDto":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/InvoiceStatus"},"deliveredAs":{"type":"string"},"errorDescription":{"type":"string"}}},"RegenerateInvoiceDto":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"GenerateEhfInvoiceDto":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"SendInvoiceDto":{"type":"object","properties":{}},"IntegrationEventType":{"type":"string","enum":["invoice.created","invoice.error","account.joined","report.created","report.submitted","report.processed","report.policies-applied","report.approved","report.rejected","report.stale","report.reviewed","report.published","review.requested","review.completed","review.reassigned","review.overridden","review.invalidated","subscription.billing-period-reset","subscription.billing-period-ending","subscription.trial-period-ending","subscription.trial-started","subscription.canceled","subscription.reactivated","subscription.plan-switched","organization.created","organization.updated","organization.deleted","department.created","department.updated","department.deleted","service-account.created","service-account.updated","service-account.deleted","inbox-item.created","inbox.parse-no-attachments","inbox.parse-error","inbox.parse-no-inbox","invitation.created","invitation.accepted","enterprise-invitation.created","user.created","user.updated","user.deleted","account.test-notification","pat.expiring","subscription-jobs.internal","fingerprint.duplicate-detected","fingerprint.integrity-issue","fingerprint.match-resolved","fingerprint.match-unresolved","attachment.deleted","seat-ratchet.error","entitlement.changed"]},"IntegrationEvent":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/IntegrationEventType"},"data":{"type":"object"}},"required":["type","data"]},"CreateIntegrationFromConfigDto":{"type":"object","properties":{"webhookUrl":{"type":"string"},"serviceAccountId":{"type":"string"}},"required":["webhookUrl"]},"CreateIntegrationFromProviderSetupFieldDto":{"type":"object","properties":{"value":{"type":"object","nullable":false},"key":{"type":"string"}},"required":["value","key"]},"CreateIntegrationFromProviderDto":{"type":"object","properties":{"integrationProviderId":{"type":"string"},"setupFields":{"type":"array","items":{"$ref":"#/components/schemas/CreateIntegrationFromProviderSetupFieldDto"}}},"required":["integrationProviderId","setupFields"]},"CreateIntegrationDto":{"type":"object","properties":{"name":{"type":"string"},"organizationId":{"type":"string"},"events":{"type":"string"},"fromConfig":{"$ref":"#/components/schemas/CreateIntegrationFromConfigDto"},"fromProvider":{"$ref":"#/components/schemas/CreateIntegrationFromProviderDto"}},"required":["organizationId"]},"UpdateIntegrationDto":{"type":"object","properties":{"setupFields":{"type":"array","items":{"$ref":"#/components/schemas/CreateIntegrationFromProviderSetupFieldDto"}},"events":{"type":"array","items":{"type":"string"}}},"required":["setupFields"]},"IntegrationSetupFieldType":{"type":"string","enum":["STRING","NUMBER","BOOLEAN"]},"IntegrationProviderSetupFieldEntity":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"type":{"$ref":"#/components/schemas/IntegrationSetupFieldType"},"label":{"type":"string"},"description":{"type":"string"},"default":{"type":"string"},"isRequired":{"type":"boolean"},"isHidden":{"type":"boolean"},"readOnly":{"type":"boolean"},"group":{"type":"string"},"order":{"type":"number"},"options":{"type":"string"},"integrationProviderId":{"type":"string"}},"required":["id","key","type","label","isRequired","isHidden","readOnly"]},"IntegrationProviderEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"descriptionMarkdown":{"type":"string"},"createdBy":{"type":"string"},"docsUrl":{"type":"string"},"iconUrl":{"type":"string"},"tags":{"type":"string"},"events":{"type":"string"},"serviceAccountRole":{"type":"number"},"isPublic":{"type":"boolean","default":false},"baseUrl":{"type":"string"},"setupContext":{"type":"string"},"deleteContext":{"type":"string"},"setupUsesOnboarding":{"type":"boolean","default":false},"manualSyncEnabled":{"type":"boolean","default":false},"syncContext":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"setupFields":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationProviderSetupFieldEntity"}}},"required":["id","name","serviceAccountRole","isPublic","baseUrl","setupUsesOnboarding","manualSyncEnabled","createdAt","updatedAt"]},"CreateRateDto":{"type":"object","properties":{"criteria":{"$ref":"#/components/schemas/RateCriteria"},"title":{"type":"string"},"amount":{"type":"number","minimum":0},"applicableYear":{"type":"number","minimum":2020,"maximum":2100},"organizationId":{"type":"string"}},"required":["criteria","title","amount"]},"UpdateRateDto":{"type":"object","properties":{"criteria":{"$ref":"#/components/schemas/RateCriteria"},"title":{"type":"string"},"amount":{"type":"number","minimum":0},"applicableYear":{"type":"number","minimum":2020,"maximum":2100}}},"FlowActionType":{"type":"string","enum":["APPROVE","REJECT","REQUIRE_REVIEW","COMMENT","UPDATE","HTTP_REQUEST"]},"FlowActionTypeDto":{"type":"object","properties":{"actionType":{"$ref":"#/components/schemas/FlowActionType"}},"required":["actionType"]},"ConditionOperator":{"type":"string","enum":["EQUALS","NOT_EQUALS","GT","GTE","LT","LTE","IN","NOT_IN","MATCHES","IS_NULL","IS_NOT_NULL","ONE_OF","ALL","NONE"]},"ConditionOperatorDto":{"type":"object","properties":{"operator":{"$ref":"#/components/schemas/ConditionOperator"}},"required":["operator"]},"AccountRoleDto":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/AccountRole"}},"required":["role"]},"DepartmentRoleDto":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/DepartmentRole"}},"required":["role"]},"CollectionCriteriaDto":{"type":"object","properties":{"field":{"type":"string","description":"Relative field path within the array item (e.g., \"amount\", \"type\")","example":"amount"},"operator":{"description":"Scalar operator to apply (cannot be ONE_OF/ALL/NONE)","example":"GT","$ref":"#/components/schemas/ConditionOperator"},"value":{"type":"string","description":"Value to compare against (stored as string)","example":"5000"}},"required":["field","operator","value"]},"ConditionBranchDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this branch","example":"branch-1"},"field":{"type":"string","description":"Dot-notation field path (e.g., \"report.totalAmount\", \"expensesList\")","example":"report.totalAmount"},"operator":{"description":"Operator to apply. Use ONE_OF/ALL/NONE for array fields with collectionCriteria.","example":"GT","$ref":"#/components/schemas/ConditionOperator"},"value":{"type":"string","description":"Value to compare against (stored as string). Empty for collection operators.","example":"10000"},"collectionCriteria":{"description":"Required for ONE_OF/ALL/NONE operators. Defines the condition to check on each array item.","allOf":[{"$ref":"#/components/schemas/CollectionCriteriaDto"}]},"nextNodeId":{"type":"string","description":"Node ID to execute if this branch matches","example":"approve-node-uuid"}},"required":["id","field","operator","value","nextNodeId"]},"ConditionNodeConfigDto":{"type":"object","properties":{"branches":{"description":"Branches to evaluate in order. First matching branch wins.","type":"array","items":{"$ref":"#/components/schemas/ConditionBranchDto"}},"defaultNodeId":{"type":"string","description":"Fallback node ID if no branch matches","example":"reject-node-uuid"}},"required":["branches"]},"FlowTrigger":{"type":"string","enum":["REPORT_SUBMITTED","REPORT_REVIEWED"],"description":"Deprecated: Use triggers array instead"},"FlowNodeType":{"type":"string","enum":["CONDITION","ACTION","WAIT"],"description":"Type of flow node"},"CreateFlowNodeDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"description":"Type of flow node","$ref":"#/components/schemas/FlowNodeType"},"config":{"type":"object","additionalProperties":true,"description":"Node configuration (type-specific)"},"nextNodeId":{"type":"string","nullable":true,"format":"uuid"},"positionX":{"type":"number"},"positionY":{"type":"number"}},"required":["name","type"]},"CreateFlowDto":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"trigger":{"nullable":true,"deprecated":true,"description":"Deprecated: Use triggers array instead","$ref":"#/components/schemas/FlowTrigger"},"triggers":{"description":"Array of triggers that activate this flow","type":"array","items":{"$ref":"#/components/schemas/FlowTrigger"}},"isActive":{"type":"boolean"},"rootNodeId":{"type":"string","nullable":true,"format":"uuid"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/CreateFlowNodeDto"}}},"required":["name"]},"FlowNodeDto":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/FlowNodeType"},"id":{"type":"string"},"name":{"type":"string"},"config":{"type":"object"},"nextNodeId":{"type":"string","nullable":true},"positionX":{"type":"number"},"positionY":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["type","id","name","config","nextNodeId","positionX","positionY","createdAt","updatedAt"]},"FlowDto":{"type":"object","properties":{"triggers":{"type":"array","items":{"$ref":"#/components/schemas/FlowTrigger"}},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"organizationId":{"type":"string"},"rootNodeId":{"type":"string","nullable":true},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/FlowNodeDto"}},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"isPublished":{"type":"boolean","description":"Whether the flow has been published at least once"},"hasDraftChanges":{"type":"boolean","description":"Whether the draft differs from the published version"},"publishedAt":{"format":"date-time","type":"string","nullable":true,"description":"When the flow was last published"}},"required":["triggers","id","name","description","isActive","organizationId","rootNodeId","nodes","createdAt","updatedAt","isPublished","hasDraftChanges","publishedAt"]},"FlowListItemDto":{"type":"object","properties":{"triggers":{"type":"array","items":{"$ref":"#/components/schemas/FlowTrigger"}},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"rootNodeId":{"type":"string","nullable":true},"nodeCount":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"isPublished":{"type":"boolean","description":"Whether the flow has been published at least once"},"hasDraftChanges":{"type":"boolean","description":"Whether the draft differs from the published version"},"publishedAt":{"format":"date-time","type":"string","nullable":true,"description":"When the flow was last published"}},"required":["triggers","id","name","description","isActive","rootNodeId","nodeCount","createdAt","updatedAt","isPublished","hasDraftChanges","publishedAt"]},"TriggerInfoDto":{"type":"object","properties":{"trigger":{"$ref":"#/components/schemas/FlowTrigger"},"name":{"type":"string"},"description":{"type":"string"},"subjectType":{"type":"string"},"isAvailable":{"type":"boolean"}},"required":["trigger","name","description","subjectType","isAvailable"]},"CollectionItemFieldSchemaDto":{"type":"object","properties":{"path":{"type":"string","description":"Relative field path within a collection item (e.g., \"amount\", \"projectId\")"},"type":{"type":"string","enum":["string","number","boolean","date"],"description":"Collection item field data type"},"label":{"type":"string","description":"Human-readable label"},"description":{"type":"string","description":"Optional description"}},"required":["path","type","label"]},"ContextFieldSchemaDto":{"type":"object","properties":{"path":{"type":"string","description":"Dot-notation path (e.g., \"report.amount\")"},"type":{"type":"string","enum":["string","number","boolean","date","array"],"description":"Field data type"},"label":{"type":"string","description":"Human-readable label"},"description":{"type":"string","description":"Optional description"},"usage":{"type":"string","enum":["condition","action","all"],"description":"Usage hint for UI: \"condition\" (for rule filters), \"action\" (for templates), \"all\" (both). Defaults to \"all\"."},"itemFields":{"description":"For array fields only: available item fields for collection operators (ONE_OF/ALL/NONE).","type":"array","items":{"$ref":"#/components/schemas/CollectionItemFieldSchemaDto"}}},"required":["path","type","label"]},"TriggerSchemaDto":{"type":"object","properties":{"trigger":{"$ref":"#/components/schemas/FlowTrigger"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/ContextFieldSchemaDto"}}},"required":["trigger","fields"]},"FlowDomain":{"type":"string","enum":["REPORT"]},"DomainSchemaDto":{"type":"object","properties":{"domain":{"$ref":"#/components/schemas/FlowDomain"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/ContextFieldSchemaDto"}}},"required":["domain","fields"]},"UpdateFlowDto":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"triggers":{"description":"Array of triggers that activate this flow","type":"array","items":{"$ref":"#/components/schemas/FlowTrigger"}},"isActive":{"type":"boolean"},"rootNodeId":{"type":"string","nullable":true,"format":"uuid"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/CreateFlowNodeDto"}}}},"ValidationErrorDto":{"type":"object","properties":{"nodeId":{"type":"string"},"field":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"object"}},"required":["message","severity"]},"FlowValidationResultDto":{"type":"object","properties":{"valid":{"type":"boolean"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorDto"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorDto"}}},"required":["valid","errors","warnings"]},"FlowSimulationRequestDto":{"type":"object","properties":{"data":{"type":"object"},"continueAfterBlocking":{"type":"boolean"}}},"NodeSimulationResultDto":{"type":"object","properties":{"nodeId":{"type":"string"},"nodeName":{"type":"string"},"nodeType":{"type":"string"},"result":{"type":"object","properties":{"type":{"type":"string"},"status":{"type":"string"},"message":{"type":"string"},"blocking":{"type":"boolean"},"terminal":{"type":"boolean"},"branchMatched":{"type":"boolean"},"branchId":{"type":"string","nullable":true},"conditionMet":{"type":"boolean"},"data":{"type":"object"}},"required":[]},"nextNodeId":{"type":"string","nullable":true}},"required":["nodeId","nodeName","nodeType","result","nextNodeId"]},"FlowSimulationResultDto":{"type":"object","properties":{"flowId":{"type":"string"},"flowName":{"type":"string"},"status":{"type":"object"},"nodeResults":{"type":"array","items":{"$ref":"#/components/schemas/NodeSimulationResultDto"}},"blockedAtNodeId":{"type":"string"},"error":{"type":"string"},"cycles":{"type":"array","items":{"required":false,"type":"array","items":{"type":"string"}}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["flowId","flowName","status","nodeResults","cycles"]},"FlowTraceDto":{"type":"object","properties":{"id":{"type":"string"},"flowId":{"type":"string"},"subjectType":{"type":"string"},"subjectId":{"type":"string"},"status":{"type":"string","enum":["RUNNING","COMPLETED","FAILED","BLOCKED"]},"startedAt":{"format":"date-time","type":"string"},"completedAt":{"format":"date-time","type":"string","nullable":true},"error":{"type":"string","nullable":true},"_count":{"type":"object","properties":{"logs":{"type":"number"}}}},"required":["id","flowId","subjectType","subjectId","status","startedAt"]},"NodeSnapshotDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/FlowNodeType"},"config":{"type":"object","additionalProperties":true},"nextNodeId":{"type":"string","nullable":true}},"required":["id","name","type","config"]},"FlowTraceLogDto":{"type":"object","properties":{"id":{"type":"string"},"nodeId":{"type":"string"},"nodeSnapshot":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/NodeSnapshotDto"}]},"enteredAt":{"format":"date-time","type":"string"},"exitedAt":{"format":"date-time","type":"string","nullable":true},"result":{"type":"object","nullable":true,"additionalProperties":true},"error":{"type":"string","nullable":true}},"required":["id","nodeId","enteredAt"]},"FlowTraceWithLogsDto":{"type":"object","properties":{"id":{"type":"string"},"flowId":{"type":"string"},"subjectType":{"type":"string"},"subjectId":{"type":"string"},"status":{"type":"string","enum":["RUNNING","COMPLETED","FAILED","BLOCKED"]},"startedAt":{"format":"date-time","type":"string"},"completedAt":{"format":"date-time","type":"string","nullable":true},"error":{"type":"string","nullable":true},"_count":{"type":"object","properties":{"logs":{"type":"number"}}},"logs":{"type":"array","items":{"$ref":"#/components/schemas/FlowTraceLogDto"}}},"required":["id","flowId","subjectType","subjectId","status","startedAt","logs"]},"FingerprintMatchDto":{"type":"object","properties":{"id":{"type":"string"},"attachmentId":{"type":"string"},"matchedAttachmentId":{"type":"string"},"category":{"type":"string","enum":["DUPLICATE","INTEGRITY"]},"methods":{"type":"array","items":{"type":"string","enum":["EXACT_FILE","PERCEPTUAL","FIELD_MATCH","EMBEDDING","EXIF_ANOMALY","ELA_ANOMALY"]}},"confidence":{"type":"number","minimum":0,"maximum":1},"sameUser":{"type":"boolean"},"sameOrg":{"type":"boolean"},"status":{"type":"string","enum":["PENDING","DISMISSED","CONFIRMED"]},"resolvedByUserId":{"type":"string"},"resolveReason":{"type":"string"},"resolvedAt":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","attachmentId","category","methods","confidence","status","createdAt"]},"FingerprintMatchSummaryDto":{"type":"object","properties":{"count":{"type":"number"},"highestConfidence":{"type":"number"},"hasHighConfidence":{"type":"boolean"},"duplicateCount":{"type":"number"},"integrityCount":{"type":"number"},"matches":{"type":"array","items":{"$ref":"#/components/schemas/FingerprintMatchDto"}}},"required":["count","highestConfidence","hasHighConfidence","duplicateCount","integrityCount","matches"]},"FingerprintMatchDetailsDto":{"type":"object","properties":{"matchId":{"type":"string"},"attachmentId":{"type":"string"},"matchedAttachmentId":{"type":"string"},"methods":{"type":"object","additionalProperties":true}},"required":["matchId","attachmentId","methods"]},"FingerprintResolutionDto":{"type":"object","properties":{"id":{"type":"string"},"fingerprintMatchId":{"type":"string"},"action":{"type":"string","enum":["DISMISSED","CONFIRMED","UNRESOLVED"]},"reason":{"type":"string"},"userId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","fingerprintMatchId","action","userId","createdAt"]},"DismissMatchDto":{"type":"object","properties":{"reason":{"enum":["FALSE_POSITIVE","LEGITIMATE_RESUBMISSION","KNOWN_DUPLICATE","OTHER"],"type":"string","description":"Reason for dismissing the match"},"note":{"type":"string","maxLength":500,"description":"Additional notes about the dismissal"}},"required":["reason"]},"ConfirmMatchDto":{"type":"object","properties":{"note":{"type":"string","maxLength":500,"description":"Additional notes about the confirmation"}}},"CreateExpenseDto":{"type":"object","properties":{"paymentMethod":{"$ref":"#/components/schemas/PaymentMethod"},"reportId":{"type":"string"},"date":{"format":"date-time","type":"string"},"amount":{"type":"integer","format":"int64"},"description":{"type":"string"},"projectId":{"type":"string"},"departmentId":{"type":"string"},"categoryId":{"type":"string"},"paymentCardId":{"type":"string"},"currency":{"type":"string"},"exchangeRate":{"type":"number"},"title":{"type":"string"},"vatRate":{"type":"number"},"vatAmount":{"type":"integer","format":"int64"},"isVatDeductible":{"type":"boolean"}},"required":["reportId"]},"UpdateExpenseDto":{"type":"object","properties":{"paymentMethod":{"$ref":"#/components/schemas/PaymentMethod"},"reportId":{"type":"string"},"date":{"format":"date-time","type":"string"},"amount":{"type":"integer","format":"int64"},"description":{"type":"string"},"projectId":{"type":"string"},"departmentId":{"type":"string"},"categoryId":{"type":"string"},"paymentCardId":{"type":"string"},"currency":{"type":"string"},"exchangeRate":{"type":"number"},"title":{"type":"string"},"vatRate":{"type":"number"},"vatAmount":{"type":"integer","format":"int64"},"isVatDeductible":{"type":"boolean"}}},"RequestDate":{"type":"object","properties":{"year":{"type":"number"},"month":{"type":"number"},"day":{"type":"number"}},"required":["year","month","day"]},"ExchangeRateDto":{"type":"object","properties":{"currency":{"type":"string"},"date":{"$ref":"#/components/schemas/RequestDate"}},"required":["currency","date"]},"UploadAttachmentDto":{"type":"object","properties":{"cashExpenseId":{"type":"string","deprecated":true,"description":"Use expenseId instead."},"correlationId":{"type":"string","deprecated":true,"description":"No longer used. Attachment Captures are now linked automatically."},"performScan":{"type":"string","deprecated":true,"description":"Deprecated alias for performCapture. Use performCapture instead."},"expenseId":{"type":"string","description":"The global LegacyCompatInterceptor handles the cashExpenseId → expenseId\nrename for JSON bodies, but multipart/form-data uploads are parsed by\nmulter AFTER the interceptor runs, so the rename never happens.\nAccept both names at the DTO level via @ValidateIf."},"performCapture":{"type":"string"},"ocrText":{"type":"string"},"populateExpense":{"type":"string","enum":["none","empty","all"]}}},"GetStatisticsDto":{"type":"object","properties":{"from":{"format":"date-time","type":"string","description":"From date"},"to":{"format":"date-time","type":"string","description":"To date"}}},"GetUsageStatisticsDto":{"type":"object","properties":{"from":{"format":"date-time","type":"string","description":"From date"},"to":{"format":"date-time","type":"string","description":"To date"},"organizationId":{"type":"string","description":"Organization id"}},"required":["organizationId"]},"MonthlyUsageStatistic":{"type":"object","properties":{"organizationId":{"type":"string"},"date":{"format":"date-time","type":"string"},"expensesCount":{"type":"number"},"drivesCount":{"type":"number"},"travelsCount":{"type":"number"},"totalUsageCount":{"type":"number"}},"required":["organizationId","date","expensesCount","drivesCount","travelsCount","totalUsageCount"]},"Statistic":{"type":"object","properties":{"reportsDraftCount":{"type":"number"},"reportsPendingCount":{"type":"number"},"reportsApprovedCount":{"type":"number"},"reportsRejectedCount":{"type":"number"},"date":{"format":"date-time","type":"string"},"id":{"type":"string"},"usersCount":{"type":"number"},"expensesCount":{"type":"number"},"travelsCount":{"type":"number"},"drivesCount":{"type":"number"},"organizationsCount":{"type":"number"},"departmentsCount":{"type":"number"},"invoicesCount":{"type":"number"},"accountsCount":{"type":"number"},"freeSubscriptionsCount":{"type":"number"},"paidSubscriptionsCount":{"type":"number"}},"required":["reportsDraftCount","reportsPendingCount","reportsApprovedCount","reportsRejectedCount","date","id","usersCount","expensesCount","travelsCount","drivesCount","organizationsCount","departmentsCount","invoicesCount","accountsCount","freeSubscriptionsCount","paidSubscriptionsCount"]},"PlanBreakdownItem":{"type":"object","properties":{"productName":{"type":"string"},"count":{"type":"number"},"mrr":{"type":"number"}},"required":["productName","count","mrr"]},"EnterpriseBreakdownItem":{"type":"object","properties":{"enterpriseId":{"type":"string"},"enterpriseName":{"type":"string"},"orgCount":{"type":"number"},"mrr":{"type":"number"}},"required":["enterpriseId","enterpriseName","orgCount","mrr"]},"SubscriptionStatistic":{"type":"object","properties":{"customersByPlan":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/PlanBreakdownItem"}},"customersByEnterprise":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/EnterpriseBreakdownItem"}},"mrrBySubscription":{"type":"object","additionalProperties":{"type":"number"},"nullable":true},"id":{"type":"string"},"date":{"format":"date-time","type":"string"},"mrr":{"type":"number"},"arr":{"type":"number"},"fixedMrr":{"type":"number"},"usageMrr":{"type":"number"},"newMrr":{"type":"number"},"expansionMrr":{"type":"number"},"contractionMrr":{"type":"number"},"churnedMrr":{"type":"number"},"activeCount":{"type":"number"},"trialingCount":{"type":"number"},"canceledCount":{"type":"number"},"pendingChurnCount":{"type":"number"},"churnRate":{"type":"number"},"revenueChurnBps":{"type":"number"},"nrr":{"type":"number"},"trialConversionRate":{"type":"number"}},"required":["customersByPlan","customersByEnterprise","mrrBySubscription","id","date","mrr","arr","fixedMrr","usageMrr","newMrr","expansionMrr","contractionMrr","churnedMrr","activeCount","trialingCount","canceledCount","pendingChurnCount","churnRate","revenueChurnBps","nrr","trialConversionRate"]},"CalculateDriveDistanceDto":{"type":"object","properties":{"fromPlaceId":{"type":"string"},"toPlaceId":{"type":"string"}},"required":["fromPlaceId","toPlaceId"]},"DriveDistanceResponseDto":{"type":"object","properties":{"distanceMeters":{"type":"number"}},"required":["distanceMeters"]},"CreateDriveDto":{"type":"object","properties":{"reportId":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"fromPlaceId":{"type":"string"},"toPlaceId":{"type":"string"},"distance":{"type":"number"},"returnTrip":{"type":"boolean"},"tollAmount":{"type":"integer","format":"int64"},"vehicle":{"type":"string"},"shouldCalculateToll":{"type":"boolean"},"departmentId":{"type":"string"},"projectId":{"type":"string"},"date":{"format":"date-time","type":"string"},"description":{"type":"string"},"passengerNumber":{"type":"number"},"passengerNames":{"type":"string"},"isOffroad":{"type":"boolean"},"hasTrailer":{"type":"boolean"}},"required":["reportId"]},"UpdateDriveDto":{"type":"object","properties":{"reportId":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"fromPlaceId":{"type":"string"},"toPlaceId":{"type":"string"},"distance":{"type":"number"},"returnTrip":{"type":"boolean"},"tollAmount":{"type":"integer","format":"int64"},"vehicle":{"type":"string"},"shouldCalculateToll":{"type":"boolean"},"departmentId":{"type":"string"},"projectId":{"type":"string"},"date":{"format":"date-time","type":"string"},"description":{"type":"string"},"passengerNumber":{"type":"number"},"passengerNames":{"type":"string"},"isOffroad":{"type":"boolean"},"hasTrailer":{"type":"boolean"}}},"SetPerDiemDto":{"type":"object","properties":{"breakfast":{"type":"boolean"},"lunch":{"type":"boolean"},"dinner":{"type":"boolean"},"amount":{"type":"integer","format":"int64"}}},"InviteByEmailDto":{"type":"object","properties":{"emails":{"minItems":1,"type":"array","items":{"type":"string"}},"expiresAt":{"format":"date-time","type":"string"},"role":{"type":"number"},"invitedCount":{"type":"number","minimum":1},"organizationId":{"type":"string"},"departmentIds":{"type":"array","items":{"type":"string"}}},"required":["emails","organizationId"]},"ApiErrorCodeResponseDto":{"type":"object","properties":{"errorCode":{"type":"string"},"statusCode":{"oneOf":[{"type":"integer"},{"type":"string"}]},"message":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":true}]},"path":{"type":"string"},"eventId":{"type":"string"}},"required":["errorCode","statusCode","message","path"]},"InviteByPhoneDto":{"type":"object","properties":{"phoneNumbers":{"minItems":1,"type":"array","items":{"type":"string"}},"expiresAt":{"format":"date-time","type":"string"},"role":{"type":"number"},"invitedCount":{"type":"number","minimum":1},"organizationId":{"type":"string"},"departmentIds":{"type":"array","items":{"type":"string"}}},"required":["phoneNumbers","organizationId"]},"InviteByLinkDto":{"type":"object","properties":{"expiresAt":{"format":"date-time","type":"string"},"role":{"type":"number"},"invitedCount":{"type":"number","minimum":1},"organizationId":{"type":"string"},"departmentIds":{"type":"array","items":{"type":"string"}}},"required":["organizationId"]},"RevokeInviteTokenDto":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]},"AcceptInviteTokenDto":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]},"AcceptInviteResponseDto":{"type":"object","properties":{"handle":{"type":"string"}},"required":["handle"]},"GetInviteTokenDto":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]},"TriggerSubscriptionJobsDto":{"type":"object","properties":{"date":{"format":"date-time","type":"string"},"subscriptionIds":{"type":"array","items":{"type":"string"}}},"required":["date","subscriptionIds"]},"AlertType":{"type":"string","enum":["INFO","WARNING","ERROR"]},"AlertSeverity":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"Alert":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/AlertType"},"severity":{"$ref":"#/components/schemas/AlertSeverity"},"id":{"type":"number"},"title":{"type":"string"},"message":{"type":"string"},"url":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"startDateTime":{"format":"date-time","type":"string"},"endDateTime":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"displayInDashboard":{"type":"boolean"},"displayInApp":{"type":"boolean"}},"required":["type","severity","id","title","message","url","isActive","startDateTime","endDateTime","createdAt","updatedAt","displayInDashboard","displayInApp"]},"Object":{"type":"object","properties":{}},"CreateAlertDto":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/AlertType"},"severity":{"$ref":"#/components/schemas/AlertSeverity"},"title":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"},"startDateTime":{"format":"date-time","type":"string"},"endDateTime":{"format":"date-time","type":"string"},"displayInDashboard":{"type":"boolean"},"displayInApp":{"type":"boolean"}},"required":["type","severity","title","message"]},"UpdateAlertDto":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/AlertType"},"severity":{"$ref":"#/components/schemas/AlertSeverity"},"isActive":{"type":"boolean"},"title":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"},"startDateTime":{"format":"date-time","type":"string"},"endDateTime":{"format":"date-time","type":"string"},"displayInDashboard":{"type":"boolean"},"displayInApp":{"type":"boolean"}}},"CreateProjectDto":{"type":"object","properties":{"organizationId":{"type":"string"},"title":{"type":"string"},"accountingCode":{"type":"string"},"accountingDescription":{"type":"string"},"description":{"type":"string"},"isStaff":{"type":"boolean"},"managedByIntegrationId":{"type":"string"}},"required":["organizationId","title"]},"UpdateProjectDto":{"type":"object","properties":{"title":{"type":"string"},"accountingCode":{"type":"string"},"accountingDescription":{"type":"string"},"description":{"type":"string"},"isStaff":{"type":"boolean"},"managedByIntegrationId":{"type":"string"}}},"ConnectAccountsDto":{"type":"object","properties":{"accountIds":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid"}},"role":{"type":"number","enum":[0,1,2,3]}},"required":["accountIds"]},"DisconnectAccountsDto":{"type":"object","properties":{"accountIds":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid"}}},"required":["accountIds"]},"UpdateProjectAssignmentRoleDto":{"type":"object","properties":{"role":{"type":"number","enum":[0,1,2,3]}},"required":["role"]},"BlogPostType":{"type":"string","enum":["GUIDE","NEWS"]},"BlogPostStatus":{"type":"string","enum":["DRAFT","PUBLISHED","ARCHIVED","SCHEDULED"]},"CreateBlogPostDto":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/BlogPostType"},"status":{"$ref":"#/components/schemas/BlogPostStatus"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"imageUrl":{"type":"string"},"category":{"type":"string"},"markdown":{"type":"string"},"scheduledAt":{"format":"date-time","type":"string"}},"required":["type","status","slug","title","description","imageUrl","markdown"]},"BlogPost":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/BlogPostType"},"status":{"$ref":"#/components/schemas/BlogPostStatus"},"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"imageUrl":{"type":"string"},"category":{"type":"string"},"markdown":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"scheduledAt":{"format":"date-time","type":"string"},"publishedAt":{"format":"date-time","type":"string"}},"required":["type","status","id","slug","title","description","imageUrl","category","markdown","createdAt","updatedAt","scheduledAt","publishedAt"]},"UpdateBlogPostDto":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/BlogPostType"},"status":{"$ref":"#/components/schemas/BlogPostStatus"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"imageUrl":{"type":"string"},"category":{"type":"string"},"markdown":{"type":"string"},"scheduledAt":{"format":"date-time","type":"string"}}},"ChatDto":{"type":"object","properties":{"prompt":{"type":"string"},"chatId":{"type":"string"}},"required":["prompt"]},"CreateProductDto":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ProductType"},"name":{"type":"string"},"description":{"type":"string"}},"required":["type","name"]},"AddDependenciesDto":{"type":"object","properties":{"dependencyIds":{"type":"array","items":{"type":"string"}}},"required":["dependencyIds"]},"CreatePriceDto":{"type":"object","properties":{"recurringInterval":{"$ref":"#/components/schemas/PriceInterval"},"type":{"$ref":"#/components/schemas/PriceType"},"name":{"type":"string"},"amount":{"type":"number"},"description":{"type":"string"},"poProductId":{"type":"string"}},"required":["recurringInterval","type","name","amount"]},"UpdatePriceDto":{"type":"object","properties":{"recurringInterval":{"$ref":"#/components/schemas/PriceInterval"},"type":{"$ref":"#/components/schemas/PriceType"},"name":{"type":"string"},"amount":{"type":"number"},"description":{"type":"string"},"poProductId":{"type":"string"}}},"UiEventResourceType":{"type":"string","enum":["report","organization","department","expense","user","account","invoice"]},"UiEventType":{"type":"string","enum":["created","updated","deleted","submitted","approved","rejected","reviewed","published","stale"]},"ClientUiEvent":{"type":"object","properties":{"resourceType":{"$ref":"#/components/schemas/UiEventResourceType"},"eventType":{"$ref":"#/components/schemas/UiEventType"},"resourceId":{"type":"string"},"timestamp":{"type":"number"},"id":{"type":"string"}},"required":["resourceType","eventType","resourceId","timestamp"]},"UiEventScope":{"type":"object","properties":{"resourceType":{"$ref":"#/components/schemas/UiEventResourceType"},"resourceId":{"type":"string"},"organizationId":{"type":"string"},"eventType":{"$ref":"#/components/schemas/UiEventType"}}}}}}