{"openapi":"3.1.0","paths":{"/v1/health":{"get":{"operationId":"HealthController_getHealth","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponseDto"}}}}},"summary":"Check the health of the API","tags":["Health"]}},"/v1/profile":{"get":{"description":"Get profile information for the currently authenticated user","operationId":"ProfileController_get","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileEntity"}}}}},"security":[{"cookie":[]}],"summary":"Get current user profile","tags":["Profile"]},"patch":{"description":"Update profile information for the currently authenticated user","operationId":"ProfileController_update","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileEntity"}}}}},"security":[{"cookie":[]}],"summary":"Update current user profile","tags":["Profile"]}},"/v1/profile/theme":{"patch":{"description":"Saves the Light, Dark or System choice so it follows the user to any browser.","operationId":"ProfileController_updateThemePreference","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateThemePreferenceDto"}}}},"responses":{"204":{"description":""}},"security":[{"cookie":[]}],"summary":"Set the current user theme","tags":["Profile"]}},"/v1/profile/onboarding-tour":{"put":{"description":"The first outcome saved stays; later calls change nothing. Once set, the tour no longer starts automatically on any device.","operationId":"ProfileController_updateOnboardingTour","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOnboardingTourDto"}}}},"responses":{"204":{"description":""}},"security":[{"cookie":[]}],"summary":"Save how the client portal tour ended for the current user","tags":["Profile"]}},"/v1/profile/email-change":{"post":{"description":"Sends a verification email to the new address. Email is updated only after confirmation.","operationId":"ProfileController_requestEmailChange","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestEmailChangeDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingEmailChangeEntity"}}}}},"security":[{"cookie":[]}],"summary":"Request email change for current user","tags":["Profile"]},"delete":{"operationId":"ProfileController_cancelEmailChange","parameters":[],"responses":{"204":{"description":""}},"security":[{"cookie":[]}],"summary":"Cancel a pending email change","tags":["Profile"]}},"/v1/profile/email-change/confirm":{"post":{"description":"Authenticated flow. Submit the 6-digit verification code that was sent to the current email address.","operationId":"ProfileController_confirmEmailChange","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmEmailChangeDto"}}}},"responses":{"200":{"description":""}},"security":[{"cookie":[]}],"summary":"Confirm a pending email change with the code from the current email","tags":["Profile"]}},"/v1/profile/phone-change":{"post":{"description":"Checks the current password and sends an SMS verification code to the new number. The phone number is updated only after confirmation.","operationId":"ProfileController_requestPhoneChange","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestPhoneChangeDto"}}}},"responses":{"204":{"description":""}},"security":[{"cookie":[]}],"summary":"Request a two-factor phone number change for current user","tags":["Profile"]},"delete":{"operationId":"ProfileController_cancelPhoneChange","parameters":[],"responses":{"204":{"description":""}},"security":[{"cookie":[]}],"summary":"Cancel a pending phone number change","tags":["Profile"]}},"/v1/profile/phone-change/resend":{"post":{"operationId":"ProfileController_resendPhoneChangeCode","parameters":[],"responses":{"204":{"description":""}},"security":[{"cookie":[]}],"summary":"Resend the SMS code for a pending phone number change","tags":["Profile"]}},"/v1/profile/phone-change/confirm":{"post":{"description":"Submit the verification code that was sent by SMS to the new phone number.","operationId":"ProfileController_confirmPhoneChange","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmPhoneChangeDto"}}}},"responses":{"200":{"description":""}},"security":[{"cookie":[]}],"summary":"Confirm a pending phone number change with the SMS code","tags":["Profile"]}},"/v1/system-logs":{"get":{"operationId":"SystemLogsController_findMany","parameters":[{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"sortOrder","required":false,"in":"query","description":"Defaults to `desc`","schema":{"$ref":"#/components/schemas/SortOrder"}},{"name":"search","required":false,"in":"query","description":"Matches the actor name, the log description, and the users and organizations it names — as the log's actor or organization, or as what was done to them. Case-insensitive; name matches tolerate typos. Ignored below SYSTEM_LOGS_SEARCH_MIN_LENGTH (@deca/shared/constants), or when every term is a single character — both return the list unfiltered rather than an error. Single-character terms never count; shorter terms drop out when one reaches that length; only the first 12 terms are used.","schema":{"maxLength":255,"type":"string"}},{"name":"actorTypes","required":false,"in":"query","schema":{"type":"array","items":{"type":"string","enum":["admin","customer","system"]}}},{"name":"organizationIds","required":false,"in":"query","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"userIds","required":false,"in":"query","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"startDate","required":false,"in":"query","schema":{"type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/SystemLogEntity"}}}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List system logs","tags":["System Logs"]}},"/v1/users":{"post":{"operationId":"UsersController_createAndInvite","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserDto"}}}},"responses":{"201":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Create and invite user","tags":["Users"]},"get":{"operationId":"UsersController_getMany","parameters":[{"name":"search","required":false,"in":"query","description":"Search by user name or email","schema":{"type":"string"}},{"name":"ids","required":false,"in":"query","description":"Only the users with these ids.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"userTypes","required":false,"in":"query","description":"Filter by user type","schema":{"type":"array","items":{"type":"string","enum":["super_admin","admin","client","cpa_external"]}}},{"name":"statuses","required":false,"in":"query","description":"Filter by user status","schema":{"type":"array","items":{"type":"string","enum":["invited","active","suspended"]}}},{"name":"orgIds","required":false,"in":"query","description":"Only the members of any of these organizations the caller can read.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"permissionTemplateIds","required":false,"in":"query","description":"Only the users following any of these templates, not those with an own permission list. Combined with `permissionKinds` by OR.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"permissionKinds","required":false,"in":"query","description":"Only the users with an own permission list (`custom`) or the super admins. Combined with `permissionTemplateIds` by OR.","schema":{"type":"array","items":{"$ref":"#/components/schemas/UserPermissionKind"}}},{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/UserEntity"}}}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get many users with pagination","tags":["Users"]}},"/v1/users/bulk/status":{"post":{"description":"Each user goes through the checks of `PATCH /users/:id/status`; one that fails them, the caller, or one already in that state is skipped with a reason.","operationId":"UsersController_bulkUpdateStatus","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateUserStatusDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUserActionResultDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Suspend or restore users in bulk","tags":["Users"]}},"/v1/users/bulk/resend-invitation":{"post":{"description":"Only Invited users are re-invited, each through the checks of `POST /users/:id/resend-invitation`; the rest are skipped with a reason.","operationId":"UsersController_bulkResendInvitation","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUserIdsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUserActionResultDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Resend the invitation to users in bulk","tags":["Users"]}},"/v1/users/{id}/resend-invitation":{"post":{"operationId":"UsersController_resendInvitation","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Resend invitation to user","tags":["Users"]}},"/v1/users/matching":{"get":{"operationId":"UsersController_getMatching","parameters":[{"name":"search","required":false,"in":"query","description":"Search by user name or email","schema":{"type":"string"}},{"name":"ids","required":false,"in":"query","description":"Only the users with these ids.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"userTypes","required":false,"in":"query","description":"Filter by user type","schema":{"type":"array","items":{"type":"string","enum":["super_admin","admin","client","cpa_external"]}}},{"name":"statuses","required":false,"in":"query","description":"Filter by user status","schema":{"type":"array","items":{"type":"string","enum":["invited","active","suspended"]}}},{"name":"orgIds","required":false,"in":"query","description":"Only the members of any of these organizations the caller can read.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"permissionTemplateIds","required":false,"in":"query","description":"Only the users following any of these templates, not those with an own permission list. Combined with `permissionKinds` by OR.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"permissionKinds","required":false,"in":"query","description":"Only the users with an own permission list (`custom`) or the super admins. Combined with `permissionTemplateIds` by OR.","schema":{"type":"array","items":{"$ref":"#/components/schemas/UserPermissionKind"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchingUsersDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get every user the list filters match, for a bulk selection","tags":["Users"]}},"/v1/users/{id}":{"get":{"operationId":"UsersController_getOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get user by ID","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":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update user","tags":["Users"]},"delete":{"operationId":"UsersController_delete","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete user","tags":["Users"]}},"/v1/users/{id}/email-change":{"post":{"description":"Sends a verification email to the new address. The target user must confirm the change before it takes effect.","operationId":"UsersController_requestEmailChange","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestEmailChangeDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingEmailChangeEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Request an email change for another user","tags":["Users"]}},"/v1/users/{id}/status":{"patch":{"description":"Refuses the caller (403).","operationId":"UsersController_updateStatus","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserStatusDto"}}}},"responses":{"200":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"The user is already in that state, e.g. changed by someone else since the list loaded"}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Suspend or restore a user","tags":["Users"]}},"/v1/users/{id}/reset-two-factor":{"post":{"operationId":"UsersController_resetTwoFactor","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"The user has no 2FA, e.g. reset by someone else since the list loaded"}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Reset two-factor authentication for user","tags":["Users"]}},"/v1/users/{id}/head-of-analytics":{"patch":{"operationId":"UsersController_toggleHeadOfAnalytics","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleHeadOfAnalyticsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Grant or revoke Head of Analytics permission (super admin only)","tags":["Users"]}},"/v1/files/upload":{"post":{"operationId":"FilesController_upload","parameters":[{"name":"customPath","required":false,"in":"query","description":"Optional storage path","schema":{"example":"company-logos","type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadResultEntity"}}}},"400":{"description":"Invalid file"}},"summary":"Upload file to GCP Storage","tags":["Files"]}},"/v1/files/{fileId}":{"get":{"operationId":"FilesController_getFile","parameters":[{"name":"fileId","required":true,"in":"path","description":"File ID from upload response","schema":{"type":"string"}}],"responses":{"200":{"description":"File retrieved"},"404":{"description":"File not found"}},"summary":"Retrieve file from GCP Storage","tags":["Files"]}},"/v1/files/{fileId}/metadata":{"get":{"operationId":"FilesController_getFileMetadata","parameters":[{"name":"fileId","required":true,"in":"path","description":"File ID from upload response","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadResultEntity"}}}},"404":{"description":"File not found"}},"summary":"Get file metadata","tags":["Files"]}},"/v1/permission-templates/available-permissions":{"get":{"description":"Returns all available permission enum values. Use this endpoint to build permission selection UIs for templates and custom user permissions.","operationId":"PermissionTemplatesController_getAvailablePermissions","parameters":[],"responses":{"200":{"description":"Available permission enum values","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailablePermissionsDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get all available permissions","tags":["Permission Templates"]}},"/v1/permission-templates":{"post":{"operationId":"PermissionTemplatesController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePermissionTemplateDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionTemplateEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Create a new permission template","tags":["Permission Templates"]},"get":{"operationId":"PermissionTemplatesController_findAll","parameters":[{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"sortOrder","required":false,"in":"query","description":"Defaults to `desc`","schema":{"$ref":"#/components/schemas/SortOrder"}},{"name":"search","required":false,"in":"query","description":"Search by template name","schema":{"type":"string"}},{"name":"userType","required":false,"in":"query","description":"Filter by user type (admin or client)","schema":{"type":"string","enum":["admin","client"]}},{"name":"sortBy","required":false,"in":"query","description":"Defaults to `createdAt`; a `userType` sort keeps the newest first within each type","schema":{"$ref":"#/components/schemas/PermissionTemplateSortField"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PermissionTemplateEntity"}}}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get all permission templates with pagination","tags":["Permission Templates"]}},"/v1/permission-templates/{id}":{"get":{"operationId":"PermissionTemplatesController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionTemplateEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get a permission template by ID","tags":["Permission Templates"]},"patch":{"description":"Updates the template and automatically updates permissions for all users assigned to this template (unless they have custom permissions)","operationId":"PermissionTemplatesController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePermissionTemplateDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionTemplateEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update a permission template","tags":["Permission Templates"]},"delete":{"description":"Refused while users follow it; assign them another first.","operationId":"PermissionTemplatesController_delete","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"Users still follow the template"}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete a permission template","tags":["Permission Templates"]}},"/v1/permission-templates/{id}/assign-users":{"post":{"description":"Removes any custom permissions from the users and assigns them to the template. Needs `update User`, as a template change through `PATCH /users/:id` does. A user of another type, one the caller may not manage, or one the caller cannot grant the template to is skipped with a reason.","operationId":"PermissionTemplatesController_assignUsers","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUserIdsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUserActionResultDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Assign users to a permission template","tags":["Permission Templates"]}},"/v1/users/{userId}/custom-permissions":{"post":{"description":"Detaches user from template and creates custom permission set","operationId":"PermissionsController_setCustomPermissions","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCustomPermissionsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPermissionEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Set custom permissions for a user","tags":["User Permissions"]},"patch":{"description":"Updates existing custom permissions (user must already have custom permissions)","operationId":"PermissionsController_updateCustomPermissions","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCustomPermissionsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPermissionEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Update custom permissions for a user","tags":["User Permissions"]},"get":{"operationId":"PermissionsController_getCustomPermissions","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPermissionEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Get custom permissions for a user","tags":["User Permissions"]},"delete":{"description":"User will revert to template permissions if they have one assigned, otherwise no permissions","operationId":"PermissionsController_removeCustomPermissions","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Remove custom permissions from a user","tags":["User Permissions"]}},"/v1/email-change/verify-link":{"post":{"description":"Public endpoint. Returns 200 if the link can still be used to confirm the change; 404 if the pending change is missing, expired, or the token is invalid.","operationId":"EmailChangeController_verifyLink","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailChangeLinkDto"}}}},"responses":{"200":{"description":""}},"summary":"Verify a pending email change link is still valid","tags":["Email Change"]}},"/v1/email-change/confirm-link":{"post":{"description":"Public endpoint. The token in the URL was sent to the new email; the code was sent to the current email. Both are required.","operationId":"EmailChangeController_confirmLink","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmEmailChangeLinkDto"}}}},"responses":{"200":{"description":""}},"summary":"Confirm an email change via the link sent to the new email","tags":["Email Change"]}},"/v1/email-change/cancel-link":{"post":{"description":"Public endpoint. The token in the URL is the proof of possession of the current email address — it was sent there when the change was requested.","operationId":"EmailChangeController_cancelLink","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelEmailChangeLinkDto"}}}},"responses":{"200":{"description":""}},"summary":"Cancel a pending email change via the link sent to the old email","tags":["Email Change"]}},"/v1/notifications":{"get":{"description":"Newest first. A notification whose source was deleted or is no longer open to the caller comes back with `isAvailable: false` and no snapshot.","operationId":"NotificationsController_findMany","parameters":[{"name":"orgId","required":false,"in":"query","description":"Client portal only: the organization shown in the header. Required for client users, ignored for admins","schema":{"type":"string"}},{"name":"types","required":false,"in":"query","description":"Admin portal only; ignored for client users","schema":{"type":"array","items":{"$ref":"#/components/schemas/NotificationType"}}},{"name":"size","required":false,"in":"query","schema":{"minimum":1,"maximum":50,"default":20,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"status","required":false,"in":"query","description":"Defaults to all","schema":{"$ref":"#/components/schemas/NotificationStatusFilter"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationsResponseDto"}}}}},"summary":"List my notifications","tags":["Notifications"]}},"/v1/notifications/counts":{"get":{"description":"Unread and total counts under the same type filter and organization as the list.","operationId":"NotificationsController_getCounts","parameters":[{"name":"orgId","required":false,"in":"query","description":"Client portal only: the organization shown in the header. Required for client users, ignored for admins","schema":{"type":"string"}},{"name":"types","required":false,"in":"query","description":"Admin portal only; ignored for client users","schema":{"type":"array","items":{"$ref":"#/components/schemas/NotificationType"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationCountsDto"}}}}},"summary":"Count my notifications","tags":["Notifications"]}},"/v1/notifications/summary":{"get":{"description":"The unread count with no type filter, and for client users the unread count per organization they can still open. The stream sends the same shape.","operationId":"NotificationsController_getSummary","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSummaryDto"}}}}},"summary":"Get my unread summary","tags":["Notifications"]}},"/v1/notifications/{id}/read-state":{"patch":{"operationId":"NotificationsController_setReadState","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationReadStateDto"}}}},"responses":{"204":{"description":""}},"summary":"Mark a notification read or unread","tags":["Notifications"]}},"/v1/notifications/read-all":{"post":{"description":"Ignores any type filter. For client users, covers the given organization only.","operationId":"NotificationsController_markAllRead","parameters":[{"name":"orgId","required":false,"in":"query","description":"Client portal only: the organization shown in the header. Required for client users, ignored for admins","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"summary":"Mark all my notifications read","tags":["Notifications"]}},"/v1/main-sales-manager":{"get":{"description":"Returns the main sales manager (by MAIN_SALES_MANAGER_EMAIL env) and whether their Google Workspace is connected. Returns null if the env is not set or no matching user exists.","operationId":"MainSalesManagerController_getMainSalesManager","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MainSalesManagerEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Resolve the configured main sales manager","tags":["Main Sales Manager"]}},"/v1/organization/select":{"post":{"operationId":"OrganizationController_selectOrganization","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectOrganizationDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectedOrganizationDto"}}}}},"security":[{"cookie":[]}],"summary":"Select active organization (route might change in the future)","tags":["User Organization"]}},"/v1/organization/by-product/{orgProductId}":{"get":{"description":"Resolves an org product's owning organization directly from the URL, independent of the session's active organization. Used to render the correct organization context on org-scoped product pages.","operationId":"OrganizationController_getOrganizationByProduct","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationByProductDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the organization that owns a given org product","tags":["User Organization"]}},"/v1/organization/notifications":{"patch":{"description":"Targets the org given explicitly in the body, not the session's active organization, so the request always operates on the organization actually shown on screen.","operationId":"OrganizationController_updateNotificationSetting","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationSettingDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSettingDto"}}}}},"security":[{"cookie":[]}],"summary":"Update notification settings for an organization","tags":["User Organization"]}},"/v1/organization-tasks":{"get":{"description":"Returns a paginated list of the tasks visible to the current user, filtered and sorted by due date. Internal tasks are only returned to their lead.","operationId":"OrganizationTasksController_findMany","parameters":[{"name":"orgIds","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"priorities","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationTaskPriority"}}},{"name":"type","required":false,"in":"query","schema":{"$ref":"#/components/schemas/OrganizationTaskType"}},{"name":"dueDateFrom","required":false,"in":"query","schema":{"example":"2026-08-01","type":"string"}},{"name":"dueDateTo","required":false,"in":"query","schema":{"example":"2026-08-31","type":"string"}},{"name":"includeArchived","required":false,"in":"query","description":"Include tasks belonging to archived organizations","schema":{"type":"boolean"}},{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"status","required":false,"in":"query","description":"Defaults to active","schema":{"$ref":"#/components/schemas/OrganizationTaskStatus"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationTaskListItemEntity"}}}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"List organization tasks","tags":["Organization Tasks"]},"post":{"description":"Creates a task for an organization. Internal tasks are always led by the current user.","operationId":"OrganizationTasksController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationTaskDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationTaskEntity"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Create task","tags":["Organization Tasks"]}},"/v1/organization-tasks/summary":{"get":{"description":"Returns how many active tasks match the supplied filters.","operationId":"OrganizationTasksController_getSummary","parameters":[{"name":"orgIds","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"priorities","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationTaskPriority"}}},{"name":"type","required":false,"in":"query","schema":{"$ref":"#/components/schemas/OrganizationTaskType"}},{"name":"dueDateFrom","required":false,"in":"query","schema":{"example":"2026-08-01","type":"string"}},{"name":"dueDateTo","required":false,"in":"query","schema":{"example":"2026-08-31","type":"string"}},{"name":"includeArchived","required":false,"in":"query","description":"Include tasks belonging to archived organizations","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationTasksSummaryDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Get the active task count","tags":["Organization Tasks"]}},"/v1/organization-tasks/{taskId}":{"get":{"description":"Returns a single task including its attachments.","operationId":"OrganizationTasksController_getById","parameters":[{"name":"taskId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationTaskEntity"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Get task details","tags":["Organization Tasks"]},"patch":{"description":"Updates an active task. Completed tasks are read-only and the organization is immutable.","operationId":"OrganizationTasksController_update","parameters":[{"name":"taskId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationTaskDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationTaskEntity"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Update task","tags":["Organization Tasks"]},"delete":{"description":"Permanently deletes the task and any attachment no longer referenced elsewhere.","operationId":"OrganizationTasksController_delete","parameters":[{"name":"taskId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Task deleted"},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Delete task","tags":["Organization Tasks"]}},"/v1/organization-tasks/{taskId}/complete":{"post":{"description":"Closes the task. A closed task can be reopened.","operationId":"OrganizationTasksController_complete","parameters":[{"name":"taskId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationTaskEntity"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Mark task as completed","tags":["Organization Tasks"]}},"/v1/organization-tasks/{taskId}/reopen":{"post":{"description":"Returns the task to Active, keeping its due date unless it has already passed, in which case it moves up to today.","operationId":"OrganizationTasksController_reopen","parameters":[{"name":"taskId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationTaskEntity"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Reopen a closed task","tags":["Organization Tasks"]}},"/v1/organization-tasks/{taskId}/duplicate":{"post":{"description":"Copies the task, including references to the same attachments. The copy keeps the source status and due date, except an active task dated in the past, whose copy moves up to today.","operationId":"OrganizationTasksController_duplicate","parameters":[{"name":"taskId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationTaskEntity"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Duplicate task","tags":["Organization Tasks"]}},"/v1/organization-tasks/{taskId}/attachments":{"post":{"description":"Attaches files to the task: an upload by the `storageKey` POST /files/upload returned, or a document of the task organization's library by its `documentId`, referenced rather than copied. A library document the task already references is skipped.","operationId":"OrganizationTasksController_addAttachments","parameters":[{"name":"taskId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddOrganizationTaskAttachmentsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationTaskEntity"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Attach files to a task","tags":["Organization Tasks"]}},"/v1/organization-tasks/{taskId}/attachments/{attachmentId}":{"patch":{"description":"Edits the description of an already attached file. The stored file, its name, its size and its link to the task are left untouched.","operationId":"OrganizationTasksController_updateAttachment","parameters":[{"name":"taskId","required":true,"in":"path","schema":{"type":"string"}},{"name":"attachmentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationTaskAttachmentDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationTaskEntity"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Update a task attachment's description","tags":["Organization Tasks"]},"delete":{"description":"Removes the attachment row, and the stored file when nothing else references it.","operationId":"OrganizationTasksController_deleteAttachment","parameters":[{"name":"taskId","required":true,"in":"path","schema":{"type":"string"}},{"name":"attachmentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Attachment deleted"},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Remove a task attachment","tags":["Organization Tasks"]}},"/v1/organizations/{orgId}/documents":{"get":{"description":"The library's one list, filtered by department, Other and uploader. A client never gets a revoked agreement. Search tolerates minor misspellings; the first 1000 documents when `page` and `size` are both omitted","operationId":"OrganizationDocumentsController_findMany","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Defaults to `desc`","schema":{"$ref":"#/components/schemas/SortOrder"}},{"name":"departments","required":false,"in":"query","description":"Documents linked to a product in any of these departments. With includeOther, documents linked to no product match too.","schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDepartment"}}},{"name":"includeOther","required":false,"in":"query","description":"Documents linked to no product: the Other department. Alone it narrows to them; with departments, either matches.","schema":{"type":"boolean"}},{"name":"uploadedBy","required":false,"in":"query","description":"admin: uploaded by DECA, signed and generated documents included. client: uploaded by a client user, or by the prospect before conversion. me: uploaded by the reader.","schema":{"$ref":"#/components/schemas/DocumentUploaderFilter"}},{"name":"orgProductId","required":false,"in":"query","schema":{"type":"string"}},{"name":"unfiled","required":false,"in":"query","description":"Only documents linked straight to a product, not filed under one of its forms' sections or categories: library uploads, generated reports, signed documents and any other flow that places its files bare, except files a flow lists on the product itself (an Act 60 amendment's supporting files). With orgProductId, only those linked to that product and filed nowhere in it.","schema":{"type":"boolean"}},{"name":"attachable","required":false,"in":"query","description":"Only documents a product section may attach from the library: leaves out executed agreements and generated reports, which belong to the flow that produced them.","schema":{"type":"boolean"}},{"name":"importable","required":false,"in":"query","description":"Only documents an RDTC report can be imported from: .docx and .pdf files up to 10 MB, generated reports included.","schema":{"type":"boolean"}},{"name":"search","required":false,"in":"query","description":"Matches document names loosely, tolerating minor typos. Ignored below MIN_DOCUMENT_SEARCH_LENGTH (@deca/shared/constants), which returns the library unfiltered rather than an error. Matches are capped at MAX_SEARCH_MATCHES, ordered by sortBy/sortOrder.","schema":{"type":"string"}},{"name":"sortBy","required":false,"in":"query","schema":{"$ref":"#/components/schemas/OrganizationDocumentSortField"}},{"name":"size","required":false,"in":"query","schema":{"minimum":1,"maximum":200,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDocumentsResponseDto"}}}}},"security":[{"cookie":[]}],"summary":"List organization documents","tags":["Organizations - Documents"]},"post":{"description":"Under Other, or linked straight to the products in orgProductIds. Documents tied to a product section are uploaded through that product.","operationId":"OrganizationDocumentsController_create","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationDocumentDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDocumentDto"}}}}},"security":[{"cookie":[]}],"summary":"Upload a miscellaneous document","tags":["Organizations - Documents"]}},"/v1/organizations/{orgId}/documents/grouped":{"get":{"description":"A department block is returned when the organization has a product in it, even with no documents; the Other block is always present. A client never gets a revoked agreement.","operationId":"OrganizationDocumentsController_findGrouped","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Defaults to `desc`","schema":{"$ref":"#/components/schemas/SortOrder"}},{"name":"departments","required":false,"in":"query","description":"Documents linked to a product in any of these departments. With includeOther, documents linked to no product match too.","schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDepartment"}}},{"name":"includeOther","required":false,"in":"query","description":"Documents linked to no product: the Other department. Alone it narrows to them; with departments, either matches.","schema":{"type":"boolean"}},{"name":"uploadedBy","required":false,"in":"query","description":"admin: uploaded by DECA, signed and generated documents included. client: uploaded by a client user, or by the prospect before conversion. me: uploaded by the reader.","schema":{"$ref":"#/components/schemas/DocumentUploaderFilter"}},{"name":"orgProductId","required":false,"in":"query","schema":{"type":"string"}},{"name":"unfiled","required":false,"in":"query","description":"Only documents linked straight to a product, not filed under one of its forms' sections or categories: library uploads, generated reports, signed documents and any other flow that places its files bare, except files a flow lists on the product itself (an Act 60 amendment's supporting files). With orgProductId, only those linked to that product and filed nowhere in it.","schema":{"type":"boolean"}},{"name":"attachable","required":false,"in":"query","description":"Only documents a product section may attach from the library: leaves out executed agreements and generated reports, which belong to the flow that produced them.","schema":{"type":"boolean"}},{"name":"importable","required":false,"in":"query","description":"Only documents an RDTC report can be imported from: .docx and .pdf files up to 10 MB, generated reports included.","schema":{"type":"boolean"}},{"name":"search","required":false,"in":"query","description":"Matches document names loosely, tolerating minor typos. Ignored below MIN_DOCUMENT_SEARCH_LENGTH (@deca/shared/constants), which returns the library unfiltered rather than an error. Matches are capped at MAX_SEARCH_MATCHES, ordered by sortBy/sortOrder.","schema":{"type":"string"}},{"name":"sortBy","required":false,"in":"query","schema":{"$ref":"#/components/schemas/OrganizationDocumentSortField"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupedOrganizationDocumentsResponseDto"}}}}},"security":[{"cookie":[]}],"summary":"List organization documents grouped by department","tags":["Organizations - Documents"]}},"/v1/organizations/{orgId}/documents/linkable-products":{"get":{"description":"What the upload and edit forms offer, by department, then name: none in Backlog or withdrawn by the client, and for a client no Ad Hoc work.","operationId":"OrganizationDocumentsController_findLinkableProducts","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationDocumentProductDto"}}}}}},"security":[{"cookie":[]}],"summary":"List the products a document can be linked to","tags":["Organizations - Documents"]}},"/v1/organizations/{orgId}/documents/departments":{"get":{"operationId":"OrganizationDocumentsController_findDepartments","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDocumentDepartmentsResponseDto"}}}}},"security":[{"cookie":[]}],"summary":"List the departments the library's Department filter offers","tags":["Organizations - Documents"]}},"/v1/organizations/{orgId}/documents/{documentId}/activity":{"get":{"description":"Every entry logged under the document — its upload, re-uploads from the library or a product section, edits, expiry changes — newest first, one line per action even where it was logged on several products.","operationId":"OrganizationDocumentsController_findActivity","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDocumentActivityResponseDto"}}}}},"security":[{"cookie":[]}],"summary":"List a document's activity","tags":["Organizations - Documents"]}},"/v1/organizations/{orgId}/documents/{documentId}/download":{"get":{"description":"Redirects to a short-lived signed URL, or to the report renderer for a generated report. With preview, a PDF or a JPEG, PNG, GIF or WebP image redirects to the preview route, whose URL ends in the document’s name, for the browser to show in place. A client asking for a revoked agreement gets a 404.","operationId":"OrganizationDocumentsController_download","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"preview","required":false,"in":"query","description":"Serves the file for the browser to show in place when it renders the type (PDF and images); any other type, and a generated report, still downloads.","schema":{"type":"boolean"}}],"responses":{"302":{"description":"Redirect to the signed URL, the preview route or the report renderer"}},"security":[{"cookie":[]}],"summary":"Download or preview a document","tags":["Organizations - Documents"]}},"/v1/organizations/{orgId}/documents/{documentId}/preview/{fileName}":{"get":{"description":"Where a preview through download redirects for a PDF or a JPEG, PNG, GIF or WebP image: the stored file, streamed for the browser to show in place under the document’s name. Any other type is served as a download. Not available for a generated report. A client asking for a revoked agreement gets a 404.","operationId":"OrganizationDocumentsController_preview","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"fileName","required":true,"in":"path","description":"The document’s name, URL-encoded, which the browser titles the tab with; the file served does not depend on it","schema":{"type":"string"}}],"responses":{"200":{"description":"The stored file"}},"security":[{"cookie":[]}],"summary":"Preview a document","tags":["Organizations - Documents"]}},"/v1/organizations/{orgId}/documents/{documentId}/file":{"get":{"description":"The stored file in the shape an upload returns, so a product section can attach it from the library through its own save. The document keeps its name. Not available for an executed agreement or a generated report, which belong to the flow that produced them.","operationId":"OrganizationDocumentsController_getFile","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadResultEntity"}}}}},"security":[{"cookie":[]}],"summary":"Get the file behind a document","tags":["Organizations - Documents"]},"put":{"description":"Swaps the stored file, keeping the document, its name and its place in every flow holding it, each of which checks the new file and follows the swap its own way. Approved placements go back to the review queue, except an AUP certificate or Final Document a DECA admin replaces from the admin portal. The client is told where the flow holding the file tells them of its own Re-Upload, and not at all of a file they cannot see. Refused with a flow's own reason where it refuses (canReplace), and with 409 when the flows holding the file changed meanwhile; a client may not swap a file DECA has approved unless it is filed under a category that expires.","operationId":"OrganizationDocumentsController_replaceFile","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceOrganizationDocumentFileDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDocumentDto"}}}}},"security":[{"cookie":[]}],"summary":"Replace a document file","tags":["Organizations - Documents"]}},"/v1/organizations/{orgId}/documents/{documentId}":{"patch":{"description":"Renames it and relinks it to products in one save (canEdit). For an admin the rename reaches every flow listing the file, and unlinking a product takes the file out of that product's flows the way their own remove does; an unlink that would leave a flow's file held nowhere is refused, and so is any edit where a flow refuses a rename. A flow that refuses its unlink only under its own lock leaves the links already added saved and logged. A client edits only a library upload no product form has filed.","operationId":"OrganizationDocumentsController_update","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationDocumentDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDocumentDto"}}}}},"security":[{"cookie":[]}],"summary":"Edit a document","tags":["Organizations - Documents"]},"delete":{"description":"Takes the file out of every flow holding it, each the way its own remove does, then removes it from the library (canDelete). Refused, with nothing changed, where a flow refuses up front; a refusal that only shows under a flow's own lock (a filing sent to DDEC meanwhile) leaves the flows before it done. Executed agreements and generated reports are never deleted here.","operationId":"OrganizationDocumentsController_remove","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete a document","tags":["Organizations - Documents"]}},"/v1/organizations/{orgId}/documents/{documentId}/expiry":{"patch":{"description":"Replaces the date the category default produced with one set by hand, and marks it as overridden. Null stops the document being tracked for renewal, and stays marked as overridden so a later file replacement does not restart the category clock.","operationId":"OrganizationDocumentsController_setExpiry","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationDocumentExpiryDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDocumentDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Override a document expiry date","tags":["Organizations - Documents"]}},"/v1/organizations/{orgId}/responsible-users":{"get":{"description":"Returns every responsibility role, including the ones nobody is assigned to","operationId":"OrgResponsibleUsersController_findMany","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgResponsibilityAssignmentDto"}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List responsibility roles for organization","tags":["Organizations - Responsible Users"]}},"/v1/organizations/{orgId}/responsible-users/{role}":{"put":{"description":"Assigns or replaces the user responsible for the role. A user who is not an active or invited admin or super admin is rejected with 400, and an unknown one with 404. Re-sending the current holder changes nothing.","operationId":"OrgResponsibleUsersController_assign","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"role","required":true,"in":"path","description":"Responsibility role","schema":{"$ref":"#/components/schemas/OrgResponsibilityRole"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignResponsibleUserDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgResponsibilityAssignmentDto"}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Assign a user to a responsibility role","tags":["Organizations - Responsible Users"]},"delete":{"operationId":"OrgResponsibleUsersController_remove","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"role","required":true,"in":"path","description":"Responsibility role","schema":{"$ref":"#/components/schemas/OrgResponsibilityRole"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgResponsibilityAssignmentDto"}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Remove the user assigned to a responsibility role","tags":["Organizations - Responsible Users"]}},"/v1/responsible-users/assigned-users":{"get":{"description":"Pooled over every organization, archived included. Roles nobody holds anywhere are omitted. Backs the organization list KAM and advisor filters.","operationId":"OrgResponsibleUsersLookupController_findAssignedUsers","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignedUsersDto"}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List the users holding each responsibility role","tags":["Organizations - Responsible Users"]}},"/v1/organizations":{"post":{"description":"Create a new organization with optional user and nickname assignments","operationId":"OrganizationsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"Organization with this Entity Name already exists","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization with this Entity Name already exists"},"statusCode":{"type":"number","example":409}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Create organization","tags":["Organizations"]},"get":{"description":"Get a paginated list of organizations","operationId":"OrganizationsController_findMany","parameters":[{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"ids","required":false,"in":"query","description":"Only the organizations with these ids.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"nicknameIds","required":false,"in":"query","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"assignedAdminIds","required":false,"in":"query","description":"Organizations where one of these users holds either KAM role — primary or secondary, not just the assigned admin.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"productIds","required":false,"in":"query","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"responsibleUsers","required":false,"in":"query","description":"Responsibility assignments to match. An entry matches an organization whose named role is held by that user; the entries are OR-ed with each other and AND-ed with every other filter.","schema":{"type":"array","items":{"$ref":"#/components/schemas/ResponsibilityAssignmentFilterDto"},"maxItems":60}},{"name":"taskLeadIds","required":false,"in":"query","description":"Services one of these users is a task lead of, per-part leads on a two-part service included. Narrows the returned services like the other service filters.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"ddecResponsibleIds","required":false,"in":"query","description":"R&D Tax Credits whose DDEC Responsible includes one of these officers. Narrows the returned services like the other service filters.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"departments","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDepartment"}}},{"name":"updatedFrom","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"updatedTo","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"statuses","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationStatus"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationEntity"}}}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List organizations","tags":["Organizations"]}},"/v1/organizations/grouped":{"get":{"description":"Get a paginated list of organizations grouped by their assigned nicknames","operationId":"OrganizationsController_findManyGrouped","parameters":[{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"ids","required":false,"in":"query","description":"Only the organizations with these ids.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"nicknameIds","required":false,"in":"query","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"assignedAdminIds","required":false,"in":"query","description":"Organizations where one of these users holds either KAM role — primary or secondary, not just the assigned admin.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"productIds","required":false,"in":"query","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"responsibleUsers","required":false,"in":"query","description":"Responsibility assignments to match. An entry matches an organization whose named role is held by that user; the entries are OR-ed with each other and AND-ed with every other filter.","schema":{"type":"array","items":{"$ref":"#/components/schemas/ResponsibilityAssignmentFilterDto"},"maxItems":60}},{"name":"taskLeadIds","required":false,"in":"query","description":"Services one of these users is a task lead of, per-part leads on a two-part service included. Narrows the returned services like the other service filters.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"ddecResponsibleIds","required":false,"in":"query","description":"R&D Tax Credits whose DDEC Responsible includes one of these officers. Narrows the returned services like the other service filters.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"departments","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDepartment"}}},{"name":"updatedFrom","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"updatedTo","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"statuses","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationStatus"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/GroupedOrganizationsItem"}}}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List organizations grouped by nicknames","tags":["Organizations"]}},"/v1/organizations/quick-search":{"get":{"description":"The best matches by name or nickname among the organizations the caller may read, for the global search of the admin portal","operationId":"OrganizationsController_quickSearch","parameters":[{"name":"search","required":true,"in":"query","description":"Every word must appear in the organization's name or its nickname, in any order; words tolerate a typo. Case-insensitive; only the first 8 words are used, and a blank search finds nothing.","schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationQuickSearchDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Quick search organizations","tags":["Organizations"]}},"/v1/organizations/export":{"get":{"description":"Every organization matching the list filters, across all pages, with the requested sections for those organizations","operationId":"OrganizationsController_findForExport","parameters":[{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"ids","required":false,"in":"query","description":"Only the organizations with these ids.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"nicknameIds","required":false,"in":"query","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"assignedAdminIds","required":false,"in":"query","description":"Organizations where one of these users holds either KAM role — primary or secondary, not just the assigned admin.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"productIds","required":false,"in":"query","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"responsibleUsers","required":false,"in":"query","description":"Responsibility assignments to match. An entry matches an organization whose named role is held by that user; the entries are OR-ed with each other and AND-ed with every other filter.","schema":{"type":"array","items":{"$ref":"#/components/schemas/ResponsibilityAssignmentFilterDto"},"maxItems":60}},{"name":"taskLeadIds","required":false,"in":"query","description":"Services one of these users is a task lead of, per-part leads on a two-part service included. Narrows the returned services like the other service filters.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"ddecResponsibleIds","required":false,"in":"query","description":"R&D Tax Credits whose DDEC Responsible includes one of these officers. Narrows the returned services like the other service filters.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"departments","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDepartment"}}},{"name":"updatedFrom","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"updatedTo","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"statuses","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationStatus"}}},{"name":"sections","required":true,"in":"query","description":"Information groups to export. Organizations are always returned, since every worksheet names its parent organization.","schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationExportSection"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationsExportDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Export organizations","tags":["Organizations"]}},"/v1/organizations/{orgId}":{"get":{"description":"Get detailed information about an organization including products, users, and nicknames","operationId":"OrganizationsController_get","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get organization details","tags":["Organizations"]},"patch":{"description":"Update organization information (domain is immutable)","operationId":"OrganizationsController_update","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"Organization with this Entity Name already exists","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization with this Entity Name already exists"},"statusCode":{"type":"number","example":409}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update organization","tags":["Organizations"]},"delete":{"description":"Permanently delete an organization and all related data. Super admin only.","operationId":"OrganizationsController_delete","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete organization","tags":["Organizations"]}},"/v1/organizations/{orgId}/status":{"patch":{"description":"Switch an organization between Active and On Hold. On Hold requires a reason.","operationId":"OrganizationsController_updateStatus","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationStatusDto"}}}},"responses":{"200":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update organization status","tags":["Organizations"]}},"/v1/organizations/{orgId}/label":{"patch":{"description":"Tags the organization with one of the catalogue labels, or sends null to take the current one off.","operationId":"OrganizationsController_updateLabel","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationLabelDto"}}}},"responses":{"200":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Set or clear the organization label","tags":["Organizations"]}},"/v1/organizations/{orgId}/toggle-archived":{"post":{"description":"Archive or unarchive an organization","operationId":"OrganizationsController_toggleArchived","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"201":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Toggle organization archived status","tags":["Organizations"]}},"/v1/organizations/{orgId}/products":{"post":{"description":"Add one or more catalog products to an organization; each reads its settings from the catalog product. Each product's settings decide what it asks for: a year and month or quarter inside its range for a periodic product, a name for one with multiple named services (unique among the organization's services of the product, ignoring case), an hourly rate for one with rates. Only active products offered to the organization's entity type can be added.","operationId":"OrgProductsController_add","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddMultipleProductsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/RndTaxCreditProductEntity"},{"$ref":"#/components/schemas/RndTaxCreditAmendmentProductEntity"},{"$ref":"#/components/schemas/Act60ProductEntity"},{"$ref":"#/components/schemas/Act60AmendmentProductEntity"},{"$ref":"#/components/schemas/DocumentProductEntity"},{"$ref":"#/components/schemas/TourismTaxCreditProductEntity"}],"discriminator":{"propertyName":"type","mapping":{"rnd_tax_credit":"#/components/schemas/RndTaxCreditProductEntity","rnd_tax_credit_amendment":"#/components/schemas/RndTaxCreditAmendmentProductEntity","act_60":"#/components/schemas/Act60ProductEntity","act_60_amendment":"#/components/schemas/Act60AmendmentProductEntity","certificate_of_organization":"#/components/schemas/DocumentProductEntity","articles_of_incorporation":"#/components/schemas/DocumentProductEntity","ein_letter":"#/components/schemas/DocumentProductEntity","operating_agreement_bylaws":"#/components/schemas/DocumentProductEntity","department_of_state_registrations":"#/components/schemas/DocumentProductEntity","treasury_suri_registration":"#/components/schemas/DocumentProductEntity","child_support_registration":"#/components/schemas/DocumentProductEntity","crim_registration":"#/components/schemas/DocumentProductEntity","state_insurance_fund_registration":"#/components/schemas/DocumentProductEntity","labor_human_resources_registration":"#/components/schemas/DocumentProductEntity","incentives_portal_registration":"#/components/schemas/DocumentProductEntity","merchants_registration_certificate":"#/components/schemas/DocumentProductEntity","single_permit_application":"#/components/schemas/DocumentProductEntity","provisional_municipal_license_tax":"#/components/schemas/DocumentProductEntity","local_pr_bank_account":"#/components/schemas/DocumentProductEntity","manufacturers_id":"#/components/schemas/DocumentProductEntity","non_withholding_waiver":"#/components/schemas/DocumentProductEntity","municipal_decree":"#/components/schemas/DocumentProductEntity","sales_use_tax":"#/components/schemas/DocumentProductEntity","professional_services_rendered":"#/components/schemas/DocumentProductEntity","volume_of_business":"#/components/schemas/DocumentProductEntity","incentive_income_tax_return":"#/components/schemas/DocumentProductEntity","informative_returns":"#/components/schemas/DocumentProductEntity","personal_property_tax":"#/components/schemas/DocumentProductEntity","annual_report":"#/components/schemas/DocumentProductEntity","exempt_annual_report":"#/components/schemas/DocumentProductEntity","federal_income_tax_return":"#/components/schemas/DocumentProductEntity","irs_form_8898":"#/components/schemas/DocumentProductEntity","income_tax_return":"#/components/schemas/DocumentProductEntity","state_income_tax_return":"#/components/schemas/DocumentProductEntity","filing_extension":"#/components/schemas/DocumentProductEntity","tourism_tax_credit":"#/components/schemas/TourismTaxCreditProductEntity","financing":"#/components/schemas/DocumentProductEntity","federal_grant":"#/components/schemas/DocumentProductEntity","eif_grant":"#/components/schemas/DocumentProductEntity","me_grant":"#/components/schemas/DocumentProductEntity","other_grant":"#/components/schemas/DocumentProductEntity","ad_hoc_foundational_services":"#/components/schemas/DocumentProductEntity","ad_hoc_incentives":"#/components/schemas/DocumentProductEntity","ad_hoc_tax_compliance":"#/components/schemas/DocumentProductEntity","ad_hoc_tax_credits":"#/components/schemas/DocumentProductEntity","ad_hoc_financing":"#/components/schemas/DocumentProductEntity","ad_hoc_local_grants":"#/components/schemas/DocumentProductEntity","ad_hoc_federal_grants":"#/components/schemas/DocumentProductEntity","custom":"#/components/schemas/DocumentProductEntity"}}}}}}}},"security":[{"cookie":[]}],"summary":"Add products to organization","tags":["Organizations - Products"]},"get":{"description":"Get all products assigned to an organization with filters","operationId":"OrgProductsController_findMany","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"years","required":false,"in":"query","schema":{"maxItems":60,"type":"array","items":{"type":"number"}}},{"name":"statuses","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgProductStatus"}}},{"name":"productIds","required":false,"in":"query","description":"Catalog products to narrow to. Products created in the admin all share the `custom` type, so only their ids tell them apart","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/RndTaxCreditProductEntity"},{"$ref":"#/components/schemas/RndTaxCreditAmendmentProductEntity"},{"$ref":"#/components/schemas/Act60ProductEntity"},{"$ref":"#/components/schemas/Act60AmendmentProductEntity"},{"$ref":"#/components/schemas/DocumentProductEntity"},{"$ref":"#/components/schemas/TourismTaxCreditProductEntity"}],"discriminator":{"propertyName":"type","mapping":{"rnd_tax_credit":"#/components/schemas/RndTaxCreditProductEntity","rnd_tax_credit_amendment":"#/components/schemas/RndTaxCreditAmendmentProductEntity","act_60":"#/components/schemas/Act60ProductEntity","act_60_amendment":"#/components/schemas/Act60AmendmentProductEntity","certificate_of_organization":"#/components/schemas/DocumentProductEntity","articles_of_incorporation":"#/components/schemas/DocumentProductEntity","ein_letter":"#/components/schemas/DocumentProductEntity","operating_agreement_bylaws":"#/components/schemas/DocumentProductEntity","department_of_state_registrations":"#/components/schemas/DocumentProductEntity","treasury_suri_registration":"#/components/schemas/DocumentProductEntity","child_support_registration":"#/components/schemas/DocumentProductEntity","crim_registration":"#/components/schemas/DocumentProductEntity","state_insurance_fund_registration":"#/components/schemas/DocumentProductEntity","labor_human_resources_registration":"#/components/schemas/DocumentProductEntity","incentives_portal_registration":"#/components/schemas/DocumentProductEntity","merchants_registration_certificate":"#/components/schemas/DocumentProductEntity","single_permit_application":"#/components/schemas/DocumentProductEntity","provisional_municipal_license_tax":"#/components/schemas/DocumentProductEntity","local_pr_bank_account":"#/components/schemas/DocumentProductEntity","manufacturers_id":"#/components/schemas/DocumentProductEntity","non_withholding_waiver":"#/components/schemas/DocumentProductEntity","municipal_decree":"#/components/schemas/DocumentProductEntity","sales_use_tax":"#/components/schemas/DocumentProductEntity","professional_services_rendered":"#/components/schemas/DocumentProductEntity","volume_of_business":"#/components/schemas/DocumentProductEntity","incentive_income_tax_return":"#/components/schemas/DocumentProductEntity","informative_returns":"#/components/schemas/DocumentProductEntity","personal_property_tax":"#/components/schemas/DocumentProductEntity","annual_report":"#/components/schemas/DocumentProductEntity","exempt_annual_report":"#/components/schemas/DocumentProductEntity","federal_income_tax_return":"#/components/schemas/DocumentProductEntity","irs_form_8898":"#/components/schemas/DocumentProductEntity","income_tax_return":"#/components/schemas/DocumentProductEntity","state_income_tax_return":"#/components/schemas/DocumentProductEntity","filing_extension":"#/components/schemas/DocumentProductEntity","tourism_tax_credit":"#/components/schemas/TourismTaxCreditProductEntity","financing":"#/components/schemas/DocumentProductEntity","federal_grant":"#/components/schemas/DocumentProductEntity","eif_grant":"#/components/schemas/DocumentProductEntity","me_grant":"#/components/schemas/DocumentProductEntity","other_grant":"#/components/schemas/DocumentProductEntity","ad_hoc_foundational_services":"#/components/schemas/DocumentProductEntity","ad_hoc_incentives":"#/components/schemas/DocumentProductEntity","ad_hoc_tax_compliance":"#/components/schemas/DocumentProductEntity","ad_hoc_tax_credits":"#/components/schemas/DocumentProductEntity","ad_hoc_financing":"#/components/schemas/DocumentProductEntity","ad_hoc_local_grants":"#/components/schemas/DocumentProductEntity","ad_hoc_federal_grants":"#/components/schemas/DocumentProductEntity","custom":"#/components/schemas/DocumentProductEntity"}}}}}}}},"security":[{"cookie":[]}],"summary":"List products for organization","tags":["Organizations - Products"]}},"/v1/organizations/{orgId}/products/grouped":{"get":{"description":"Admin-only. Returns products assigned to an organization grouped by product group, in a fixed group order. Supports year, status, product, task lead and DDEC Responsible filters.","operationId":"OrgProductsController_findManyGrouped","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"years","required":false,"in":"query","schema":{"maxItems":60,"type":"array","items":{"type":"number"}}},{"name":"statuses","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgProductStatus"}}},{"name":"productIds","required":false,"in":"query","description":"Catalog products to narrow to. Products created in the admin all share the `custom` type, so only their ids tell them apart","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"taskLeadIds","required":false,"in":"query","description":"Services one of these users is a task lead of, per-part leads on a two-part service included.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"ddecResponsibleIds","required":false,"in":"query","description":"R&D Tax Credits whose DDEC Responsible includes one of these officers.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GroupedOrgProductsDto"}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List products for organization grouped by product group (admin)","tags":["Organizations - Products"]}},"/v1/organizations/{orgId}/products/{orgProductId}":{"get":{"description":"Get a single product assigned to an organization by its id","operationId":"OrgProductsController_findOne","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RndTaxCreditProductEntity"},{"$ref":"#/components/schemas/RndTaxCreditAmendmentProductEntity"},{"$ref":"#/components/schemas/Act60ProductEntity"},{"$ref":"#/components/schemas/Act60AmendmentProductEntity"},{"$ref":"#/components/schemas/DocumentProductEntity"},{"$ref":"#/components/schemas/TourismTaxCreditProductEntity"}],"discriminator":{"propertyName":"type","mapping":{"rnd_tax_credit":"#/components/schemas/RndTaxCreditProductEntity","rnd_tax_credit_amendment":"#/components/schemas/RndTaxCreditAmendmentProductEntity","act_60":"#/components/schemas/Act60ProductEntity","act_60_amendment":"#/components/schemas/Act60AmendmentProductEntity","certificate_of_organization":"#/components/schemas/DocumentProductEntity","articles_of_incorporation":"#/components/schemas/DocumentProductEntity","ein_letter":"#/components/schemas/DocumentProductEntity","operating_agreement_bylaws":"#/components/schemas/DocumentProductEntity","department_of_state_registrations":"#/components/schemas/DocumentProductEntity","treasury_suri_registration":"#/components/schemas/DocumentProductEntity","child_support_registration":"#/components/schemas/DocumentProductEntity","crim_registration":"#/components/schemas/DocumentProductEntity","state_insurance_fund_registration":"#/components/schemas/DocumentProductEntity","labor_human_resources_registration":"#/components/schemas/DocumentProductEntity","incentives_portal_registration":"#/components/schemas/DocumentProductEntity","merchants_registration_certificate":"#/components/schemas/DocumentProductEntity","single_permit_application":"#/components/schemas/DocumentProductEntity","provisional_municipal_license_tax":"#/components/schemas/DocumentProductEntity","local_pr_bank_account":"#/components/schemas/DocumentProductEntity","manufacturers_id":"#/components/schemas/DocumentProductEntity","non_withholding_waiver":"#/components/schemas/DocumentProductEntity","municipal_decree":"#/components/schemas/DocumentProductEntity","sales_use_tax":"#/components/schemas/DocumentProductEntity","professional_services_rendered":"#/components/schemas/DocumentProductEntity","volume_of_business":"#/components/schemas/DocumentProductEntity","incentive_income_tax_return":"#/components/schemas/DocumentProductEntity","informative_returns":"#/components/schemas/DocumentProductEntity","personal_property_tax":"#/components/schemas/DocumentProductEntity","annual_report":"#/components/schemas/DocumentProductEntity","exempt_annual_report":"#/components/schemas/DocumentProductEntity","federal_income_tax_return":"#/components/schemas/DocumentProductEntity","irs_form_8898":"#/components/schemas/DocumentProductEntity","income_tax_return":"#/components/schemas/DocumentProductEntity","state_income_tax_return":"#/components/schemas/DocumentProductEntity","filing_extension":"#/components/schemas/DocumentProductEntity","tourism_tax_credit":"#/components/schemas/TourismTaxCreditProductEntity","financing":"#/components/schemas/DocumentProductEntity","federal_grant":"#/components/schemas/DocumentProductEntity","eif_grant":"#/components/schemas/DocumentProductEntity","me_grant":"#/components/schemas/DocumentProductEntity","other_grant":"#/components/schemas/DocumentProductEntity","ad_hoc_foundational_services":"#/components/schemas/DocumentProductEntity","ad_hoc_incentives":"#/components/schemas/DocumentProductEntity","ad_hoc_tax_compliance":"#/components/schemas/DocumentProductEntity","ad_hoc_tax_credits":"#/components/schemas/DocumentProductEntity","ad_hoc_financing":"#/components/schemas/DocumentProductEntity","ad_hoc_local_grants":"#/components/schemas/DocumentProductEntity","ad_hoc_federal_grants":"#/components/schemas/DocumentProductEntity","custom":"#/components/schemas/DocumentProductEntity"}}}}}}},"security":[{"cookie":[]}],"summary":"Get organization product","tags":["Organizations - Products"]},"delete":{"description":"Permanently delete an organization product (hard delete)","operationId":"OrgProductsController_delete","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"cookie":[]}],"summary":"Delete organization product","tags":["Organizations - Products"]}},"/v1/organizations/{orgId}/products/{orgProductId}/mark-reviewed":{"patch":{"description":"Reset all pending-review counters (information, documents) for a single organization product and mark its activity reviewed for everyone","operationId":"OrgProductsController_markReviewed","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"cookie":[]}],"summary":"Mark product as reviewed","tags":["Organizations - Products"]}},"/v1/organizations/{orgId}/products/{orgProductId}/assigned-admins":{"patch":{"description":"Admin-only. Replaces the admins responsible for a single organization product; pass an empty array to unassign.","operationId":"OrgProductsController_assignAdmins","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignProductAdminsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RndTaxCreditProductEntity"},{"$ref":"#/components/schemas/RndTaxCreditAmendmentProductEntity"},{"$ref":"#/components/schemas/Act60ProductEntity"},{"$ref":"#/components/schemas/Act60AmendmentProductEntity"},{"$ref":"#/components/schemas/DocumentProductEntity"},{"$ref":"#/components/schemas/TourismTaxCreditProductEntity"}],"discriminator":{"propertyName":"type","mapping":{"rnd_tax_credit":"#/components/schemas/RndTaxCreditProductEntity","rnd_tax_credit_amendment":"#/components/schemas/RndTaxCreditAmendmentProductEntity","act_60":"#/components/schemas/Act60ProductEntity","act_60_amendment":"#/components/schemas/Act60AmendmentProductEntity","certificate_of_organization":"#/components/schemas/DocumentProductEntity","articles_of_incorporation":"#/components/schemas/DocumentProductEntity","ein_letter":"#/components/schemas/DocumentProductEntity","operating_agreement_bylaws":"#/components/schemas/DocumentProductEntity","department_of_state_registrations":"#/components/schemas/DocumentProductEntity","treasury_suri_registration":"#/components/schemas/DocumentProductEntity","child_support_registration":"#/components/schemas/DocumentProductEntity","crim_registration":"#/components/schemas/DocumentProductEntity","state_insurance_fund_registration":"#/components/schemas/DocumentProductEntity","labor_human_resources_registration":"#/components/schemas/DocumentProductEntity","incentives_portal_registration":"#/components/schemas/DocumentProductEntity","merchants_registration_certificate":"#/components/schemas/DocumentProductEntity","single_permit_application":"#/components/schemas/DocumentProductEntity","provisional_municipal_license_tax":"#/components/schemas/DocumentProductEntity","local_pr_bank_account":"#/components/schemas/DocumentProductEntity","manufacturers_id":"#/components/schemas/DocumentProductEntity","non_withholding_waiver":"#/components/schemas/DocumentProductEntity","municipal_decree":"#/components/schemas/DocumentProductEntity","sales_use_tax":"#/components/schemas/DocumentProductEntity","professional_services_rendered":"#/components/schemas/DocumentProductEntity","volume_of_business":"#/components/schemas/DocumentProductEntity","incentive_income_tax_return":"#/components/schemas/DocumentProductEntity","informative_returns":"#/components/schemas/DocumentProductEntity","personal_property_tax":"#/components/schemas/DocumentProductEntity","annual_report":"#/components/schemas/DocumentProductEntity","exempt_annual_report":"#/components/schemas/DocumentProductEntity","federal_income_tax_return":"#/components/schemas/DocumentProductEntity","irs_form_8898":"#/components/schemas/DocumentProductEntity","income_tax_return":"#/components/schemas/DocumentProductEntity","state_income_tax_return":"#/components/schemas/DocumentProductEntity","filing_extension":"#/components/schemas/DocumentProductEntity","tourism_tax_credit":"#/components/schemas/TourismTaxCreditProductEntity","financing":"#/components/schemas/DocumentProductEntity","federal_grant":"#/components/schemas/DocumentProductEntity","eif_grant":"#/components/schemas/DocumentProductEntity","me_grant":"#/components/schemas/DocumentProductEntity","other_grant":"#/components/schemas/DocumentProductEntity","ad_hoc_foundational_services":"#/components/schemas/DocumentProductEntity","ad_hoc_incentives":"#/components/schemas/DocumentProductEntity","ad_hoc_tax_compliance":"#/components/schemas/DocumentProductEntity","ad_hoc_tax_credits":"#/components/schemas/DocumentProductEntity","ad_hoc_financing":"#/components/schemas/DocumentProductEntity","ad_hoc_local_grants":"#/components/schemas/DocumentProductEntity","ad_hoc_federal_grants":"#/components/schemas/DocumentProductEntity","custom":"#/components/schemas/DocumentProductEntity"}}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Set the assigned admins for a product (admin)","tags":["Organizations - Products"]}},"/v1/organizations/{orgId}/products/{orgProductId}/name":{"patch":{"description":"Admin-only. Changes the instance name of a custom-named product; the name must be unique among the organization's services of the product, ignoring case. Other products keep their catalog name and are rejected.","operationId":"OrgProductsController_rename","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameOrgProductDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RndTaxCreditProductEntity"},{"$ref":"#/components/schemas/RndTaxCreditAmendmentProductEntity"},{"$ref":"#/components/schemas/Act60ProductEntity"},{"$ref":"#/components/schemas/Act60AmendmentProductEntity"},{"$ref":"#/components/schemas/DocumentProductEntity"},{"$ref":"#/components/schemas/TourismTaxCreditProductEntity"}],"discriminator":{"propertyName":"type","mapping":{"rnd_tax_credit":"#/components/schemas/RndTaxCreditProductEntity","rnd_tax_credit_amendment":"#/components/schemas/RndTaxCreditAmendmentProductEntity","act_60":"#/components/schemas/Act60ProductEntity","act_60_amendment":"#/components/schemas/Act60AmendmentProductEntity","certificate_of_organization":"#/components/schemas/DocumentProductEntity","articles_of_incorporation":"#/components/schemas/DocumentProductEntity","ein_letter":"#/components/schemas/DocumentProductEntity","operating_agreement_bylaws":"#/components/schemas/DocumentProductEntity","department_of_state_registrations":"#/components/schemas/DocumentProductEntity","treasury_suri_registration":"#/components/schemas/DocumentProductEntity","child_support_registration":"#/components/schemas/DocumentProductEntity","crim_registration":"#/components/schemas/DocumentProductEntity","state_insurance_fund_registration":"#/components/schemas/DocumentProductEntity","labor_human_resources_registration":"#/components/schemas/DocumentProductEntity","incentives_portal_registration":"#/components/schemas/DocumentProductEntity","merchants_registration_certificate":"#/components/schemas/DocumentProductEntity","single_permit_application":"#/components/schemas/DocumentProductEntity","provisional_municipal_license_tax":"#/components/schemas/DocumentProductEntity","local_pr_bank_account":"#/components/schemas/DocumentProductEntity","manufacturers_id":"#/components/schemas/DocumentProductEntity","non_withholding_waiver":"#/components/schemas/DocumentProductEntity","municipal_decree":"#/components/schemas/DocumentProductEntity","sales_use_tax":"#/components/schemas/DocumentProductEntity","professional_services_rendered":"#/components/schemas/DocumentProductEntity","volume_of_business":"#/components/schemas/DocumentProductEntity","incentive_income_tax_return":"#/components/schemas/DocumentProductEntity","informative_returns":"#/components/schemas/DocumentProductEntity","personal_property_tax":"#/components/schemas/DocumentProductEntity","annual_report":"#/components/schemas/DocumentProductEntity","exempt_annual_report":"#/components/schemas/DocumentProductEntity","federal_income_tax_return":"#/components/schemas/DocumentProductEntity","irs_form_8898":"#/components/schemas/DocumentProductEntity","income_tax_return":"#/components/schemas/DocumentProductEntity","state_income_tax_return":"#/components/schemas/DocumentProductEntity","filing_extension":"#/components/schemas/DocumentProductEntity","tourism_tax_credit":"#/components/schemas/TourismTaxCreditProductEntity","financing":"#/components/schemas/DocumentProductEntity","federal_grant":"#/components/schemas/DocumentProductEntity","eif_grant":"#/components/schemas/DocumentProductEntity","me_grant":"#/components/schemas/DocumentProductEntity","other_grant":"#/components/schemas/DocumentProductEntity","ad_hoc_foundational_services":"#/components/schemas/DocumentProductEntity","ad_hoc_incentives":"#/components/schemas/DocumentProductEntity","ad_hoc_tax_compliance":"#/components/schemas/DocumentProductEntity","ad_hoc_tax_credits":"#/components/schemas/DocumentProductEntity","ad_hoc_financing":"#/components/schemas/DocumentProductEntity","ad_hoc_local_grants":"#/components/schemas/DocumentProductEntity","ad_hoc_federal_grants":"#/components/schemas/DocumentProductEntity","custom":"#/components/schemas/DocumentProductEntity"}}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Rename a custom-named product (admin)","tags":["Organizations - Products"]}},"/v1/organizations/{orgId}/products/{orgProductId}/start-date":{"patch":{"description":"Admin-only. The product lapses `periodYears` after this date. Other products are rejected.","operationId":"OrgProductsController_updateStartDate","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgProductStartDateDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RndTaxCreditProductEntity"},{"$ref":"#/components/schemas/RndTaxCreditAmendmentProductEntity"},{"$ref":"#/components/schemas/Act60ProductEntity"},{"$ref":"#/components/schemas/Act60AmendmentProductEntity"},{"$ref":"#/components/schemas/DocumentProductEntity"},{"$ref":"#/components/schemas/TourismTaxCreditProductEntity"}],"discriminator":{"propertyName":"type","mapping":{"rnd_tax_credit":"#/components/schemas/RndTaxCreditProductEntity","rnd_tax_credit_amendment":"#/components/schemas/RndTaxCreditAmendmentProductEntity","act_60":"#/components/schemas/Act60ProductEntity","act_60_amendment":"#/components/schemas/Act60AmendmentProductEntity","certificate_of_organization":"#/components/schemas/DocumentProductEntity","articles_of_incorporation":"#/components/schemas/DocumentProductEntity","ein_letter":"#/components/schemas/DocumentProductEntity","operating_agreement_bylaws":"#/components/schemas/DocumentProductEntity","department_of_state_registrations":"#/components/schemas/DocumentProductEntity","treasury_suri_registration":"#/components/schemas/DocumentProductEntity","child_support_registration":"#/components/schemas/DocumentProductEntity","crim_registration":"#/components/schemas/DocumentProductEntity","state_insurance_fund_registration":"#/components/schemas/DocumentProductEntity","labor_human_resources_registration":"#/components/schemas/DocumentProductEntity","incentives_portal_registration":"#/components/schemas/DocumentProductEntity","merchants_registration_certificate":"#/components/schemas/DocumentProductEntity","single_permit_application":"#/components/schemas/DocumentProductEntity","provisional_municipal_license_tax":"#/components/schemas/DocumentProductEntity","local_pr_bank_account":"#/components/schemas/DocumentProductEntity","manufacturers_id":"#/components/schemas/DocumentProductEntity","non_withholding_waiver":"#/components/schemas/DocumentProductEntity","municipal_decree":"#/components/schemas/DocumentProductEntity","sales_use_tax":"#/components/schemas/DocumentProductEntity","professional_services_rendered":"#/components/schemas/DocumentProductEntity","volume_of_business":"#/components/schemas/DocumentProductEntity","incentive_income_tax_return":"#/components/schemas/DocumentProductEntity","informative_returns":"#/components/schemas/DocumentProductEntity","personal_property_tax":"#/components/schemas/DocumentProductEntity","annual_report":"#/components/schemas/DocumentProductEntity","exempt_annual_report":"#/components/schemas/DocumentProductEntity","federal_income_tax_return":"#/components/schemas/DocumentProductEntity","irs_form_8898":"#/components/schemas/DocumentProductEntity","income_tax_return":"#/components/schemas/DocumentProductEntity","state_income_tax_return":"#/components/schemas/DocumentProductEntity","filing_extension":"#/components/schemas/DocumentProductEntity","tourism_tax_credit":"#/components/schemas/TourismTaxCreditProductEntity","financing":"#/components/schemas/DocumentProductEntity","federal_grant":"#/components/schemas/DocumentProductEntity","eif_grant":"#/components/schemas/DocumentProductEntity","me_grant":"#/components/schemas/DocumentProductEntity","other_grant":"#/components/schemas/DocumentProductEntity","ad_hoc_foundational_services":"#/components/schemas/DocumentProductEntity","ad_hoc_incentives":"#/components/schemas/DocumentProductEntity","ad_hoc_tax_compliance":"#/components/schemas/DocumentProductEntity","ad_hoc_tax_credits":"#/components/schemas/DocumentProductEntity","ad_hoc_financing":"#/components/schemas/DocumentProductEntity","ad_hoc_local_grants":"#/components/schemas/DocumentProductEntity","ad_hoc_federal_grants":"#/components/schemas/DocumentProductEntity","custom":"#/components/schemas/DocumentProductEntity"}}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Set when an \"every N years\" product starts (admin)","tags":["Organizations - Products"]}},"/v1/organizations/{orgId}/products/{orgProductId}/deadline":{"patch":{"description":"Admin-only. Both are calendar days in Puerto Rico time and both are sent: a date given is this service's own, null follows the product's rule (`deadlineMonth`/`deadlineDay` and the Extended date pair on the product). The Extended date must be after the deadline in use, and is refused when the product is not extendable (`isExtendable`); such a product keeps its hidden one while it is after the deadline in use. The daily reminders count down to the dates in use.","operationId":"OrgProductsController_updateDeadline","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgProductDeadlineDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RndTaxCreditProductEntity"},{"$ref":"#/components/schemas/RndTaxCreditAmendmentProductEntity"},{"$ref":"#/components/schemas/Act60ProductEntity"},{"$ref":"#/components/schemas/Act60AmendmentProductEntity"},{"$ref":"#/components/schemas/DocumentProductEntity"},{"$ref":"#/components/schemas/TourismTaxCreditProductEntity"}],"discriminator":{"propertyName":"type","mapping":{"rnd_tax_credit":"#/components/schemas/RndTaxCreditProductEntity","rnd_tax_credit_amendment":"#/components/schemas/RndTaxCreditAmendmentProductEntity","act_60":"#/components/schemas/Act60ProductEntity","act_60_amendment":"#/components/schemas/Act60AmendmentProductEntity","certificate_of_organization":"#/components/schemas/DocumentProductEntity","articles_of_incorporation":"#/components/schemas/DocumentProductEntity","ein_letter":"#/components/schemas/DocumentProductEntity","operating_agreement_bylaws":"#/components/schemas/DocumentProductEntity","department_of_state_registrations":"#/components/schemas/DocumentProductEntity","treasury_suri_registration":"#/components/schemas/DocumentProductEntity","child_support_registration":"#/components/schemas/DocumentProductEntity","crim_registration":"#/components/schemas/DocumentProductEntity","state_insurance_fund_registration":"#/components/schemas/DocumentProductEntity","labor_human_resources_registration":"#/components/schemas/DocumentProductEntity","incentives_portal_registration":"#/components/schemas/DocumentProductEntity","merchants_registration_certificate":"#/components/schemas/DocumentProductEntity","single_permit_application":"#/components/schemas/DocumentProductEntity","provisional_municipal_license_tax":"#/components/schemas/DocumentProductEntity","local_pr_bank_account":"#/components/schemas/DocumentProductEntity","manufacturers_id":"#/components/schemas/DocumentProductEntity","non_withholding_waiver":"#/components/schemas/DocumentProductEntity","municipal_decree":"#/components/schemas/DocumentProductEntity","sales_use_tax":"#/components/schemas/DocumentProductEntity","professional_services_rendered":"#/components/schemas/DocumentProductEntity","volume_of_business":"#/components/schemas/DocumentProductEntity","incentive_income_tax_return":"#/components/schemas/DocumentProductEntity","informative_returns":"#/components/schemas/DocumentProductEntity","personal_property_tax":"#/components/schemas/DocumentProductEntity","annual_report":"#/components/schemas/DocumentProductEntity","exempt_annual_report":"#/components/schemas/DocumentProductEntity","federal_income_tax_return":"#/components/schemas/DocumentProductEntity","irs_form_8898":"#/components/schemas/DocumentProductEntity","income_tax_return":"#/components/schemas/DocumentProductEntity","state_income_tax_return":"#/components/schemas/DocumentProductEntity","filing_extension":"#/components/schemas/DocumentProductEntity","tourism_tax_credit":"#/components/schemas/TourismTaxCreditProductEntity","financing":"#/components/schemas/DocumentProductEntity","federal_grant":"#/components/schemas/DocumentProductEntity","eif_grant":"#/components/schemas/DocumentProductEntity","me_grant":"#/components/schemas/DocumentProductEntity","other_grant":"#/components/schemas/DocumentProductEntity","ad_hoc_foundational_services":"#/components/schemas/DocumentProductEntity","ad_hoc_incentives":"#/components/schemas/DocumentProductEntity","ad_hoc_tax_compliance":"#/components/schemas/DocumentProductEntity","ad_hoc_tax_credits":"#/components/schemas/DocumentProductEntity","ad_hoc_financing":"#/components/schemas/DocumentProductEntity","ad_hoc_local_grants":"#/components/schemas/DocumentProductEntity","ad_hoc_federal_grants":"#/components/schemas/DocumentProductEntity","custom":"#/components/schemas/DocumentProductEntity"}}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Set the deadline and Extended date of a service (admin)","tags":["Organizations - Products"]}},"/v1/organizations/{orgId}/products/{orgProductId}/admin-status":{"patch":{"description":"Set the department-specific admin status for a non-R&D-Tax-Credit product. The client-facing status and filter are derived from this value. Needs `update OrgProduct`; the organization's KAMs, while admins, may also move a product from Backlog to Not Started.","operationId":"OrgProductsController_setAdminStatus","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAdminStatusDto"}}}},"responses":{"200":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update the admin (Layer-3) status of a product","tags":["Organizations - Products"]}},"/v1/act60-amendments/{orgProductId}/metadata":{"get":{"description":"Returns amendment type, source product ID, row ID map, and organization ID.","operationId":"Act60AmendmentController_getMetadata","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Amendment metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmendmentMetadataEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get amendment metadata","tags":["Act 60 Amendment"]}},"/v1/act60-amendments/{orgProductId}/type":{"patch":{"description":"Set the amendment type which determines the amendment flow.","operationId":"Act60AmendmentController_setAmendmentType","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAmendmentTypeDto"}}}},"responses":{"200":{"description":"Amendment type set successfully"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Set amendment type","tags":["Act 60 Amendment"]}},"/v1/act60-amendments/{orgProductId}/upload":{"put":{"description":"Submit files and description for amendment (scenarios A/C/D). The client may include `amendmentType` on first submission to atomically set the type alongside the upload save.","operationId":"Act60AmendmentController_submitUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitAmendmentUploadDto"}}}},"responses":{"200":{"description":"Amendment upload submitted successfully"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Submit amendment upload","tags":["Act 60 Amendment"]}},"/v1/act60-amendments/{orgProductId}/files":{"get":{"description":"Get file metadata for files uploaded as part of the amendment.","operationId":"Act60AmendmentController_getFiles","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Amendment files retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileUploadResultEntity"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get amendment uploaded files","tags":["Act 60 Amendment"]}},"/v1/organizations/{orgId}/users":{"post":{"description":"Assign one or more users to an organization","operationId":"OrgUsersController_assign","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignUsersDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgUserEntity"}}}}}},"security":[{"cookie":[]}],"summary":"Assign users to organization","tags":["Organizations - Users"]},"get":{"description":"Get all users assigned to an organization","operationId":"OrgUsersController_findMany","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgUserEntity"}}}}}},"security":[{"cookie":[]}],"summary":"List users for organization","tags":["Organizations - Users"]}},"/v1/organizations/{orgId}/users/{userId}":{"patch":{"description":"Update notification settings for a user in an organization","operationId":"OrgUsersController_update","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"userId","required":true,"in":"path","description":"User ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgUserDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUserEntity"}}}}},"security":[{"cookie":[]}],"summary":"Update user settings","tags":["Organizations - Users"]},"delete":{"description":"Remove a user assignment from an organization","operationId":"OrgUsersController_remove","parameters":[{"name":"userId","required":true,"in":"path","description":"User ID","schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"cookie":[]}],"summary":"Remove user from organization","tags":["Organizations - Users"]}},"/v1/product-submissions":{"get":{"operationId":"ProductSubmissionsController_findMany","parameters":[{"name":"orgProductId","required":false,"in":"query","schema":{"format":"uuid","type":"string"}},{"name":"userId","required":false,"in":"query","schema":{"format":"uuid","type":"string"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"size","required":false,"in":"query","schema":{"minimum":1,"default":10,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSubmissionListResponseDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get all product submissions with pagination and filtering","tags":["Product Submissions"]}},"/v1/product-submissions/{id}":{"get":{"operationId":"ProductSubmissionsController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSubmissionEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get product submission by ID","tags":["Product Submissions"]}},"/v1/product-submissions/{id}/status":{"patch":{"operationId":"ProductSubmissionsController_updateStatus","parameters":[{"name":"id","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubmissionStatusDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSubmissionEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update product submission status","tags":["Product Submissions"]}},"/v1/organizations/{orgId}/products/{orgProductId}/notes":{"get":{"description":"Root notes only, newest first, each with its thread summary.","operationId":"OrgProductNotesController_findMany","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgProductNoteEntity"}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List the notes on an organization's product","tags":["Organizations - Product Notes"]},"post":{"operationId":"OrgProductNotesController_create","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNoteWithMentionsDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProductNoteEntity"}}}}},"security":[{"cookie":[]}],"summary":"Add a note to an organization's product","tags":["Organizations - Product Notes"]}},"/v1/organizations/{orgId}/products/{orgProductId}/notes/{noteId}":{"patch":{"description":"Only the note's author may edit it.","operationId":"OrgProductNotesController_update","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNoteWithMentionsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProductNoteEntity"}}}}},"security":[{"cookie":[]}],"summary":"Edit a note","tags":["Organizations - Product Notes"]},"delete":{"description":"Only the note's author may delete it. Its replies go with it.","operationId":"OrgProductNotesController_delete","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"security":[{"cookie":[]}],"summary":"Delete a note","tags":["Organizations - Product Notes"]}},"/v1/organizations/{orgId}/products/{orgProductId}/notes/{noteId}/replies":{"get":{"description":"Every reply on a note, oldest first.","operationId":"OrgProductNotesController_findReplies","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NoteReplyEntity"}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List replies in a note thread","tags":["Organizations - Product Notes"]},"post":{"operationId":"OrgProductNotesController_createReply","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNoteWithMentionsDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteReplyEntity"}}}}},"security":[{"cookie":[]}],"summary":"Reply to a note","tags":["Organizations - Product Notes"]}},"/v1/organizations/{orgId}/products/{orgProductId}/notes/{noteId}/replies/{replyId}":{"patch":{"description":"Only the reply's author may edit it.","operationId":"OrgProductNotesController_updateReply","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}},{"name":"replyId","required":true,"in":"path","description":"Reply ID","schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNoteWithMentionsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteReplyEntity"}}}}},"security":[{"cookie":[]}],"summary":"Edit a reply","tags":["Organizations - Product Notes"]},"delete":{"description":"Only the reply's author may delete it.","operationId":"OrgProductNotesController_deleteReply","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}},{"name":"replyId","required":true,"in":"path","description":"Reply ID","schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"security":[{"cookie":[]}],"summary":"Delete a reply","tags":["Organizations - Product Notes"]}},"/v1/organizations/{orgId}/products/{orgProductId}/notes/{noteId}/read":{"post":{"description":"Move the caller's read marker on a note thread forward.","operationId":"OrgProductNotesController_markThreadRead","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkNoteThreadReadDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Mark a note thread read","tags":["Organizations - Product Notes"]}},"/v1/organizations/{orgId}/products/{orgProductId}/activity":{"get":{"description":"Audit entries of one organization product, newest first, each flagged when it is new since the product was last reviewed","operationId":"OrgProductActivityController_findMany","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}},{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProductActivityResponseDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List activity for organization product","tags":["Organizations - Product Activity"]}},"/v1/organizations/{orgId}/products/{orgProductId}/time-log":{"get":{"description":"Get the total logged time of a service whose product has Time Log on, plus its hourly rate when the product has rates; what the time adds up to shows on the Accounting page only, for ad hoc services (internal admins only)","operationId":"OrgProductTimeLogController_getSummary","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProductTimeLogSummaryDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get product time log summary","tags":["Organizations - Product Time Log"]}},"/v1/organizations/{orgId}/products/{orgProductId}/time-log/hourly-rate":{"patch":{"description":"Set the organization's hourly rate of a service whose product has rates; the Accounting page prices its open ad hoc record at it, while a billed record keeps the rate it was billed at (internal admins only)","operationId":"OrgProductTimeLogController_updateHourlyRate","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgProductHourlyRateDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProductTimeLogSummaryDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update product hourly rate","tags":["Organizations - Product Time Log"]}},"/v1/organizations/{orgId}/products/{orgProductId}/time-log/entries":{"get":{"description":"Get a page of the time log entries of a service, newest work day first (internal admins only)","operationId":"OrgProductTimeLogController_findTimeLogs","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}},{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProductTimeLogsResponseDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List product time log entries","tags":["Organizations - Product Time Log"]},"post":{"description":"Add a time log entry to a service: the work day, 15m to 24h, and a description of at least 50 characters (internal admins only)","operationId":"OrgProductTimeLogController_logTime","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProductTimeLogEntryDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProductTimeLogDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Log time on a product","tags":["Organizations - Product Time Log"]}},"/v1/organizations/{orgId}/products/{orgProductId}/time-log/entries/{timeLogId}":{"patch":{"description":"Change a time log entry's date, time or description, whoever logged it; an omitted field keeps its value and none can be cleared, and totals are recalculated automatically (internal admins only)","operationId":"OrgProductTimeLogController_updateTimeLog","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}},{"name":"timeLogId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgProductTimeLogEntryDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProductTimeLogDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Edit a product time log entry","tags":["Organizations - Product Time Log"]},"delete":{"description":"Delete a time log entry from a service; totals are recalculated automatically (internal admins only)","operationId":"OrgProductTimeLogController_deleteTimeLog","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}},{"name":"timeLogId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete a product time log entry","tags":["Organizations - Product Time Log"]}},"/v1/profile/assigned-services":{"get":{"description":"Services with Time Log on that are assigned to the current admin (a tax credit application part assignment counts), on organizations that are not archived (internal admins only)","operationId":"WorkLogController_findAssignedServices","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkLogServiceListDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List the services the current admin can log work on","tags":["Profile - Work Log"]}},"/v1/profile/work-log-filters":{"get":{"description":"The organizations and services the current admin’s own hours, personal expenses and organization expenses are on — services with Time Log off and organizations they have left included (internal admins only)","operationId":"WorkLogController_findFilterOptions","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkLogFilterOptionsDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List what the current admin’s work log lists can be filtered by","tags":["Profile - Work Log"]}},"/v1/profile/time-logs":{"get":{"description":"A page of the current admin’s own time entries across organizations, newest work day first (internal admins only)","operationId":"WorkLogController_findTimeLogs","parameters":[{"name":"size","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"organizationIds","required":false,"in":"query","description":"Only entries on one of these organizations.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"orgProductIds","required":false,"in":"query","description":"Only entries on one of these services.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"dateFrom","required":false,"in":"query","description":"Start of the date range as `YYYY-MM-DD`, inclusive.","schema":{"format":"date","type":"string"}},{"name":"dateTo","required":false,"in":"query","description":"End of the date range as `YYYY-MM-DD`, inclusive.","schema":{"format":"date","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileTimeLogsResponseDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List the time the current admin logged","tags":["Profile - Work Log"]},"post":{"description":"Adds a time entry by the current admin to a service with Time Log assigned to them, on an organization that is not archived (403 otherwise); it shows in the service’s Log history too (internal admins only)","operationId":"WorkLogController_logTime","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProfileTimeLogDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileTimeLogDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Log time on an assigned service","tags":["Profile - Work Log"]}},"/v1/profile/time-logs/{timeLogId}":{"patch":{"description":"Changes the date, time or description of the current admin’s own entry while the service is still assigned to them and its organization is not archived (403 otherwise), also once the product’s Time Log is off, until its ad hoc record is billed (409); an omitted field keeps its value (internal admins only)","operationId":"WorkLogController_updateTimeLog","parameters":[{"name":"timeLogId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgProductTimeLogEntryDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileTimeLogDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Edit a time entry the current admin logged","tags":["Profile - Work Log"]},"delete":{"description":"Deletes the current admin’s own entry while the service is still assigned to them and its organization is not archived (403 otherwise), also once the product’s Time Log is off, until its ad hoc record is billed (409) (internal admins only)","operationId":"WorkLogController_deleteTimeLog","parameters":[{"name":"timeLogId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete a time entry the current admin logged","tags":["Profile - Work Log"]}},"/v1/rnd/{orgProductId}/aup":{"get":{"operationId":"RndAupController_get","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndAupEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"tags":["R&D AUP"]}},"/v1/rnd/{orgProductId}/aup/financial-model/{step}":{"patch":{"operationId":"RndAupController_updateFinancialModelItem","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"step","required":true,"in":"path","schema":{"$ref":"#/components/schemas/RndAupFinancialModelStep"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRndAupFinancialModelItemDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndAupFinancialModelItemEntity"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"tags":["R&D AUP"]}},"/v1/rnd/{orgProductId}/aup/required-documents/sections":{"post":{"operationId":"RndAupController_createRequiredDocumentSection","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRndAupRequiredDocumentSectionDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndAupRequiredDocumentSectionEntity"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"tags":["R&D AUP"]}},"/v1/rnd/{orgProductId}/aup/required-documents/sections/{sectionId}":{"patch":{"operationId":"RndAupController_updateRequiredDocumentSection","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"sectionId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRndAupRequiredDocumentSectionDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"tags":["R&D AUP"]}},"/v1/rnd/{orgProductId}/aup/required-documents/sections/bulk-delete":{"post":{"operationId":"RndAupController_deleteRequiredDocumentSections","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndAupRequiredDocumentSectionIdsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndAupRequiredDocumentSectionsBulkResultDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"tags":["R&D AUP"]}},"/v1/rnd/{orgProductId}/aup/required-documents/sections/bulk-status":{"post":{"operationId":"RndAupController_updateRequiredDocumentsStatus","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateRndAupRequiredDocumentStatusDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndAupRequiredDocumentSectionsBulkResultDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"tags":["R&D AUP"]}},"/v1/rnd/{orgProductId}/aup/required-documents/sections/{sectionId}/content":{"patch":{"operationId":"RndAupController_updateRequiredDocument","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"sectionId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRndAupRequiredDocumentDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"tags":["R&D AUP"]}},"/v1/rnd/{orgProductId}/aup/required-documents/submit":{"post":{"operationId":"RndAupController_submitRequiredDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"tags":["R&D AUP"]}},"/v1/rnd/{orgProductId}/aup/required-documents/sections/{sectionId}/admin-note":{"patch":{"operationId":"RndAupController_updateRequiredDocumentAdminNote","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"sectionId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRndAupRequiredDocumentAdminNoteDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"tags":["R&D AUP"]}},"/v1/rnd/{orgProductId}/aup/required-documents/request-docs-template":{"get":{"operationId":"RndAupController_getRequiredDocumentsRequestTemplate","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"reRequest","required":false,"in":"query","description":"The re-upload or clarification wording instead of the first request","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndAupEmailTemplateDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"tags":["R&D AUP"]}},"/v1/rnd/{orgProductId}/aup/required-documents/request-docs-recipients":{"get":{"operationId":"RndAupController_listRequiredDocumentsRequestRecipients","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RndAupRequiredDocumentsRequestRecipientDto"}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"tags":["R&D AUP"]}},"/v1/rnd/{orgProductId}/aup/cpa-recipients":{"get":{"operationId":"RndAupController_listCpaRecipients","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RndAupCpaRecipientDto"}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"tags":["R&D AUP"]}},"/v1/rnd/{orgProductId}/aup/required-documents/request-docs":{"post":{"operationId":"RndAupController_requestRequiredDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestRndAupRequiredDocumentsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndAupRequiredDocumentsRequestResultDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"tags":["R&D AUP"]}},"/v1/rnd/{orgProductId}/aup/files":{"get":{"description":"Returns direct download URLs for the approved ledgers and, for admin-portal users, the accepted CPA workbook; the current sample selection; and whether there is a financial ledger to export expenses from.","operationId":"RndAupDataController_getFilesManifest","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AupFilesManifestEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get AUP file manifest","tags":["R&D AUP Data"]}},"/v1/rnd/{orgProductId}/aup/files/template":{"get":{"description":"Streams a freshly built XLSX — Addendum A Schedules 1–3, Addendum B, Mapping — for every AUP category, headed with the organization and period. Structure only: no amounts.","operationId":"RndAupDataController_downloadTemplate","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Excel file download","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Download the CPA workbook template","tags":["R&D AUP Data"]}},"/v1/rnd/{orgProductId}/aup/sample-selection":{"get":{"operationId":"RndAupDataController_getSampleSelection","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Returns null when nothing is uploaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AupSampleSelectionEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get current sample-selection metadata (null if not uploaded)","tags":["R&D AUP Data"]},"post":{"description":"Merges the workbook into AUP Data and Vouching in one transaction, after checking it again: it writes only when the result still has the reviewed `checksum`, and otherwise answers `needs_review` with the fresh check. Rows match DECA's samples by their hidden DECA Ref, else by category and Sample #; a blank cell keeps the current value and nothing in DECA is deleted, so notes, document links and approvals stay — an amount or category change resets that sample's approval, as an edit does. 409 while another import of the same AUP runs. Admin portal only: clients hold `create` for send-to-review alone.","operationId":"RndAupDataController_importSampleSelection","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportSampleSelectionDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AupWorkbookImportResultDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Import a checked CPA workbook (admin portal)","tags":["R&D AUP Data"]},"delete":{"description":"Deletes every imported workbook file, the transactions, every transaction note and highlighted document line, and the imported AUP Data. Supporting documents stay uploaded and reappear as unlinked. 409 while an import of the same AUP runs. `delete AupSampleSelection` is held by `cpa_external` and `super_admin` only.","operationId":"RndAupDataController_deleteSampleSelection","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":""},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete the current sample selection","tags":["R&D AUP Data"]}},"/v1/rnd/{orgProductId}/aup/sample-selection/check":{"post":{"description":"Provide the storageKey returned by /files/upload. Reads and validates the workbook and works out what an import would write, without writing anything: the issues found (errors block the import), the counts of new, updated and unchanged samples, and the checksum the import needs.","operationId":"RndAupDataController_checkSampleSelection","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSampleSelectionDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AupWorkbookCheckDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Check a completed CPA workbook before importing it (admin portal)","tags":["R&D AUP Data"]}},"/v1/rnd/{orgProductId}/aup/sample-selection/rows":{"get":{"description":"Returns a page of rows grouped by category and ordered by the row number (#) within each category. Use `/sample-selection/aggregates` to load the per-category breakdown for filter UI.","operationId":"RndAupDataController_listSampleSelectionRows","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"category","required":false,"in":"query","schema":{"$ref":"#/components/schemas/RndAupExpenseCategory"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AupSampleSelectionRowsPageEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List parsed sample-selection rows (page-paginated)","tags":["R&D AUP Data"]}},"/v1/rnd/{orgProductId}/aup/sample-selection/aggregates":{"get":{"description":"Returns total row count, total amount, and per-category breakdown across the entire sample selection. Call once to populate filter UI, then call `/sample-selection/rows` for paginated rows.","operationId":"RndAupDataController_getSampleSelectionAggregates","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AupSampleSelectionAggregatesDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get sample-selection aggregates (totals + per-category)","tags":["R&D AUP Data"]}},"/v1/rnd/{orgProductId}/aup/sample-selection/document":{"get":{"description":"Lists the samples of the latest accepted CPA workbook by category, as the file holds them: Vouching's later edits and deletions don't show. A selection uploaded with the previous one-sheet template answers `isLegacyTemplate`; list its samples with `/sample-selection/rows`. 404 without a sample selection, 422 when the stored file can no longer be read.","operationId":"RndAupDataController_getSampleSelectionDocument","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AupSampleSelectionDocumentDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Read the accepted CPA workbook (admin portal)","tags":["R&D AUP Data"]}},"/v1/rnd/{orgProductId}/aup/addendum-a":{"get":{"description":"Every AUP category with its six saved Schedule 3 figures, and the totals. A null figure is N/A, never a zero. Null until a CPA workbook has been accepted.","operationId":"RndAupDataController_getAddendumA","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Returns null until a CPA workbook has been accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AupAddendumADto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Get Addendum A (admin portal)","tags":["R&D AUP Data"]}},"/v1/rnd/{orgProductId}/aup/addendum-a/categories/{category}":{"patch":{"description":"Saves the figures sent exactly as entered — nothing is recalculated from them, and null clears one to N/A. The edit is not protected: accepting a CPA workbook or changing the sample or its misstatement marks recalculates the category and replaces it.","operationId":"RndAupDataController_updateAddendumACategory","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"category","required":true,"in":"path","description":"AUP expense category","schema":{"$ref":"#/components/schemas/RndAupExpenseCategory"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAupAddendumACategoryDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Edit a category's Addendum A figures (admin portal)","tags":["R&D AUP Data"]}},"/v1/rnd/{orgProductId}/aup/addendum-a/export":{"get":{"description":"Every AUP category with its saved figures and the totals, rounded to two decimals; N/A where a figure is blank.","operationId":"RndAupDataController_exportAddendumA","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Excel file download","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Export Addendum A as XLSX (admin portal)","tags":["R&D AUP Data"]}},"/v1/rnd/{orgProductId}/aup/expenses/export":{"get":{"operationId":"RndAupDataController_exportExpenses","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Excel file download","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Export the R&D expenses summary as a single-sheet XLSX","tags":["R&D AUP Data"]}},"/v1/rnd/{orgProductId}/aup/transactions/export":{"get":{"description":"The same workbook as the financial ledger summary's Export Transactions, for the AUP tab: gated on `read AupSampleSelection` like the vouching summary download, so the external CPA working the AUP reaches it without `read FinancialLedger`.","operationId":"RndAupDataController_exportTransactions","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Excel file download","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Export the R&D-categorized transactions with their R&D allocation and eligible amount as XLSX (admin portal)","tags":["R&D AUP Data"]}},"/v1/rnd/{orgProductId}/financial-ledger/employees":{"get":{"description":"Retrieve parsed employees from Payroll Ledger file","operationId":"RndFinancialLedgerController_getEmployees","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Employees retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RndPayrollEmployeeEntity"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get employees for allocation","tags":["R&D Financial Ledger"]}},"/v1/rnd/{orgProductId}/financial-ledger/accounts":{"get":{"description":"Retrieve parsed primary accounts from General Ledger file","operationId":"RndFinancialLedgerController_getAccounts","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Accounts retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RndGeneralLedgerAccountEntity"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get accounts for allocation","tags":["R&D Financial Ledger"]}},"/v1/rnd/{orgProductId}/financial-ledger/summary/export":{"get":{"operationId":"RndSummaryController_exportExcel","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Excel file download","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Export R&D summary as Excel","tags":["R&D Financial Ledger - Admin Summary"]}},"/v1/rnd/{orgProductId}/financial-ledger/summary/export-transactions":{"get":{"operationId":"RndSummaryController_exportTransactions","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Excel file download","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Export R&D-categorized transactions as Excel","tags":["R&D Financial Ledger - Admin Summary"]}},"/v1/rnd/{orgProductId}/financial-ledger/summary":{"get":{"operationId":"RndSummaryController_getCategorySummary","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndSummaryEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Get R&D summary","tags":["R&D Financial Ledger - Admin Summary"]}},"/v1/rnd/{orgProductId}/financial-ledger/summary/employees":{"get":{"operationId":"RndSummaryController_getEmployees","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeSummaryResponseDto"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Get employees summary","tags":["R&D Financial Ledger - Admin Summary"]},"patch":{"operationId":"RndSummaryController_updateEmployeeAllocations","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchUpdateEmployeeAllocationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeSummaryResponseDto"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Update employee allocations","tags":["R&D Financial Ledger - Admin Summary"]}},"/v1/rnd/{orgProductId}/financial-ledger/summary/vendors":{"get":{"operationId":"RndSummaryController_getVendors","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorSummaryResponseDto"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Get vendors summary","tags":["R&D Financial Ledger - Admin Summary"]},"patch":{"operationId":"RndSummaryController_updateVendorAllocations","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchUpdateVendorAllocationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorSummaryResponseDto"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Update vendor allocations","tags":["R&D Financial Ledger - Admin Summary"]}},"/v1/rnd/{orgProductId}/financial-ledger/summary/expenses":{"get":{"operationId":"RndSummaryController_getExpenses","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpensesSummaryResponseDto"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Get R&D expenses summary","tags":["R&D Financial Ledger - Admin Summary"]},"patch":{"operationId":"RndSummaryController_updateExpenseAllocations","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchUpdateExpenseAllocationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpensesSummaryResponseDto"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Update expense allocations","tags":["R&D Financial Ledger - Admin Summary"]}},"/v1/rnd/{orgProductId}/financial-ledger/summary/projects":{"get":{"operationId":"RndSummaryController_getProjects","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectSummaryEntity"}}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Get projects summary","tags":["R&D Financial Ledger - Admin Summary"]},"patch":{"operationId":"RndSummaryController_updateProjectAllocations","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchUpdateProjectAllocationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectSummaryEntity"}}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Update project allocations","tags":["R&D Financial Ledger - Admin Summary"]}},"/v1/rnd/{orgProductId}/vendor-allocation/transactions":{"get":{"description":"Retrieve all transactions with optional filters by account, vendor, or unassigned status","operationId":"VendorAllocationController_getTransactions","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"primaryAccount","required":false,"in":"query","description":"Filter by primary account name","schema":{"type":"string"}},{"name":"vendorId","required":false,"in":"query","description":"Filter by vendor ID","schema":{"format":"uuid","type":"string"}},{"name":"unassigned","required":false,"in":"query","description":"Filter unassigned transactions (vendorId IS NULL)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Transactions retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TransactionEntity"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List transactions","tags":["R&D Vendor Allocation"]}},"/v1/rnd/{orgProductId}/vendor-allocation/transactions/assign":{"patch":{"description":"Link transaction IDs to a specific vendor","operationId":"VendorAllocationController_assignTransactions","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignTransactionsDto"}}}},"responses":{"200":{"description":"Transactions assigned successfully"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Assign transactions to a vendor","tags":["R&D Vendor Allocation"]}},"/v1/rnd/{orgProductId}/vendor-allocation/transactions/unassign":{"patch":{"description":"Remove vendor assignment from transaction IDs","operationId":"VendorAllocationController_unassignTransactions","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnassignTransactionsDto"}}}},"responses":{"200":{"description":"Transactions unassigned successfully"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Unassign transactions from vendors","tags":["R&D Vendor Allocation"]}},"/v1/rnd/{orgProductId}/vendor-allocation/vendors":{"get":{"description":"Retrieve vendors created for transaction assignment with computed totals","operationId":"VendorAllocationController_getVendors","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Vendors retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VendorWithTotalsEntity"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List user-created vendors","tags":["R&D Vendor Allocation"]},"post":{"description":"Create a new vendor for transaction assignment","operationId":"VendorAllocationController_createVendor","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVendorDto"}}}},"responses":{"201":{"description":"Vendor created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorWithTotalsEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Create a vendor","tags":["R&D Vendor Allocation"]}},"/v1/rnd/{orgProductId}/vendor-allocation/vendors/{vendorId}":{"patch":{"description":"Update the name of an existing vendor","operationId":"VendorAllocationController_updateVendor","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"vendorId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVendorDto"}}}},"responses":{"200":{"description":"Vendor updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorWithTotalsEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update vendor name","tags":["R&D Vendor Allocation"]},"delete":{"description":"Delete a vendor. Assigned transactions become unassigned (available for reassignment)","operationId":"VendorAllocationController_deleteVendor","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"vendorId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Vendor deleted successfully"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete a vendor","tags":["R&D Vendor Allocation"]}},"/v1/bulk-uploads/init":{"post":{"description":"Validates the provider and declared files, creates a pending batch, and returns one v4 signed URL per file for the client to PUT directly to GCS.","operationId":"BulkUploadController_initBatch","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitBulkUploadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUploadInitEntity"}}}}},"security":[{"cookie":[]}],"summary":"Initialize a bulk upload","tags":["Bulk Uploads"]}},"/v1/bulk-uploads/{batchId}/start":{"post":{"description":"Verifies each uploaded object exists in GCS (re-reading size/contentType), then fires async processing. Returns immediately; poll GET /:batchId.","operationId":"BulkUploadController_startBatch","parameters":[{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUploadBatchEntity"}}}}},"security":[{"cookie":[]}],"summary":"Start processing a bulk upload","tags":["Bulk Uploads"]}},"/v1/bulk-uploads/{batchId}":{"get":{"operationId":"BulkUploadController_getBatch","parameters":[{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUploadBatchEntity"}}}}},"security":[{"cookie":[]}],"summary":"Get batch status (poll while processing)","tags":["Bulk Uploads"]}},"/v1/bulk-uploads/{batchId}/summary":{"get":{"operationId":"BulkUploadController_getBatchSummary","parameters":[{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUploadBatchSummaryEntity"}}}}},"security":[{"cookie":[]}],"summary":"Get batch counters plus a per-status breakdown","tags":["Bulk Uploads"]}},"/v1/bulk-uploads/{batchId}/documents":{"get":{"operationId":"BulkUploadController_listDocuments","parameters":[{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Opaque cursor returned by the previous page; omit for first page","schema":{"type":"string"}},{"name":"size","required":false,"in":"query","description":"Page size (max 500)","schema":{"minimum":1,"maximum":500,"type":"number"}},{"name":"processingStatus","required":false,"in":"query","schema":{"$ref":"#/components/schemas/IngestedDocumentProcessingStatus"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentsPageEntity"}}}}},"security":[{"cookie":[]}],"summary":"List a batch’s documents with their assignments (paginated)","tags":["Bulk Uploads"]}},"/v1/bulk-uploads/contexts/{contextType}/{contextId}/unassigned":{"get":{"operationId":"BulkUploadController_listUnassigned","parameters":[{"name":"contextType","required":true,"in":"path","schema":{"type":"string"}},{"name":"contextId","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Opaque cursor returned by the previous page; omit for first page","schema":{"type":"string"}},{"name":"size","required":false,"in":"query","description":"Page size (max 500)","schema":{"minimum":1,"maximum":500,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnassignedDocumentsPageEntity"}}}}},"security":[{"cookie":[]}],"summary":"List unassigned documents for a context (review queue)","tags":["Bulk Uploads"]}},"/v1/bulk-uploads/contexts/{contextType}/{contextId}/coverage":{"get":{"description":"Joins provider candidates against assigned documents. Missing/covered counts are derived here, never stored.","operationId":"BulkUploadController_getCoverage","parameters":[{"name":"contextType","required":true,"in":"path","schema":{"type":"string"}},{"name":"contextId","required":true,"in":"path","schema":{"type":"string"}},{"name":"missingOnly","required":false,"in":"query","description":"Return only targets that still have no assigned document","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoverageEntity"}}}}},"security":[{"cookie":[]}],"summary":"Per-target document coverage for a context","tags":["Bulk Uploads"]}},"/v1/bulk-uploads/documents/{documentId}/assignments":{"post":{"operationId":"BulkUploadController_manualAssign","parameters":[{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualAssignDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentAssignmentEntity"}}}}},"security":[{"cookie":[]}],"summary":"Manually assign a document to a target","tags":["Bulk Uploads"]}},"/v1/bulk-uploads/assignments/{assignmentId}/confirm":{"patch":{"operationId":"BulkUploadController_confirmAssignment","parameters":[{"name":"assignmentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmAssignmentDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentAssignmentEntity"}}}}},"security":[{"cookie":[]}],"summary":"Confirm or reject a needs-confirmation assignment","tags":["Bulk Uploads"]}},"/v1/bulk-uploads/documents/{documentId}":{"delete":{"operationId":"BulkUploadController_deleteDocument","parameters":[{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"security":[{"cookie":[]}],"summary":"Delete a document (cascades assignments + removes the GCS object)","tags":["Bulk Uploads"]}},"/v1/bulk-uploads/documents/{documentId}/replace":{"post":{"operationId":"BulkUploadController_replaceDocument","parameters":[{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestedDocumentEntity"}}}}},"security":[{"cookie":[]}],"summary":"Replace a document’s file and re-route + re-classify it","tags":["Bulk Uploads"]}},"/v1/bulk-uploads/documents/{documentId}/preview":{"get":{"description":"Redirects to a short-lived signed URL. A PDF or a JPEG, PNG, GIF or WebP image is served for the browser to show in place; any other file, and one refused as `unsupported_type`, downloads under its file name.","operationId":"BulkUploadController_previewDocument","parameters":[{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"302":{"description":"Redirect to a short-lived signed URL"}},"security":[{"cookie":[]}],"summary":"Preview or download a document","tags":["Bulk Uploads"]}},"/v1/rnd/{orgProductId}/aup/engagement-letter":{"get":{"operationId":"RndAupEngagementLetterController_get","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndAupEngagementLetterEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"tags":["R&D AUP Engagement Letter"]}},"/v1/rnd/{orgProductId}/aup/engagement-letter/recipients":{"get":{"description":"Returns the client users linked to the organization, for the sender (a DECA admin or the CPA manager) to choose who receives the Engagement Letter.","operationId":"RndAupEngagementLetterController_listRecipients","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EngagementLetterRecipientEntity"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List client recipients","tags":["R&D AUP Engagement Letter"]}},"/v1/rnd/{orgProductId}/aup/engagement-letter/request-upload/template":{"get":{"operationId":"RndAupEngagementLetterController_getUploadRequestTemplate","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndAupEmailTemplateDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"tags":["R&D AUP Engagement Letter"]}},"/v1/rnd/{orgProductId}/aup/engagement-letter/request-upload":{"post":{"description":"Emails the chosen CPA managers of the organization to upload the Engagement Letter.","operationId":"RndAupEngagementLetterController_requestUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendRndAupEmailDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndAupEmailDeliveryDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Notify CPA managers","tags":["R&D AUP Engagement Letter"]}},"/v1/rnd/{orgProductId}/aup/engagement-letter/upload":{"post":{"operationId":"RndAupEngagementLetterController_upload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadEngagementLetterDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndAupEngagementLetterEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"tags":["R&D AUP Engagement Letter"]}},"/v1/rnd/{orgProductId}/aup/engagement-letter/sender-view":{"post":{"description":"Returns a DocuSign sender view URL for placing the signature field on the uploaded Engagement Letter.","operationId":"RndAupEngagementLetterController_createSenderView","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEngagementLetterSenderViewDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngagementLetterSenderViewResponseDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Create DocuSign sender view URL","tags":["R&D AUP Engagement Letter"]}},"/v1/rnd/{orgProductId}/aup/engagement-letter/sender-view/complete":{"post":{"description":"Called by the frontend after the user returns from DocuSign. The backend re-fetches the envelope state and reconciles status.","operationId":"RndAupEngagementLetterController_completeSenderView","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndAupEngagementLetterEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Mark sender view as completed","tags":["R&D AUP Engagement Letter"]}},"/v1/rnd/{orgProductId}/aup/engagement-letter/send":{"post":{"operationId":"RndAupEngagementLetterController_send","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEngagementLetterDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndAupEngagementLetterEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}},"409":{"description":"Another send of the draft is under way, or it was sent or cancelled meanwhile; reload it to see where it stands."}},"security":[{"cookie":[]},{"cookie":[]}],"tags":["R&D AUP Engagement Letter"]}},"/v1/rnd/{orgProductId}/aup/engagement-letter/resend":{"post":{"description":"Asks DocuSign to email the signature request again to everyone still due to sign while the Engagement Letter awaits the client signature. The envelope and its signing link stay the same.","operationId":"RndAupEngagementLetterController_resend","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":""},"400":{"description":"The Engagement Letter or its DocuSign envelope is not awaiting a signature."},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}},"410":{"description":"DocuSign no longer has the Engagement Letter envelope."},"503":{"description":"DocuSign could not resend the signature request."}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Resend the signature request","tags":["R&D AUP Engagement Letter"]}},"/v1/organization-labels":{"get":{"operationId":"OrganizationLabelsController_findMany","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationLabelEntity"}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List the organization labels available to assign","tags":["Organization Labels"]},"post":{"operationId":"OrganizationLabelsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationLabelDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationLabelEntity"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Add a label to the catalogue","tags":["Organization Labels"]}},"/v1/organizations/{orgId}/products/{orgProductId}/questionnaire":{"get":{"description":"The copy this organization received when the product was assigned, with its own edits since. Read by the editor only, so it needs `update OrgProduct`; the organization's KAMs, while admins, may also read a product still in Backlog.","operationId":"OrgProductQuestionnaireController_findOne","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProductQuestionnaireDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get an organization product's questionnaire","tags":["Organizations - Product Questionnaire"]},"put":{"description":"Changes this organization's copy only — never the product template or another organization. Needs `update OrgProduct`; the organization's KAMs, while admins, may also set up a product still in Backlog. Locked tabs stay as they are. Send the loaded `version` and `saveEffect`: a save over a newer version, or after the product moved and saving would do something else, is refused (409). Answers to removed questions, or to questions whose type or options changed, are dropped; files under a removed section are released.","operationId":"OrgProductQuestionnaireController_update","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgProductQuestionnaireDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProductQuestionnaireDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Replace an organization product's questionnaire","tags":["Organizations - Product Questionnaire"]}},"/v1/organizations/{orgId}/products/{orgProductId}/questionnaire/sections/{sectionId}/documents":{"post":{"description":"Adds the uploaded files to one document section of a product with a questionnaire, whether or not the client has submitted, and tells the client. Each file is named after the section (\"Bank statements.pdf\", then numbered). Refused while the product is in Backlog, and past the section's file limit.","operationId":"OrgProductQuestionnaireController_addSectionDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}},{"name":"sectionId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddOrgProductSectionDocumentsDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Upload documents into a section on the client's behalf","tags":["Organizations - Product Questionnaire"]}},"/v1/organizations/{orgId}/products/{orgProductId}/questionnaire/sections/{sectionId}/library-documents":{"post":{"description":"Places documents of the organization's library in one document section of a product with a questionnaire, by their stored files: each keeps its name and is not copied, and one the section already holds is skipped; removing one later leaves it in the library. Refused while the product is in Backlog or withdrawn by the client, past the section's file limit, for a document the library does not offer for attaching, and for one the client cannot see (named in the error).","operationId":"OrgProductQuestionnaireController_addSectionLibraryDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}},{"name":"sectionId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddOrgProductSectionLibraryDocumentsDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Place library documents in a section on the client's behalf","tags":["Organizations - Product Questionnaire"]}},"/v1/organizations/{orgId}/products/{orgProductId}/questionnaire/sections/{sectionId}/documents/{documentId}/file":{"put":{"description":"Swaps the file behind one document of a section of a product with a questionnaire. The document keeps its name and its placements; the client is told, and the old file is deleted unless something else holds it. Refused while the product is in Backlog, for a document an AUP section holds (409), and with 404 when the document is not in that section.","operationId":"OrgProductQuestionnaireController_replaceSectionDocument","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}},{"name":"sectionId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceOrgProductSectionDocumentDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Replace a section document's file on the client's behalf","tags":["Organizations - Product Questionnaire"]}},"/v1/organizations/{orgId}/products/{orgProductId}/questionnaire/sections/{sectionId}/documents/{documentId}":{"delete":{"description":"Takes one document out of a section of a product with a questionnaire and counts the questionnaire's progress again. A client's own library upload stays in the library, unplaced; any other document nothing else holds is deleted with its file. 404 when the document is not in that section.","operationId":"OrgProductQuestionnaireController_removeSectionDocument","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}},{"name":"sectionId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Remove a document from a section","tags":["Organizations - Product Questionnaire"]}},"/v1/document-products/{orgProductId}":{"get":{"description":"Returns the questionnaire tabs, the submitted answers, the document sections, current submission status, and lock state for a section-based product.","operationId":"DocumentProductsController_getForm","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentFormEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get document form","tags":["Document Products"]}},"/v1/document-products/{orgProductId}/seen":{"post":{"description":"Clears the \"New\" label an organization-level questionnaire edit puts on the client's product card, up to the edit the client was shown. Admins opening the form leave it as it is.","operationId":"DocumentProductsController_markSeen","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkQuestionnaireSeenDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Mark the questionnaire seen","tags":["Document Products"]}},"/v1/document-products/{orgProductId}/submit":{"post":{"description":"Submit the answers and all sections at once. With a questionnaire, required questions need an answer and required sections a file or a written description; without one, the single section needs a file. Locks the form and notifies the assigned admin.","operationId":"DocumentProductsController_submit","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitDocumentFormDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentFormEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Submit document form","tags":["Document Products"]}},"/v1/drafts/{orgProductId}":{"put":{"description":"Create a new draft or update existing one for an organization's product","operationId":"DraftsController_createOrUpdate","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDraftDto"}}}},"responses":{"200":{"description":"Draft created or updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Create or update draft","tags":["Drafts"]},"get":{"description":"Retrieve a draft for an organization's product","operationId":"DraftsController_getOne","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Draft retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get draft","tags":["Drafts"]}},"/v1/organizations/{orgId}/products/{orgProductId}/tax-credit-application/assigned-admins":{"patch":{"description":"Set the per-year assigned admins for the General Information and Financial Information flows and, on an R&D Tax Credit, its AUP part. Naming a part the product lacks is refused with 400.","operationId":"TaxCreditApplicationController_setAssignedAdmins","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssignedAdminsDto"}}}},"responses":{"200":{"description":""}},"security":[{"cookie":[]}],"summary":"Assign the per-part admins of a tax credit application","tags":["Organizations - Product Tax Credit Application"]}},"/v1/organizations/{orgId}/products/{orgProductId}/tax-credit-application/part-status":{"patch":{"description":"Set the granular admin status for the General Information or Financial Information part, or the AUP part of an R&D Tax Credit (400 for a product without one). The client-facing status is derived from this value.","operationId":"TaxCreditApplicationController_setPartStatus","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePartStatusDto"}}}},"responses":{"200":{"description":""}},"security":[{"cookie":[]}],"summary":"Update the admin (Layer-3) status of a tax credit application part","tags":["Organizations - Product Tax Credit Application"]}},"/v1/organizations/{orgId}/products/{orgProductId}/tax-credit-application/status":{"patch":{"description":"Set the overall application status. It is stored and returned as given, independently of the part statuses. Sending to the government records the picked submission day and its fee; re-picking the current status corrects the figures it records, and re-picking the sent status keeps who sent it; government certification records the certification date and the certified eligible investment; government approval records the approval date, the approved amount and the Final Document files this save adds or removes. At any status but an approved one, the recorded approval and its Final Document set are kept but the client no longer sees the Final Document. Refused with 409 `application_changed` when the stored status is no longer `expectedApplicationStatus`.","operationId":"TaxCreditApplicationController_setStatus","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApplicationStatusDto"}}}},"responses":{"200":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update the overall (Layer-4) application status","tags":["Organizations - Product Tax Credit Application"]}},"/v1/organizations/{orgId}/products/{orgProductId}/tax-credit-application/details":{"get":{"description":"The government fee, submission, certification, approval, monetized and remaining tax credits, and the internal AUP vouching progress (admin only).","operationId":"TaxCreditApplicationController_getDetails","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxCreditApplicationDetailsDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the tax credit figures of the application","tags":["Organizations - Product Tax Credit Application"]},"patch":{"description":"Update the submission day, the certification, the approval and its Final Document set, or the monetized amount, without changing the application status. The submission day is accepted from `application_submitted` on (its submitter and the government fee are kept), the certification while the status is `application_certified` or an approved one, the approval and the monetized amount only while it is an approved one; otherwise refused with 409 `application_changed`.","operationId":"TaxCreditApplicationController_updateDetails","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTaxCreditApplicationDetailsDto"}}}},"responses":{"200":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Correct the tax credit figures of the application","tags":["Organizations - Product Tax Credit Application"]}},"/v1/organizations/{orgId}/products/{orgProductId}/tax-credit-application/final-documents":{"get":{"description":"The documents recorded with the government approval of the application. The client portal gets none while the status is not an approved one.","operationId":"TaxCreditApplicationController_getFinalDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentFileDto"}}}}}},"security":[{"cookie":[]}],"summary":"Get the Final Document set","tags":["Organizations - Product Tax Credit Application"]},"put":{"description":"Saves the Final Document set outside the approval, at any application status: the files this save adds and removes against `openedFinalDocumentStorageKeys`, the rest as stored. The approval saves the same set. An approved application keeps 1–5 files, one not yet approved 0–5; a merged set outside that is refused with 409 `application_changed`. The client sees the set only at an approved status.","operationId":"TaxCreditApplicationController_setFinalDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTaxCreditFinalDocumentsDto"}}}},"responses":{"200":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Upload, replace or remove Final Document files","tags":["Organizations - Product Tax Credit Application"]}},"/v1/profile/personal-expenses":{"get":{"description":"A page of the claims the current admin submitted, newest expense day first (internal admins only)","operationId":"ProfileExpensesController_findPersonalExpenses","parameters":[{"name":"size","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"organizationIds","required":false,"in":"query","description":"Only entries on one of these organizations.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"dateFrom","required":false,"in":"query","description":"Start of the date range as `YYYY-MM-DD`, inclusive.","schema":{"format":"date","type":"string"}},{"name":"dateTo","required":false,"in":"query","description":"End of the date range as `YYYY-MM-DD`, inclusive.","schema":{"format":"date","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalExpensesResponseDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List the current admin’s personal expense claims","tags":["Profile - Expenses"]},"post":{"description":"Records an expense the current admin paid, optionally for one of their organizations that is not archived (403 otherwise), with up to 5 files and the payment method it was paid with, which the catalogue must still offer (400 otherwise); it starts For Review with a file, Missing attachment without. Finance sees it in Personal Reimbursements (internal admins only)","operationId":"ProfileExpensesController_createPersonalExpense","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePersonalExpenseDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalExpenseDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Submit a personal expense claim","tags":["Profile - Expenses"]}},"/v1/profile/personal-expenses/{expenseId}":{"patch":{"description":"Changes the amount, date, description or payment method of the current admin’s own claim until finance moves it to Completed or Cancelled (409 after that); its organization and status stay; an omitted field keeps its value, and a payment method no longer in the catalogue is refused (400) unless it is the claim’s own. Files are changed through `/expenses/personal-expenses/:expenseId/attachments` (internal admins only)","operationId":"ProfileExpensesController_updatePersonalExpense","parameters":[{"name":"expenseId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExpenseDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalExpenseDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Edit a personal expense claim","tags":["Profile - Expenses"]},"delete":{"description":"Deletes the current admin’s own claim, with its files, until finance moves it to Completed or Cancelled (409 after that) (internal admins only)","operationId":"ProfileExpensesController_deletePersonalExpense","parameters":[{"name":"expenseId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete a personal expense claim","tags":["Profile - Expenses"]}},"/v1/profile/expense-organizations":{"get":{"description":"Every organization the current admin can read that is not archived — every one for a super admin or an admin with Preview all organizations, the ones they belong to otherwise — whether or not it has a service with Time Log on, by name (internal admins only)","operationId":"ProfileExpensesController_findExpenseOrganizations","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseOrganizationOptionsDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List the organizations the current admin can add an organization expense to","tags":["Profile - Expenses"]}},"/v1/profile/expense-organizations/{organizationId}/services":{"get":{"description":"The services with Time Log on of an organization `/profile/expense-organizations` lists, whether or not they are assigned to the current admin (internal admins only)","operationId":"ProfileExpensesController_findExpenseServices","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkLogServiceListDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"The organization is unknown, archived or one the current admin cannot read."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List the services of an organization an organization expense can be added on","tags":["Profile - Expenses"]}},"/v1/profile/org-expenses":{"get":{"description":"A page of the expenses the current admin logged on services, newest expense day first (internal admins only)","operationId":"ProfileExpensesController_findOrgProductExpenses","parameters":[{"name":"size","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"organizationIds","required":false,"in":"query","description":"Only entries on one of these organizations.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"orgProductIds","required":false,"in":"query","description":"Only entries on one of these services.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"dateFrom","required":false,"in":"query","description":"Start of the date range as `YYYY-MM-DD`, inclusive.","schema":{"format":"date","type":"string"}},{"name":"dateTo","required":false,"in":"query","description":"End of the date range as `YYYY-MM-DD`, inclusive.","schema":{"format":"date","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProductExpensesResponseDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List the organization expenses the current admin logged","tags":["Profile - Expenses"]},"post":{"description":"Records an expense against a service with Time Log on, in an organization the current admin can read that is not archived, assigned to them or not — or one assigned to them, as Log time takes (403 otherwise), with up to 5 files and the payment method it was paid with, which the catalogue must still offer (400 otherwise); it is billed in the organization’s Expense Reimbursements on the Accounting page (internal admins only)","operationId":"ProfileExpensesController_createOrgProductExpense","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgProductExpenseDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProductExpenseDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Log an expense on a service","tags":["Profile - Expenses"]}},"/v1/profile/org-expenses/{expenseId}":{"patch":{"description":"Changes the amount, date, description or payment method of an expense the current admin logged, while they can read its organization or the service is still assigned to them, and the organization is not archived (403 otherwise, and always once the organization is removed), until its reimbursement is billed (409); an omitted field keeps its value, and a payment method no longer in the catalogue is refused (400) unless it is the expense’s own. Files are changed through `/expenses/org-expenses/:expenseId/attachments` (internal admins only)","operationId":"ProfileExpensesController_updateOrgProductExpense","parameters":[{"name":"expenseId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExpenseDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProductExpenseDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Edit an organization expense","tags":["Profile - Expenses"]},"delete":{"description":"Deletes an expense the current admin logged, while they can read its organization or the service is still assigned to them, and the organization is not archived (403 otherwise, and always once the organization is removed), until its reimbursement is billed (409); its reimbursement goes with it (internal admins only)","operationId":"ProfileExpensesController_deleteOrgProductExpense","parameters":[{"name":"expenseId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete an organization expense","tags":["Profile - Expenses"]}},"/v1/finance/personal-expenses":{"get":{"description":"Claims with and without an organization, newest expense day first, optionally on some statuses only; a claim linked to an organization the caller cannot read is left out","operationId":"FinanceExpensesController_findPersonalExpenses","parameters":[{"name":"size","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"dateFrom","required":false,"in":"query","description":"Start of the date range as `YYYY-MM-DD`, inclusive.","schema":{"format":"date","type":"string"}},{"name":"dateTo","required":false,"in":"query","description":"End of the date range as `YYYY-MM-DD`, inclusive.","schema":{"format":"date","type":"string"}},{"name":"statuses","required":false,"in":"query","description":"Claims on any of these statuses.","schema":{"type":"array","items":{"$ref":"#/components/schemas/PersonalExpenseStatus"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalExpensesResponseDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List every admin’s personal expense claims","tags":["Finance - Expenses"]}},"/v1/finance/personal-expenses/{expenseId}":{"patch":{"description":"Any status; Completed needs a payment method (400), set before or in the same request. Approving (Pending Accounting) never marks the claim paid. 404 for a claim linked to an organization the caller cannot read.","operationId":"FinanceExpensesController_updateReimbursement","parameters":[{"name":"expenseId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePersonalExpenseReimbursementDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalExpenseDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Set a personal expense claim’s status or payment method","tags":["Finance - Expenses"]}},"/v1/expenses/personal-expenses/{expenseId}/attachments":{"post":{"description":"Its author, or a user with `update ServiceFinance` who can read its organization (404 for anyone else). Works until the claim is Completed or Cancelled (409). A claim holds at most 5 files (400). The first file moves Missing attachment to For Review. Returns the claim's files.","operationId":"ExpenseAttachmentsController_addToPersonalExpense","parameters":[{"name":"expenseId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddExpenseAttachmentsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExpenseAttachmentDto"}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"The claim is Completed or Cancelled."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Add files to a personal expense claim","tags":["Expenses - Files"]}},"/v1/expenses/personal-expenses/{expenseId}/attachments/{attachmentId}":{"delete":{"description":"Its author, or a user with `update ServiceFinance` who can read its organization (404 for anyone else). Until the claim is Completed or Cancelled (409). Removing the last file moves For Review back to Missing attachment. Returns the claim's files.","operationId":"ExpenseAttachmentsController_removeFromPersonalExpense","parameters":[{"name":"expenseId","required":true,"in":"path","schema":{"type":"string"}},{"name":"attachmentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExpenseAttachmentDto"}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"The claim is Completed or Cancelled."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Remove a file from a personal expense claim","tags":["Expenses - Files"]}},"/v1/expenses/org-expenses/{expenseId}/attachments":{"post":{"description":"Its author, or a user with `update ServiceFinance` who can read its organization (404 for anyone else). Works at any time, billed or not. An expense holds at most 5 files (400). Returns the expense's files.","operationId":"ExpenseAttachmentsController_addToOrgProductExpense","parameters":[{"name":"expenseId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddExpenseAttachmentsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExpenseAttachmentDto"}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Add files to an organization expense","tags":["Expenses - Files"]}},"/v1/expenses/org-expenses/{expenseId}/attachments/{attachmentId}":{"delete":{"description":"Its author, or a user with `update ServiceFinance` who can read its organization (404 for anyone else). Works at any time, billed or not. Returns the expense's files.","operationId":"ExpenseAttachmentsController_removeFromOrgProductExpense","parameters":[{"name":"expenseId","required":true,"in":"path","schema":{"type":"string"}},{"name":"attachmentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExpenseAttachmentDto"}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Remove a file from an organization expense","tags":["Expenses - Files"]}},"/v1/expense-payment-methods":{"get":{"description":"The methods not removed from the catalogue, by name. Open to every internal admin, who picks one when adding a personal or organization expense.","operationId":"ExpenseCataloguesController_findPaymentMethods","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExpensePaymentMethodEntity"}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List the ways an expense can be paid","tags":["Finance - Expenses"]},"post":{"description":"The name of a removed method, in any case, brings that method back instead of adding another.","operationId":"ExpenseCataloguesController_createPaymentMethod","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExpenseCatalogueItemDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpensePaymentMethodEntity"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"A payment method with the same name, ignoring case, exists."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Add a payment method to the catalogue","tags":["Finance - Expenses"]}},"/v1/expense-payment-methods/{paymentMethodId}":{"delete":{"description":"No picker offers it any more and a new pick of it is refused, while the claims and expenses that use it keep it and show its name. Adding its name again brings it back. Needs Delete Payment Methods (internal admins only)","operationId":"ExpenseCataloguesController_removePaymentMethod","parameters":[{"name":"paymentMethodId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"The caller cannot delete payment methods."},"404":{"description":"No payment method has this id, or it is already removed."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Remove a payment method from the catalogue","tags":["Finance - Expenses"]}},"/v1/organizations/{orgId}/products/{orgProductId}/ddec-responsible":{"patch":{"description":"Replaces the DDEC officers handling the application, kept in the order given. Refused with 400 for any product but an R&D Tax Credit or for more officers than allowed, and with 404 when an officer does not exist. Every change is written to the system log.","operationId":"DdecResponsibleController_setDdecResponsible","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"orgProductId","required":true,"in":"path","description":"Organization Product ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDdecResponsibleDto"}}}},"responses":{"200":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Set the DDEC Responsible of an R&D Tax Credit","tags":["Organizations - Product DDEC Responsible"]}},"/v1/ddec-officers":{"get":{"description":"The people at DDEC an R&D Tax Credit can be handled by and an R&D Supplemental Amendment letter can be addressed to, by name.","operationId":"DdecOfficersController_findMany","parameters":[{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Part of the name, in any case.","schema":{"maxLength":255,"type":"string"}},{"name":"ids","required":false,"in":"query","description":"Only the officers with these ids.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"onlyResponsible","required":false,"in":"query","description":"Only the officers who are the DDEC Responsible of at least one R&D Tax Credit in an organization the caller may read.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/DdecOfficerEntity"}}}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List the DDEC officers","tags":["R&D - DDEC Officers"]},"post":{"description":"Returns the officer with this name already, ignoring case and surrounding spaces, as they are; otherwise adds one.","operationId":"DdecOfficersController_add","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDdecOfficerDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DdecOfficerEntity"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Add a DDEC officer","tags":["R&D - DDEC Officers"]}},"/v1/ddec-officers/{id}":{"patch":{"description":"Applies to the letters generated from now on; those already generated stay as they are. Refused with 404 for an unknown officer.","operationId":"DdecOfficersController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDdecOfficerDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DdecOfficerEntity"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Set how an amendment letter greets a DDEC officer","tags":["R&D - DDEC Officers"]}},"/v1/organizations/{orgId}/entity-profile/completion":{"get":{"description":"Validates the organization's saved entity profile (business or individual, based on entity type) against the required-field completeness schema and returns whether every required field is filled.","operationId":"EntityProfileController_getCompletion","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityProfileCompletionDto"}}}}},"security":[{"cookie":[]}],"summary":"Check entity profile completeness","tags":["Entity Profile"]}},"/v1/organizations/{orgId}/business-profile":{"get":{"description":"Retrieve the business profile information for an organization","operationId":"BusinessProfileController_get","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessProfileEntity"}}}}},"security":[{"cookie":[]}],"summary":"Get business profile for organization","tags":["Business Profile"]},"post":{"description":"Create business profile information for an organization. This data will be auto-populated into R&D forms.","operationId":"BusinessProfileController_create","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBusinessProfileDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessProfileEntity"}}}}},"security":[{"cookie":[]}],"summary":"Create business profile for organization","tags":["Business Profile"]},"patch":{"description":"Update business profile information for an organization","operationId":"BusinessProfileController_update","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBusinessProfileDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessProfileEntity"}}}}},"security":[{"cookie":[]}],"summary":"Update business profile for organization","tags":["Business Profile"]}},"/v1/organizations/{orgId}/business-profile/prefill":{"get":{"description":"The answers DECA already has from the organization's prospect (Pricing Form, Initial Questionnaire), or just the organization's name, for the form to fill into its empty answers.","operationId":"BusinessProfileController_getPrefill","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessProfileAnswersPrefillDto"}}}}},"security":[{"cookie":[]}],"summary":"Get what the business profile prefills from","tags":["Business Profile"]}},"/v1/organizations/{orgId}/individual-profile":{"post":{"description":"Create individual profile information for an organization with entity type \"individual\".","operationId":"IndividualProfileController_create","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIndividualProfileDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndividualProfileEntity"}}}}},"security":[{"cookie":[]}],"summary":"Create individual profile for organization","tags":["Individual Profile"]},"get":{"description":"Retrieve the individual profile information for an organization","operationId":"IndividualProfileController_get","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndividualProfileEntity"}}}}},"security":[{"cookie":[]}],"summary":"Get individual profile for organization","tags":["Individual Profile"]},"patch":{"description":"Update individual profile information for an organization","operationId":"IndividualProfileController_update","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIndividualProfileDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndividualProfileEntity"}}}}},"security":[{"cookie":[]}],"summary":"Update individual profile for organization","tags":["Individual Profile"]}},"/v1/organizations/{orgId}/emails":{"get":{"description":"Get a paginated list of email threads for an organization, sorted by latest message first","operationId":"OrgEmailsController_findThreadSummaries","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","description":"Case-insensitive. Matches a thread when any of its shown messages matches by sender name or address (or the name of the admin who sent it), To / CC address, subject or text, or when one of its active participants matches by name or address (a teammate nobody emails aside).","schema":{"maxLength":255,"type":"string"}},{"name":"readStatus","required":false,"in":"query","description":"Both when omitted","schema":{"$ref":"#/components/schemas/EmailThreadReadStatus"}},{"name":"types","required":false,"in":"query","description":"Threads of any of these types; `untagged` is a client's or an outside sender's","schema":{"type":"array","items":{"$ref":"#/components/schemas/EmailThreadType"}}},{"name":"lastMessageFrom","required":false,"in":"query","description":"Last message at or after this instant","schema":{"format":"date-time","type":"string"}},{"name":"lastMessageTo","required":false,"in":"query","description":"Last message at or before this instant","schema":{"format":"date-time","type":"string"}},{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadSummariesDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List organization email thread summaries","tags":["Org Emails"]},"post":{"description":"Send a new email or reply within an existing thread","operationId":"OrgEmailsController_send","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"The thread's participants changed since the reply was opened"}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Send manual email","tags":["Org Emails"]}},"/v1/organizations/{orgId}/emails/threads/mark-read":{"post":{"description":"For the caller alone: the selected threads read as read for them, until a client message is stored after their mark, or they mark them unread. Picked by `latestEmailIds` and `asOf`, a thread reads up to the newest message the list showed: a message stored after `asOf`, or dated after that message, stays unread. Picked by `filter`, a thread reads up to the newest message this owner shows. On a converted prospect the organization's later replies stay unread. Other admins keep their own state.","operationId":"OrgEmailsController_markThreadsRead","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadsMarkReadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadsReadResultDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Mark email threads read","tags":["Org Emails"]}},"/v1/organizations/{orgId}/emails/threads/mark-unread":{"post":{"description":"For the caller alone: the selected threads read as unread for them, on every owner holding them, until they open them or mark them read. Other admins keep their own state.","operationId":"OrgEmailsController_markThreadsUnread","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadsSelectionDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadsReadResultDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Mark email threads unread","tags":["Org Emails"]}},"/v1/organizations/{orgId}/emails/threads/delete":{"post":{"description":"Deletes every selected conversation for good, as deleting each one does, except that one which got a new message since it was shown is deleted too. One that fails is counted in `failedCount` and the others still go. A `filter` deletes at most 100 conversations per request, newest first; `remainingCount` says how many it left, to delete with another request. Nobody is emailed.","operationId":"OrgEmailsController_deleteThreads","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadsSelectionDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadsDeleteResultDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete email conversations","tags":["Org Emails"]}},"/v1/organizations/{orgId}/emails/threads/{threadKey}":{"get":{"description":"Get all messages in a thread, ordered chronologically, with its participants and who sees it","operationId":"OrgEmailsController_findThread","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"threadKey","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadDetailDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get full email thread","tags":["Org Emails"]},"delete":{"description":"Deletes the conversation for good, every message with its attachments, from every owner holding it: one an organization took over from its prospect goes from both. Nobody is emailed. Refused when a message arrived since the caller saw `latestEmailId` and `messageCount`.","operationId":"OrgEmailsController_deleteThread","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"threadKey","required":true,"in":"path","schema":{"type":"string"}},{"name":"latestEmailId","required":true,"in":"query","description":"The newest message the caller saw","schema":{"format":"uuid","type":"string"}},{"name":"messageCount","required":true,"in":"query","description":"How many messages the caller saw: a message dated before the newest one, such as a late Gmail import, changes only this","schema":{"minimum":1,"maximum":2147483647,"type":"number"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"A message arrived since the conversation was opened"}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete an email conversation","tags":["Org Emails"]}},"/v1/organizations/{orgId}/emails/threads/{threadKey}/participants/{participantId}":{"delete":{"description":"Nobody is emailed. Portal replies stop going to them, and a client or external participant's replies are refused. An admin stops getting the notifications that came from being on the thread (a private or a prospect thread), and loses a private thread unless it reached their own mailbox. Nobody can remove themselves.","operationId":"OrgEmailsController_removeParticipant","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"threadKey","required":true,"in":"path","schema":{"type":"string"}},{"name":"participantId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"The last To recipient, or one already removed"}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Remove a participant from an email thread","tags":["Org Emails"]}},"/v1/organizations/{orgId}/emails/threads/{threadKey}/participants/{participantId}/re-add":{"post":{"description":"Nobody is emailed and the re-add sends no history; later replies quote recent messages as usual, including any sent while they were removed. They're back where they were addressed: a To or CC participant gets portal replies again, and anyone's replies are accepted again. Only the address's latest row can be re-added, never your own; a deleted admin can't be, nor anyone addressed once the thread already has as many recipients as an email may.","operationId":"OrgEmailsController_reAddParticipant","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"threadKey","required":true,"in":"path","schema":{"type":"string"}},{"name":"participantId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"Already added back, a deleted admin, or past the recipient limit"}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Re-add a removed participant to an email thread","tags":["Org Emails"]}},"/v1/organizations/{orgId}/emails/threads/{threadKey}/share":{"post":{"description":"Every admin who can open the organization sees it from then on","operationId":"OrgEmailsController_shareThread","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"threadKey","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Share a private email thread with the team","tags":["Org Emails"]}},"/v1/organizations/{orgId}/ai-summary":{"get":{"description":"Get the live latest-update feed plus the last generated action items and weekly summary for this organization","operationId":"OrgAiSummaryController_get","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAiSummaryResponseDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get organization AI summary","tags":["Org AI Summary"]},"post":{"description":"Generate or regenerate the action items and weekly summary for this organization","operationId":"OrgAiSummaryController_generate","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAiSummaryResponseDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Generate organization AI summary","tags":["Org AI Summary"]}},"/v1/organizations/{orgId}/contacts":{"get":{"operationId":"OrgContactsController_findMany","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgContactEntity"}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List organization points of contact","tags":["Organizations - Contacts"]},"post":{"operationId":"OrgContactsController_create","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgContactDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgContactEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Add a point of contact to an organization","tags":["Organizations - Contacts"]}},"/v1/organizations/{orgId}/contacts/{contactId}":{"patch":{"operationId":"OrgContactsController_update","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"contactId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgContactDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgContactEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update an organization point of contact","tags":["Organizations - Contacts"]},"delete":{"operationId":"OrgContactsController_delete","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"contactId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Remove an organization point of contact","tags":["Organizations - Contacts"]}},"/v1/organizations/{orgId}/agreements":{"get":{"operationId":"OrgAgreementsController_list","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"filter","required":false,"in":"query","schema":{"default":"all","allOf":[{"$ref":"#/components/schemas/OrgAgreementListFilter"}]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgAgreementDto"}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List agreements for an organization","tags":["Organizations - Agreements"]}},"/v1/organizations/{orgId}/agreements/template":{"get":{"description":"Used by organizations that were not converted from a prospect: prepare the agreement offline, then upload it.","operationId":"OrgAgreementsController_downloadTemplate","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"kind","required":true,"in":"query","schema":{"$ref":"#/components/schemas/OrgAgreementKind"}}],"responses":{"200":{"description":"","content":{"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Download a blank DECA agreement template","tags":["Organizations - Agreements"]}},"/v1/organizations/{orgId}/agreements/product-mismatch":{"get":{"description":"Backs the Products tab banner warning that the service list and the agreement have drifted apart.","operationId":"OrgAgreementsController_getProductMismatch","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAgreementProductMismatchDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Compare the briefs of signed agreements against assigned products","tags":["Organizations - Agreements"]}},"/v1/organizations/{orgId}/agreements/{agreementId}":{"get":{"operationId":"OrgAgreementsController_findOne","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"agreementId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAgreementDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get a single agreement","tags":["Organizations - Agreements"]},"delete":{"operationId":"OrgAgreementsController_delete","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"agreementId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete a draft agreement","tags":["Organizations - Agreements"]}},"/v1/organizations/{orgId}/agreements/upload":{"post":{"description":"Stores a PDF, DOCX or DOC as a new agreement in Draft. Sender view configuration is required before it can be sent.","operationId":"OrgAgreementsController_upload","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAgreementDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Upload an externally prepared agreement","tags":["Organizations - Agreements"]}},"/v1/organizations/{orgId}/agreements/{agreementId}/parse":{"post":{"description":"Used by the \"Retry analysis\" action after a parse failure. Returns immediately; the agreement moves back to a parsing state.","operationId":"OrgAgreementsController_retryParsing","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"agreementId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAgreementDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"A parse is already running and has not yet been given up on, so starting another would put two extractions on one document."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Re-run AI extraction on an uploaded agreement","tags":["Organizations - Agreements"]}},"/v1/organizations/{orgId}/agreements/{agreementId}/review":{"put":{"description":"Replaces the agreement’s brief — its five sections, every row linked to the catalog products it covers — and derives the one-off services signing links, which stay pending until the agreement is signed. On a signed agreement each links now to the organization’s service of its product; one the organization lacks waits for the team to add it. Nothing is created.","operationId":"OrgAgreementsController_review","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"agreementId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewOrgAgreementDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAgreementDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"A parse is in flight, or started while the review was being decided — its result would replace whatever the confirm writes — another admin confirmed the same review first, or a product the brief links was deleted while it was being saved."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Confirm agreement details and the services signing links","tags":["Organizations - Agreements"]}},"/v1/organizations/{orgId}/agreements/{agreementId}/sender-view":{"post":{"operationId":"OrgAgreementsController_createSenderView","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"agreementId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgAgreementSenderViewDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAgreementSenderViewResponseDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Create a DocuSign sender view URL","tags":["Organizations - Agreements"]}},"/v1/organizations/{orgId}/agreements/{agreementId}/sender-view/complete":{"post":{"operationId":"OrgAgreementsController_markSenderViewCompleted","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"agreementId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAgreementDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Mark sender view configuration as completed","tags":["Organizations - Agreements"]}},"/v1/organizations/{orgId}/agreements/{agreementId}/send":{"post":{"operationId":"OrgAgreementsController_send","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"agreementId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOrgAgreementDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAgreementDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"Another send of the draft is under way, or it was marked as signed, sent or cancelled meanwhile; reload it to see where it stands."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Send the agreement for signature","tags":["Organizations - Agreements"]}},"/v1/organizations/{orgId}/agreements/{agreementId}/mark-signed":{"post":{"description":"For a reviewed draft that was never sent for signature: its stored PDF becomes the signed copy, and it then behaves as after a DocuSign signing — its rows link and price the organization’s services, and it bills what it charges at signing. Cannot be undone.","operationId":"OrgAgreementsController_markSignedOutside","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"agreementId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAgreementDto"}}}},"400":{"description":"The agreement is not a draft that was never sent, it was analyzed before the brief and needs a new analysis, its review is not confirmed, or the organization is on hold or archived."},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"A parse is in flight, DocuSign already sent the draft from its sender view, or a send or another mark claimed it first."},"503":{"description":"DocuSign could not confirm this document is still a draft. Try again in a moment."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Mark the agreement as signed outside the platform","tags":["Organizations - Agreements"]}},"/v1/organizations/{orgId}/agreements/{agreementId}/follow-up":{"post":{"description":"A plain reminder email from DECA. The signing link stays in DocuSign's own email — this does not resend the envelope.","operationId":"OrgAgreementsController_sendFollowUp","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"agreementId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOrgAgreementFollowUpDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAgreementDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Send a follow-up reminder for an agreement awaiting the client's signature","tags":["Organizations - Agreements"]}},"/v1/organizations/{orgId}/agreements/{agreementId}/revoke":{"post":{"description":"Records DECA's own revocation, and voids the DocuSign envelope when it is still open — a signed one cannot be voided there.","operationId":"OrgAgreementsController_revoke","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"agreementId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAgreementDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Revoke the agreement","tags":["Organizations - Agreements"]}},"/v1/organizations/{orgId}/notes":{"get":{"description":"Root notes only, newest first, each with its thread summary.","operationId":"OrganizationNotesController_findMany","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationNoteDto"}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List the notes on an organization","tags":["Organizations - Notes"]},"post":{"operationId":"OrganizationNotesController_create","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNoteWithMentionsDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationNoteDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Add a note to an organization","tags":["Organizations - Notes"]}},"/v1/organizations/{orgId}/notes/{noteId}":{"patch":{"description":"Only the note's author may edit it.","operationId":"OrganizationNotesController_update","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNoteWithMentionsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationNoteDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Edit a note","tags":["Organizations - Notes"]},"delete":{"description":"Only the note's author may delete it. Its replies go with it.","operationId":"OrganizationNotesController_delete","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete a note","tags":["Organizations - Notes"]}},"/v1/organizations/{orgId}/notes/{noteId}/replies":{"get":{"description":"Every reply on a note, oldest first.","operationId":"OrganizationNotesController_findReplies","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NoteReplyEntity"}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List replies in a note thread","tags":["Organizations - Notes"]},"post":{"operationId":"OrganizationNotesController_createReply","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNoteWithMentionsDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteReplyEntity"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Reply to a note","tags":["Organizations - Notes"]}},"/v1/organizations/{orgId}/notes/{noteId}/replies/{replyId}":{"patch":{"description":"Only the reply's author may edit it.","operationId":"OrganizationNotesController_updateReply","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}},{"name":"replyId","required":true,"in":"path","description":"Reply ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNoteWithMentionsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteReplyEntity"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Edit a reply","tags":["Organizations - Notes"]},"delete":{"description":"Only the reply's author may delete it.","operationId":"OrganizationNotesController_deleteReply","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}},{"name":"replyId","required":true,"in":"path","description":"Reply ID","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete a reply","tags":["Organizations - Notes"]}},"/v1/organizations/{orgId}/notes/{noteId}/read":{"post":{"description":"Move the caller's read marker on a note thread forward.","operationId":"OrganizationNotesController_markThreadRead","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkNoteThreadReadDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Mark a note thread read","tags":["Organizations - Notes"]}},"/v1/nicknames/{nicknameId}/meeting-notes":{"get":{"description":"Newest first. Only visible to a user who can read at least one of the nickname’s organizations.","operationId":"NicknameMeetingsController_findMany","parameters":[{"name":"nicknameId","required":true,"in":"path","schema":{"type":"string"}},{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/NicknameMeetingHistoryItemDto"}}}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List meeting notes for a nickname","tags":["Nickname Meeting Notes"]}},"/v1/meeting-notes/{noteId}":{"get":{"description":"The full transcript, plus the AI summary and suggested tasks once processing has completed.","operationId":"NicknameMeetingsController_findOne","parameters":[{"name":"noteId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NicknameMeetingNoteDetailDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get meeting notes","tags":["Nickname Meeting Notes"]},"delete":{"description":"Removes the notes from the nickname’s history.","operationId":"NicknameMeetingsController_remove","parameters":[{"name":"noteId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Meeting notes deleted"},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete meeting notes","tags":["Nickname Meeting Notes"]}},"/v1/meeting-notes/{noteId}/retry":{"post":{"description":"Re-runs the summary and suggestions against the stored transcript. Never creates a second set of notes.","operationId":"NicknameMeetingsController_retry","parameters":[{"name":"noteId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NicknameMeetingNoteDetailDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Retry processing","tags":["Nickname Meeting Notes"]}},"/v1/meeting-suggested-tasks/{suggestionId}":{"patch":{"description":"Dismisses or restores a suggestion from a meeting's notes. The suggestion is kept either way.","operationId":"NicknameMeetingsController_setSuggestionDismissed","parameters":[{"name":"suggestionId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNicknameMeetingSuggestedTaskDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NicknameMeetingSuggestedTaskDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Dismiss or restore a suggested task","tags":["Nickname Meeting Notes"]}},"/v1/meeting-suggested-tasks/{suggestionId}/task":{"post":{"description":"Creates one organization task linked to the suggestion. Repeated calls do not create a second task.","operationId":"NicknameMeetingsController_createTaskFromSuggestion","parameters":[{"name":"suggestionId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationTaskDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NicknameMeetingSuggestedTaskDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Create a task from a suggested task","tags":["Nickname Meeting Notes"]}},"/v1/nicknames":{"get":{"description":"Get a list of all available nicknames","operationId":"NicknamesController_findMany","parameters":[{"name":"onlyAccessible","required":false,"in":"query","description":"Only nicknames with at least one organization the caller can read","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NicknameEntity"}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List nicknames","tags":["Nicknames"]},"post":{"description":"Create a new nickname","operationId":"NicknamesController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNicknameDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NicknameEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Create nickname","tags":["Nicknames"]}},"/v1/nicknames/usage":{"get":{"description":"Nicknames together with the organizations and prospects linked to each one; every match when `page` and `size` are both omitted","operationId":"NicknamesController_findManyWithUsage","parameters":[{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Search by nickname name","schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/NicknameUsageDto"}}}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List nicknames with their links","tags":["Nicknames"]}},"/v1/nicknames/{nicknameId}":{"patch":{"description":"Rename a nickname across every organization and prospect","operationId":"NicknamesController_update","parameters":[{"name":"nicknameId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNicknameDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NicknameEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Rename nickname","tags":["Nicknames"]},"delete":{"description":"Delete a nickname that no organization or prospect links to","operationId":"NicknamesController_delete","parameters":[{"name":"nicknameId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete nickname","tags":["Nicknames"]}},"/v1/meeting-agendas":{"post":{"description":"Generates the DECA Client Meeting Agenda for organizations of one nickname and saves it as a new agenda. Validation errors are returned before anything is written; an `id` the caller picks names the new agenda, so a request cut short still leaves it the agenda to follow, and an `id` an agenda already holds is a 409; a `meetingId` that can no longer take an agenda (cancelled, filed under another nickname or already holding one) is a 409. The row is then written as `generating`, so the lists show it while the AI runs. A generation that fails still returns 201 with the agenda in status `failed`, so Try again (`POST meeting-agendas/:agendaId/retry`) has its id. With `meetingId` the agenda is attached to that meeting once ready; `meeting` stays null in the response when it could no longer be attached.","operationId":"MeetingAgendasController_generate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateMeetingAgendaDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingAgendaDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Generate a Meeting Prep agenda","tags":["Meeting Agendas"]},"get":{"description":"Every agenda whose organizations the viewer can all read, whoever generated it, newest first. `nicknameIds` and `organizationIds` narrow it as the All Meetings filters do: both together must match.","operationId":"MeetingAgendasController_findAll","parameters":[{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"isAttachable","required":false,"in":"query","description":"Only ready agendas with no meeting attached: the ones a meeting can choose.","schema":{"type":"boolean"}},{"name":"nicknameIds","required":false,"in":"query","description":"Only agendas of one of these nicknames.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"organizationIds","required":false,"in":"query","description":"Only agendas covering at least one of these organizations.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/MeetingAgendaListItemDto"}}}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List Meeting Prep agendas","tags":["Meeting Agendas"]}},"/v1/meeting-agendas/short-agenda":{"post":{"description":"A few talking points for organizations of one nickname, from the facts a Meeting Prep agenda reads since the nickname's last recorded meeting; nothing is saved. The lines go into an invitation every guest receives, so emails are left out for a viewer who cannot read them. Same organization rules as generating an agenda: 404 for one the viewer cannot read, 400 when one is archived or they span nicknames. `lines` is empty when none of them has anything to discuss.","operationId":"MeetingAgendasController_generateShortAgenda","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateMeetingShortAgendaDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingShortAgendaDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Write a meeting invitation's short agenda","tags":["Meeting Agendas"]}},"/v1/nicknames/{nicknameId}/meeting-agendas":{"get":{"description":"Every admin’s agendas for the nickname, newest first, limited to those whose organizations the viewer can all read.","operationId":"MeetingAgendasController_findManyForNickname","parameters":[{"name":"nicknameId","required":true,"in":"path","schema":{"type":"string"}},{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"isAttachable","required":false,"in":"query","description":"Only ready agendas with no meeting attached: the ones a meeting can choose.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/MeetingAgendaListItemDto"}}}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List a nickname's Meeting Prep agendas","tags":["Meeting Agendas"]}},"/v1/meeting-agendas/{agendaId}":{"get":{"operationId":"MeetingAgendasController_findOne","parameters":[{"name":"agendaId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingAgendaDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get a Meeting Prep agenda","tags":["Meeting Agendas"]},"put":{"description":"Saves the editable projection: Meeting Details, wrap-up, texts, owners, statuses and notes, removed products and updates, and added topics, action items and next steps. Section names and order, product names and statuses, and update sources stay as generated. 409 when the agenda changed since `expectedUpdatedAt` and the save would change it.","operationId":"MeetingAgendasController_update","parameters":[{"name":"agendaId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMeetingAgendaDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingAgendaDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Save a Meeting Prep agenda","tags":["Meeting Agendas"]},"delete":{"description":"An attached one-off scheduled meeting that has not ended is cancelled first and its guests notified, which only its organizer can do; calendar errors are returned as they are on the calendar routes. One its organizer already cancelled in Google is only marked cancelled. A recurring series or a past meeting is only detached. 409 while the agenda is still generating.","operationId":"MeetingAgendasController_remove","parameters":[{"name":"agendaId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete a Meeting Prep agenda","tags":["Meeting Agendas"]}},"/v1/meeting-agendas/{agendaId}/retry":{"post":{"description":"Regenerates a failed agenda in place, for the same organizations. Only a `failed` agenda can be generated again, including one still `generating` after 10 minutes, which already reads as `failed`; any other is a 409. A second failure returns it as `failed` again.","operationId":"MeetingAgendasController_retry","parameters":[{"name":"agendaId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingAgendaDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Generate a Meeting Prep agenda again","tags":["Meeting Agendas"]}},"/v1/meeting-agendas/{agendaId}/meeting":{"put":{"description":"One meeting per agenda: both must belong to the same nickname, the meeting must be scheduled and neither may already be attached.","operationId":"MeetingAgendasController_attachMeeting","parameters":[{"name":"agendaId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachMeetingAgendaMeetingDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingAgendaDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Attach a meeting to a Meeting Prep agenda","tags":["Meeting Agendas"]}},"/v1/meeting-agendas/{agendaId}/export":{"get":{"description":"The agenda as it is shown, in the DECA Client Meeting Agenda layout, with the blank Meeting Details and Wrap-Up fields left to fill in.","operationId":"MeetingAgendasController_exportDocx","parameters":[{"name":"agendaId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Meeting Prep agenda (Word)","content":{"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Export a Meeting Prep agenda as Word","tags":["Meeting Agendas"]}},"/v1/calendar/events/summary":{"get":{"description":"Returns no days when the user has no Google Workspace connection, so the day grid renders without dots rather than an error.","operationId":"CalendarEventsController_getSummary","parameters":[{"name":"from","required":true,"in":"query","schema":{"example":"2026-08-18","type":"string"}},{"name":"to","required":true,"in":"query","schema":{"example":"2026-08-18","type":"string"}},{"name":"timeZone","required":false,"in":"query","description":"IANA zone the day boundaries are resolved in. Defaults to the timezone of the connected Google calendar.","schema":{"type":"string"}},{"name":"calendarIds","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"includeDeclined","required":false,"in":"query","description":"Include meetings the user has declined.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarMeetingSummaryPageDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Get per-day meeting counts","tags":["Calendar Events"]}},"/v1/calendar/events":{"get":{"description":"Read through to Google Calendar, ordered by start time with all-day events first. With a nickname or organization filter set, meetings linked to neither are left out.","operationId":"CalendarEventsController_findMany","parameters":[{"name":"from","required":true,"in":"query","schema":{"example":"2026-08-18","type":"string"}},{"name":"to","required":true,"in":"query","schema":{"example":"2026-08-18","type":"string"}},{"name":"timeZone","required":false,"in":"query","description":"IANA zone the day boundaries are resolved in. Defaults to the timezone of the connected Google calendar.","schema":{"type":"string"}},{"name":"calendarIds","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"includeDeclined","required":false,"in":"query","description":"Include meetings the user has declined.","schema":{"type":"boolean"}},{"name":"nicknameIds","required":false,"in":"query","description":"Only meetings filed under one of these nicknames or linked to one of their organizations.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"organizationIds","required":false,"in":"query","description":"Only meetings linked to one of these organizations.","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventsPageDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"List meetings in a date range","tags":["Calendar Events"]},"post":{"operationId":"CalendarEventsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCalendarEventDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventDetailsDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Create a meeting","tags":["Calendar Events"]}},"/v1/calendar/events/{eventId}":{"get":{"operationId":"CalendarEventsController_findOne","parameters":[{"name":"eventId","required":true,"in":"path","schema":{"type":"string"}},{"name":"calendarId","required":false,"in":"query","description":"Calendar the event lives on. Defaults to the primary one.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventDetailsDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Get a meeting","tags":["Calendar Events"]},"patch":{"description":"Omitted fields are left untouched; an explicit null clears the field.","operationId":"CalendarEventsController_update","parameters":[{"name":"eventId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCalendarEventDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventDetailsDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Edit or reschedule a meeting","tags":["Calendar Events"]},"delete":{"description":"Only the organizer may cancel; guests keep their own copy.","operationId":"CalendarEventsController_remove","parameters":[{"name":"eventId","required":true,"in":"path","schema":{"type":"string"}},{"name":"calendarId","required":false,"in":"query","description":"Calendar the event lives on. Defaults to the primary one.","schema":{"type":"string"}},{"name":"scope","required":true,"in":"query","schema":{"$ref":"#/components/schemas/CalendarRecurrenceScope"}},{"name":"sendUpdates","required":true,"in":"query","schema":{"$ref":"#/components/schemas/CalendarSendUpdates"}}],"responses":{"204":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Cancel a meeting","tags":["Calendar Events"]}},"/v1/calendar/events/{eventId}/response":{"post":{"operationId":"CalendarEventsController_respond","parameters":[{"name":"eventId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventResponseDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventDetailsDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Respond to a meeting invitation","tags":["Calendar Events"]}},"/v1/calendar/calendars":{"get":{"description":"Used to choose which calendars the sidebar reads and which one a new meeting is created on.","operationId":"UserCalendarsController_listCalendars","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CalendarListItemDto"}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"List the user's Google calendars","tags":["User Calendars"]}},"/v1/announcements":{"get":{"description":"Announcements sent from the portal, newest first; every match when `page` and `size` are both omitted","operationId":"AnnouncementsController_findMany","parameters":[{"name":"search","required":false,"in":"query","description":"Matches the subject, the message text and the sender name, case-insensitively.","schema":{"maxLength":255,"type":"string"}},{"name":"audiences","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/AnnouncementAudience"}}},{"name":"senderIds","required":false,"in":"query","description":"Users who sent the announcement","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"startDate","required":false,"in":"query","description":"Sent at or after this instant","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Sent at or before this instant","schema":{"format":"date-time","type":"string"}},{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementsPageDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List announcements","tags":["Announcements"]},"post":{"description":"Emails the announcement from the no-reply address to everyone in the audience, one message each, and records it. A repeated `idempotencyKey` returns the announcement it created and sends nothing.","operationId":"AnnouncementsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAnnouncementDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementDetailsDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Send an announcement","tags":["Announcements"]}},"/v1/announcements/senders":{"get":{"description":"Users who have sent at least one announcement, by name","operationId":"AnnouncementsController_findSenders","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AnnouncementSenderDto"}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List announcement senders","tags":["Announcements"]}},"/v1/announcements/compose-info":{"get":{"description":"The no-reply sender address and how many people each audience reaches now","operationId":"AnnouncementsController_getComposeInfo","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementComposeInfoDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get what a new announcement would be sent with","tags":["Announcements"]}},"/v1/announcements/{announcementId}":{"get":{"operationId":"AnnouncementsController_findOne","parameters":[{"name":"announcementId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementDetailsDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get an announcement","tags":["Announcements"]}},"/v1/rnd/{orgProductId}/tax-credit":{"post":{"description":"Submit complete tax credit data. Validates, saves, and generates report.","operationId":"RndTaxCreditController_submit","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitRndTaxCreditDto"}}}},"responses":{"201":{"description":"Tax credit submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndTaxCreditSubmissionDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Submit tax credit information","tags":["R&D Tax Credit"]},"get":{"description":"Retrieve complete tax credit data for editing or review","operationId":"RndTaxCreditController_getData","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Tax credit data retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndTaxCreditDataEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get tax credit data","tags":["R&D Tax Credit"]}},"/v1/rnd/{orgProductId}/tax-credit/submit-general":{"post":{"description":"Submit the general information part (business profile, tax info, company operations, contacts, personnel, projects). Creates a general submission reviewed independently of the financial flow.","operationId":"RndTaxCreditController_submitGeneral","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitRndGeneralInformationDto"}}}},"responses":{"201":{"description":"General information submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndTaxCreditSubmissionDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Submit the General Information flow","tags":["R&D Tax Credit"]}},"/v1/rnd/{orgProductId}/tax-credit/submit-amendment":{"post":{"description":"Submit an R&D Supplemental Amendment as one product: its projects and activities with its financial information. The rest of its general information stays as the original application filed it.","operationId":"RndTaxCreditController_submitAmendment","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitRndAmendmentDto"}}}},"responses":{"201":{"description":"Amendment submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndTaxCreditSubmissionDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Submit an R&D amendment","tags":["R&D Tax Credit"]}},"/v1/rnd/{orgProductId}/tax-credit/submit-financial":{"post":{"description":"Submit the financial information part (documents, employee/expense/vendor allocations). Creates a financial submission reviewed independently of the general flow.","operationId":"RndTaxCreditController_submitFinancial","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitRndFinancialInformationDto"}}}},"responses":{"201":{"description":"Financial information submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndTaxCreditSubmissionDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Submit the Financial Information flow","tags":["R&D Tax Credit"]}},"/v1/rnd/{orgProductId}/tax-credit/reusable":{"get":{"description":"The application's data, its projects joined by the projects and activities its R&D Supplemental Amendments added.","operationId":"RndTaxCreditController_getReusableData","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Reusable tax credit data retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndTaxCreditDataEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get tax credit data to reuse in another year","tags":["R&D Tax Credit"]}},"/v1/rnd/{orgProductId}/tax-credit/projects/export":{"get":{"description":"Download every project grouped as its own block — project details, software tools and activities — as CSV or Excel.","operationId":"RndTaxCreditController_exportProjects","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"format","required":false,"in":"query","schema":{"default":"xlsx","allOf":[{"$ref":"#/components/schemas/RndProjectsExportFormat"}]}}],"responses":{"200":{"description":"CSV or Excel file download","content":{"text/csv; charset=utf-8":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Export projects and their activities","tags":["R&D Tax Credit"]}},"/v1/rnd/{orgProductId}/document-set":{"get":{"description":"Retrieve documents for an organization product","operationId":"RndDocumentSetController_get","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Documents retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get documents","tags":["R&D Document Set"]},"put":{"description":"Upload documents for a specific category","operationId":"RndDocumentSetController_update","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadProductDocumentsDto"}}}},"responses":{"200":{"description":"Documents uploaded successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Upload documents","tags":["R&D Document Set"]}},"/v1/rnd/{orgProductId}/document-set/{category}/history":{"get":{"description":"Retrieve every document in a category with its file resolved — the main get() leaves settled additional-ledger rounds unresolved.","operationId":"RndDocumentSetController_getCategoryHistory","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"category","required":true,"in":"path","schema":{"type":"string","enum":["rnd_general_ledger","rnd_payroll_ledger","rnd_supporting_document","rnd_additional_general_ledger","rnd_additional_payroll_ledger","rnd_aup_certificate","tax_credit_final_document","act60_all_concepts_debt_certificate","act60_certificate_of_filing_income_tax","act60_certificate_of_good_standing","act60_certificate_of_registry","act60_certified_financial_statements","act60_criminal_record","act60_debt_certificate_social_security_chauffeurs","act60_debt_certificate_unemployment_disability","act60_employer_identification_number_letter","act60_merchants_registration_certificate","act60_negative_debt_certificate_treasury","act60_negative_debt_certificate_state_insurance","act60_entity_organizational_chart","act60_resume_or_curriculum_vitae","act60_commercial_reference","act60_other","act60_manufacturing_production_process_description","act60_manufacturing_professionals_registry","act60_manufacturing_section_2064_declination","act60_manufacturing_disclosure_tax_investigation","act60_manufacturing_disclosure_conviction","act60_manufacturing_disclosure_arrest_or_summons","act60_manufacturing_disclosure_business_prohibition","act60_manufacturing_new_business_evidence","act60_manufacturing_background_support","act60_export_ownership_chart","act60_export_professionals_registry","act60_export_disclosure_tax_investigation","act60_export_disclosure_conviction","act60_export_disclosure_arrest_or_summons","act60_export_disclosure_business_prohibition","act60_export_base_period_income_support","act60_export_background_support","act60_private_equity_background_document","act60_tourism_authorization_letter","act60_tourism_certificate_of_formation","act60_tourism_operating_agreements","act60_tourism_pre_application_letter","act60_tourism_endorsement_letter","act60_tourism_previous_concession_copy","act60_tourism_entity_income_tax_returns","act60_tourism_negative_debt_room_tax","act60_tourism_employee_compliance_asume","act60_tourism_detailed_description","act60_tourism_business_plan","act60_tourism_construction_permit","act60_tourism_project_blueprints","act60_tourism_conservation_environmental_plan","act60_tourism_locally_sourced_materials","act60_tourism_local_agricultural_products","act60_tourism_local_professional_services","act60_tourism_contractors_subcontractors","act60_tourism_vendor_contracts","act60_tourism_bank_account_evidence","act60_tourism_marketing_plan","act60_tourism_security_measures_plan","act60_tourism_personnel_training_plan","act60_tourism_ada_accessibility_plan","act60_tourism_sole_permit","act60_tourism_municipal_license","act60_tourism_alcoholic_beverages_license","act60_tourism_hacienda_registration","act60_tourism_public_liability_insurance","act60_tourism_real_personal_property_inventory","act60_tourism_financial_analysis_statement","act60_tourism_negative_debt_treasury","act60_tourism_economic_development_description","act60_tourism_design_planification","act60_tourism_fire_inspection_certificate","act60_tourism_public_establishment_certificate","act60_tourism_casino_license","act60_tourism_casino_endorsement","act60_tourism_golf_course_description","act60_tourism_nautical_permits","act60_tourism_nautical_registration","act60_tourism_nautical_vessel_info","act60_tourism_institutional_sworn_statement","act60_tourism_additional_information","act60_tourism_eligibility_report","act60_hard_to_recruit_all_concepts_debt_report","act60_hard_to_recruit_explanatory_letter_applicant","act60_hard_to_recruit_explanatory_letter_exempt_business","act60_hard_to_recruit_bachelors_degree_copy","act60_hard_to_recruit_resume_or_curriculum_vitae","act60_hard_to_recruit_institutional_sworn_statement","act60_hard_to_recruit_negative_certificate_child_support","act60_hard_to_recruit_returns_filing_certification","act60_hard_to_recruit_ssn_or_national_id","act60_hard_to_recruit_us_passport_or_resident_visa","act60_hard_to_recruit_criminal_record","act60_hard_to_recruit_negative_debt_certificate_treasury","act60_hard_to_recruit_other","act60_young_entrepreneur_all_concepts_debt_report","act60_young_entrepreneur_negative_debt_certificate_treasury","act60_young_entrepreneur_diploma","act60_young_entrepreneur_photo_identification","act60_young_entrepreneur_tax_return_filing_certification","act60_young_entrepreneur_birth_certificate","act60_young_entrepreneur_certificate_of_incorporation","act60_young_entrepreneur_child_support_compliance","act60_young_entrepreneur_other"]}}],"responses":{"200":{"description":"History retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentFileDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get category history","tags":["R&D Document Set"]}},"/v1/rnd/{orgProductId}/document-set/{category}/{documentId}":{"delete":{"description":"Deletes one ledger file for good. A client may delete a file only while the Financial part is still theirs, the file is not approved, and none of that ledger’s files is under review. An admin may delete any: the ledger data parsed from the file goes with it, and a submitted Financial part keeps its status.","operationId":"RndDocumentSetController_deleteLedgerDocument","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"category","required":true,"in":"path","schema":{"type":"string","enum":["rnd_general_ledger","rnd_payroll_ledger","rnd_supporting_document","rnd_additional_general_ledger","rnd_additional_payroll_ledger","rnd_aup_certificate","tax_credit_final_document","act60_all_concepts_debt_certificate","act60_certificate_of_filing_income_tax","act60_certificate_of_good_standing","act60_certificate_of_registry","act60_certified_financial_statements","act60_criminal_record","act60_debt_certificate_social_security_chauffeurs","act60_debt_certificate_unemployment_disability","act60_employer_identification_number_letter","act60_merchants_registration_certificate","act60_negative_debt_certificate_treasury","act60_negative_debt_certificate_state_insurance","act60_entity_organizational_chart","act60_resume_or_curriculum_vitae","act60_commercial_reference","act60_other","act60_manufacturing_production_process_description","act60_manufacturing_professionals_registry","act60_manufacturing_section_2064_declination","act60_manufacturing_disclosure_tax_investigation","act60_manufacturing_disclosure_conviction","act60_manufacturing_disclosure_arrest_or_summons","act60_manufacturing_disclosure_business_prohibition","act60_manufacturing_new_business_evidence","act60_manufacturing_background_support","act60_export_ownership_chart","act60_export_professionals_registry","act60_export_disclosure_tax_investigation","act60_export_disclosure_conviction","act60_export_disclosure_arrest_or_summons","act60_export_disclosure_business_prohibition","act60_export_base_period_income_support","act60_export_background_support","act60_private_equity_background_document","act60_tourism_authorization_letter","act60_tourism_certificate_of_formation","act60_tourism_operating_agreements","act60_tourism_pre_application_letter","act60_tourism_endorsement_letter","act60_tourism_previous_concession_copy","act60_tourism_entity_income_tax_returns","act60_tourism_negative_debt_room_tax","act60_tourism_employee_compliance_asume","act60_tourism_detailed_description","act60_tourism_business_plan","act60_tourism_construction_permit","act60_tourism_project_blueprints","act60_tourism_conservation_environmental_plan","act60_tourism_locally_sourced_materials","act60_tourism_local_agricultural_products","act60_tourism_local_professional_services","act60_tourism_contractors_subcontractors","act60_tourism_vendor_contracts","act60_tourism_bank_account_evidence","act60_tourism_marketing_plan","act60_tourism_security_measures_plan","act60_tourism_personnel_training_plan","act60_tourism_ada_accessibility_plan","act60_tourism_sole_permit","act60_tourism_municipal_license","act60_tourism_alcoholic_beverages_license","act60_tourism_hacienda_registration","act60_tourism_public_liability_insurance","act60_tourism_real_personal_property_inventory","act60_tourism_financial_analysis_statement","act60_tourism_negative_debt_treasury","act60_tourism_economic_development_description","act60_tourism_design_planification","act60_tourism_fire_inspection_certificate","act60_tourism_public_establishment_certificate","act60_tourism_casino_license","act60_tourism_casino_endorsement","act60_tourism_golf_course_description","act60_tourism_nautical_permits","act60_tourism_nautical_registration","act60_tourism_nautical_vessel_info","act60_tourism_institutional_sworn_statement","act60_tourism_additional_information","act60_tourism_eligibility_report","act60_hard_to_recruit_all_concepts_debt_report","act60_hard_to_recruit_explanatory_letter_applicant","act60_hard_to_recruit_explanatory_letter_exempt_business","act60_hard_to_recruit_bachelors_degree_copy","act60_hard_to_recruit_resume_or_curriculum_vitae","act60_hard_to_recruit_institutional_sworn_statement","act60_hard_to_recruit_negative_certificate_child_support","act60_hard_to_recruit_returns_filing_certification","act60_hard_to_recruit_ssn_or_national_id","act60_hard_to_recruit_us_passport_or_resident_visa","act60_hard_to_recruit_criminal_record","act60_hard_to_recruit_negative_debt_certificate_treasury","act60_hard_to_recruit_other","act60_young_entrepreneur_all_concepts_debt_report","act60_young_entrepreneur_negative_debt_certificate_treasury","act60_young_entrepreneur_diploma","act60_young_entrepreneur_photo_identification","act60_young_entrepreneur_tax_return_filing_certification","act60_young_entrepreneur_birth_certificate","act60_young_entrepreneur_certificate_of_incorporation","act60_young_entrepreneur_child_support_compliance","act60_young_entrepreneur_other"]}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Document deleted successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete a ledger document","tags":["R&D Document Set"]}},"/v1/org-products/{orgProductId}/report/generate":{"post":{"operationId":"RndReportController_generate","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"201":{"description":"Report generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Generate R&D refined report","tags":["R&D - Report"]}},"/v1/org-products/{orgProductId}/report":{"get":{"operationId":"RndReportController_getReport","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Report metadata retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Get R&D report metadata","tags":["R&D - Report"]}},"/v1/rnd/{orgProductId}/report-import/parse":{"post":{"description":"Reads an uploaded R&D tax credit report (.docx or .pdf) and returns the general-information answers it contains so the form can be pre-filled. A report that was read successfully is filed in the organization's document library under Other, when the viewer may add library documents.","operationId":"RndReportImportController_parse","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"201":{"description":"Report parsed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndReportImportDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Extract general information from an uploaded RDTC report","tags":["R&D - Report Import"]}},"/v1/rnd/{orgProductId}/report-import/parse-document":{"post":{"description":"Reads a document the organization's library lists as importable — a generated report is rendered the way a download renders it — and returns the same answers an upload would.","operationId":"RndReportImportController_parseDocument","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndReportImportParseDocumentDto"}}}},"responses":{"201":{"description":"Report parsed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndReportImportDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Extract general information from a report in the library","tags":["R&D - Report Import"]}},"/v1/rnd/{orgProductId}/aup/certificate/notify/template":{"get":{"operationId":"RndAupCertificateController_getNotificationTemplate","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndAupEmailTemplateDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"tags":["R&D AUP Certificate"]}},"/v1/rnd/{orgProductId}/aup/certificate/notify":{"post":{"description":"Emails the chosen CPA managers of the organization that certification can proceed.","operationId":"RndAupCertificateController_notifyCpa","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendRndAupEmailDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndAupEmailDeliveryDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Notify CPA managers","tags":["R&D AUP Certificate"]}},"/v1/rnd/{orgProductId}/aup/certificate":{"delete":{"description":"Drops the uploaded certificate. A report already generated keeps the certificate it was generated with until it is generated again.","operationId":"RndAupCertificateController_remove","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Remove the certificate","tags":["R&D AUP Certificate"]}},"/v1/rnd/{orgProductId}/aup/certificate/reviewed":{"post":{"description":"Settles the named certificate's open review, which clears the review badges its upload raised. Answers 409 when a replacement has landed since.","operationId":"RndAupCertificateController_markReviewed","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkRndAupCertificateReviewedDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}},"409":{"description":""}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Mark the certificate reviewed","tags":["R&D AUP Certificate"]}},"/v1/rnd/{orgProductId}/aup/certificate/upload":{"post":{"operationId":"RndAupCertificateController_upload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRndAupCertificateDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndAupCertificateDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"tags":["R&D AUP Certificate"]}},"/v1/org-products/{orgProductId}/amendment-package/readiness":{"get":{"description":"The data the package cannot be generated without, read from the amendment, its original application and the business profile, and the data it is generated without but flags for review. Refused with 400 for any product but an R&D Supplemental Amendment.","operationId":"RndAmendmentPackageController_getReadiness","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndAmendmentPackageReadinessDto"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"What the R&D Supplemental Amendment package still needs","tags":["R&D - Amendment Package"]}},"/v1/org-products/{orgProductId}/amendment-package/versions":{"post":{"description":"Renders the letter, takes the AUP certificate as uploaded and, when the amendment adds projects or activities, renders the RDTC report of those alone; stores them with the package archive as a new immutable version. Refused with 400 and the `missing` list while any required data is missing, with 400 when the RDTC report is due but the expense ledger cannot be summarized, with 400 when the product is not an R&D Supplemental Amendment, with 404 when the recipient is not a DDEC officer, with 409 when the AUP certificate is replaced or removed meanwhile, and with 503 when the RDTC report could not be written (retry later); a failed generation stores nothing.","operationId":"RndAmendmentPackageController_generate","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRndAmendmentPackageDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndAmendmentPackageVersionDto"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Generate the next version of the amendment package","tags":["R&D - Amendment Package"]},"get":{"operationId":"RndAmendmentPackageController_listVersions","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndAmendmentPackageVersionsDto"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"List the generated package versions, newest first","tags":["R&D - Amendment Package"]}},"/v1/org-products/{orgProductId}/amendment-package/versions/{versionId}/files/{kind}":{"get":{"description":"The letter (.docx), the AUP certificate as uploaded, the New Projects and Activities RDTC report (.docx; 404 for a version without one) or the whole version as one .zip, byte for byte as generated.","operationId":"RndAmendmentPackageController_downloadFile","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"versionId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}},{"name":"kind","required":true,"in":"path","schema":{"$ref":"#/components/schemas/RndAmendmentPackageFileKind"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Download one stored file of a package version","tags":["R&D - Amendment Package"]}},"/v1/rnd/{orgProductId}/vouching":{"get":{"description":"Returns transactions grouped by R&D category, uploaded files, KPI counts, and processing state for the vouching tab/page. Search and filters narrow the transactions inside each category and never change a category’s own totals or document counts, which describe the category rather than the current view of it.","operationId":"RndVouchingController_get","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"search","required":false,"in":"query","description":"Matches supplier name, transaction number and description, case-insensitively.","schema":{"type":"string"}},{"name":"confidenceMin","required":false,"in":"query","description":"Lowest match confidence to include, 0–100. A transaction with no matched document has no confidence and is never inside a range.","schema":{"minimum":0,"maximum":100,"type":"number"}},{"name":"confidenceMax","required":false,"in":"query","description":"Highest match confidence to include, 0–100.","schema":{"minimum":0,"maximum":100,"type":"number"}},{"name":"fileUploaded","required":false,"in":"query","description":"Whether to return everything, only transactions with at least one document of any type, or only transactions with none.","schema":{"$ref":"#/components/schemas/VouchingFileUploadedFilter"}},{"name":"hideApproved","required":false,"in":"query","description":"Leave out transactions that have been approved, Vouched without exception (which stands on an approval) included.","schema":{"type":"boolean"}},{"name":"pendingInvoice","required":false,"in":"query","description":"Return transactions awaiting an invoice. Combined with pendingPayment, pendingApproval or documentIssue, any of them qualifies.","schema":{"type":"boolean"}},{"name":"pendingPayment","required":false,"in":"query","description":"Return transactions awaiting evidence of payment. Combined with pendingInvoice, pendingApproval or documentIssue, any of them qualifies.","schema":{"type":"boolean"}},{"name":"pendingApproval","required":false,"in":"query","description":"Return transactions with their invoice and payment attached, awaiting approval. Combined with pendingInvoice, pendingPayment or documentIssue, any of them qualifies.","schema":{"type":"boolean"}},{"name":"documentIssue","required":false,"in":"query","description":"Return transactions in Document issue. Combined with pendingInvoice, pendingPayment or pendingApproval, any of them qualifies.","schema":{"type":"boolean"}},{"name":"notCompleted","required":false,"in":"query","description":"Return transactions whose evidence of payment does not equal their Selected Sample amount — too little and too much alike. An amount comparison only: it says nothing about whether the transaction was approved.","schema":{"type":"boolean"}},{"name":"withNewDocuments","required":false,"in":"query","description":"Return transactions with at least one new document: a client upload no DECA admin has seen yet.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VouchingDataDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the full vouching view","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/processing-status":{"get":{"description":"The processing half of the vouching view on its own, cheap enough to poll while a batch is being classified.","operationId":"RndVouchingController_getProcessingStatus","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VouchingProcessingStatusDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get progress of the in-flight vouching upload","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/documents":{"get":{"description":"Backs the All Documents sidebar. A document appears once however many transactions it supports. Search, type, date, linked and category filters apply here only — they are independent of the transaction table’s own filters. Documents carrying no date never match a date range.","operationId":"RndVouchingController_listDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"search","required":false,"in":"query","description":"Matches the document name and the attached file name on a partial, case-insensitive substring.","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","description":"A document type, or `untyped` for documents that have no type yet. `other` matches what the Other Docs tab and counts hold — documents decided to be `other` and documents with no type yet alike; `untyped` matches only the latter.","schema":{"$ref":"#/components/schemas/VouchingDocumentTypeFilter"}},{"name":"dateFrom","required":false,"in":"query","description":"Start of the document-date range as `YYYY-MM-DD`, inclusive. Documents carrying no date never match a range.","schema":{"format":"date","type":"string"}},{"name":"dateTo","required":false,"in":"query","description":"End of the document-date range as `YYYY-MM-DD`, inclusive.","schema":{"format":"date","type":"string"}},{"name":"linked","required":false,"in":"query","description":"Whether to return everything, only documents supporting at least one Selected Sample transaction, or only documents supporting none.","schema":{"$ref":"#/components/schemas/VouchingDocumentLinkedFilter"}},{"name":"category","required":false,"in":"query","description":"Only documents supporting a transaction in this category.","schema":{"$ref":"#/components/schemas/RndAupExpenseCategory"}},{"name":"show","required":false,"in":"query","description":"Everything, only new documents (a client upload no DECA admin has seen; DECA staff only, anyone else gets everything), or only those needing attention: no type yet, or supporting no transaction.","schema":{"$ref":"#/components/schemas/VouchingDocumentShowFilter"}},{"name":"uploadedFrom","required":false,"in":"query","description":"Start of the upload-date range as `YYYY-MM-DD`, a day in the operating timezone, inclusive.","schema":{"format":"date","type":"string"}},{"name":"uploadedTo","required":false,"in":"query","description":"End of the upload-date range as `YYYY-MM-DD`, a day in the operating timezone, inclusive.","schema":{"format":"date","type":"string"}},{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VouchingDocumentsResponseDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List every supporting document uploaded for this application","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/documents/{fileId}":{"get":{"description":"The All Documents record of one document, for the detailed preview.","operationId":"RndVouchingController_getDocument","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"fileId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VouchingDocumentEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Get one supporting document","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/export":{"get":{"description":"Streams the full CPA workbook — Addendum A Schedules 1–3 from the AUP Data inputs, Addendum B from every transaction — at any point of vouching. INVOICE/PAYMENT cells show what the CPA recorded, else what DECA read from the transaction's linked documents. Each row carries a hidden DECA Ref, and the workbook keeps what it was downloaded with, so uploading it back updates these transactions instead of adding new ones. Admin portal only: it carries the CPA's working papers.","operationId":"RndVouchingController_export","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Excel file download","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Download the CPA workbook populated with current AUP Data and Vouching","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/summary-export":{"get":{"description":"Excel, one row per transaction of the AUP grouped by category: category, Sample #, supplier, transaction number, date, invoice amount, invoice numbers (highlighted, else read off the invoices), total invoices and payments, status, AI confidence, the documents' counts by type, and the reason of a Document issue.","operationId":"RndVouchingController_exportSummary","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Excel file download","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Download the per-transaction vouching summary (admin only)","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/uploads/init":{"post":{"description":"Creates a batch and returns signed URLs for direct upload. PUT each file to its URL, then call /uploads/:batchId/start. Takes PDF and PNG files, and ZIP archives of them: an archive is unpacked, and an entry in any other format is left out unstored and named on the batch’s `skippedUnsupportedNames`. With `replacesDocumentId` the single file replaces that document, which the server removes with its highlighted lines once the replacement is processed.","operationId":"RndVouchingController_initUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitVouchingUploadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUploadInitEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Initialize a vouching document upload","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/uploads/duplicates":{"post":{"description":"Asked before an upload: a file is a duplicate when a document of any of the organization’s applications has the same size and the same name, the one it was uploaded under or the one it was renamed to — for an external CPA, any application past Backlog — leaving out copies discarded as duplicates and uploads whose bytes never arrived. Such a file is left out of the upload, and the document it duplicates is previewed instead. Archives are expanded only on upload, so their contents are never matched here.","operationId":"RndVouchingController_findDuplicateDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindDuplicateDocumentsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VouchingDuplicatesDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Find the files of an upload the organization already holds","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/uploads/{batchId}/start":{"post":{"description":"Kicks off extraction + classification of the uploaded files against the sample-selection transactions.","operationId":"RndVouchingController_startUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUploadBatchEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Start processing an uploaded vouching batch","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/uploads/{batchId}/cancel":{"post":{"description":"Retires a batch the client stopped uploading to, so the panel takes a new upload immediately. Does nothing to a batch that already started processing.","operationId":"RndVouchingController_cancelUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Cancel an upload whose transfer was aborted","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/transactions":{"post":{"description":"Appends a transaction to an existing sample selection. Only the category and the amount are required — they are what the category totals and the evidence comparison are read against; the rest is filled in as it becomes known.","operationId":"RndVouchingController_createTransaction","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTransactionDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Add a transaction to the Selected Sample (admin only)","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/transactions/{transactionId}":{"patch":{"description":"Writes only the fields present in the body. Sending `categoryKey` moves the transaction; its documents go with it, since they are attached to the transaction rather than the category. An edit that changes the category or the amount un-approves the transaction and clears its hand-set status. Document issue, Exception noted and Vouched without exception stay, and a Vouched without exception transaction keeps its approval.","operationId":"RndVouchingController_updateTransaction","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTransactionDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Edit a transaction, or move it to another category (admin only)","tags":["R&D Vouching"]},"delete":{"description":"Deletes the transaction’s notes and highlighted document lines with it. The documents it held are not deleted — they were uploaded for the application, not for this row, and each stays in All Documents. One left supporting nothing reappears as unlinked.","operationId":"RndVouchingController_deleteTransaction","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Remove a transaction from the Selected Sample (admin only)","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/transactions/{transactionId}/status":{"patch":{"description":"Overrides the status derived from its documents, and sets the approval to match (Exception noted keeps the approval). It never touches the workbook examination; Exception noted counts toward Addendum A by itself, so the category's line is recalculated when a transaction gains or loses it. `approved` needs a supporting document and no open Document issue, like an approval; `vouched_without_exception` needs the transaction approved first. Cleared when an approval decision or a request for further documents is recorded on the transaction, when its amount or category is edited, and when a document is linked to it, detached from it, moved onto or off it, retyped, re-checked, replaced or deleted. A classification pass that only removes one of its links leaves it. `document_issue`, `exception_noted` and `vouched_without_exception` are otherwise never cleared by a document action, and an approval decision keeps the first two, and Vouched while the transaction stays approved: only a reviewer picking another status or a request for further documents ends them, and taking the approval back also ends Vouched. The one document action that ends Vouched: one that leaves the transaction with no invoice (a detach, move, retype to anything but an invoice, delete, replace, re-check, or the pipeline discarding a copy) drops it back to `pending_invoice`, its approval with it.","operationId":"RndVouchingController_setTransactionStatus","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetTransactionStatusDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Set a transaction’s status by hand (admin only)","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/transactions/bulk-status":{"post":{"description":"Each transaction is set as the single route sets it; one that may not take the status (Vouched before approval, Approved without a document or with a Document issue) is skipped and named in `skipped`, and the rest still change.","operationId":"RndVouchingController_setTransactionsStatus","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetTransactionsStatusDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetTransactionsStatusResultDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Set the status of several transactions by hand (admin only)","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/transactions/{transactionId}/misstatement":{"patch":{"description":"The mark is the CPA workbook’s \"Exception noted\" examination: marking sets it, and clearing restores the CPA’s examination it replaced (blank when there was none). Its sampled amount counts once toward the category’s Misstatement from Vouching, and the category’s Addendum A line is recalculated. The mark leaves the approval and the status alone, and survives document actions and status changes.","operationId":"RndVouchingController_setTransactionMisstatement","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetMisstatementDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Mark a transaction as a misstatement, or clear the mark (admin only)","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/categories/{category}/misstatement":{"patch":{"description":"As the per-transaction route, for the whole category at once; a transaction already marked stays counted once. The category’s Addendum A line is recalculated.","operationId":"RndVouchingController_setCategoryMisstatement","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"category","required":true,"in":"path","description":"AUP expense category","schema":{"$ref":"#/components/schemas/RndAupExpenseCategory"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetMisstatementDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Mark every transaction of a category as a misstatement, or clear every mark (admin only)","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/transactions/{transactionId}/approve":{"patch":{"description":"A transaction can only be approved when it has a supporting document and no open Document issue. An approval decision leaves a Document issue or Exception noted status in place, and clears the reviewer note of a request for further documents into the history. Omit `approved` to toggle between approved and pending.","operationId":"RndVouchingController_approveTransaction","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveTransactionDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VouchingTransactionEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Approve (or toggle) a transaction (admin only)","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/transactions/reupload-request":{"post":{"description":"Puts the selected transactions in Further documents required with the optional reviewer note, logs it and emails the client the note.","operationId":"RndVouchingController_requestFurtherDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FurtherDocumentsRequestDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Request further documents for selected transactions (admin only)","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/transactions/{transactionId}/recheck":{"post":{"description":"Re-matches the best document of this transaction against the current transactions, reusing what was already read off the file. Manual links survive. Each transaction losing the document is un-approved and loses its hand-set status first. Document issue, Exception noted and Vouched without exception stay, and a Vouched without exception transaction keeps its approval, unless the document is its only invoice: then it drops back to Pending invoice, its approval with it. A line highlighted for a link the re-check drops stops counting until the link is restored. Refused while the document is still processing.","operationId":"RndVouchingController_recheckMatch","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestedDocumentEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Re-check a transaction’s document match","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/files/seen":{"post":{"description":"A document a client uploaded is new until a DECA admin opens its preview or marks it seen; one uploaded from the admin portal, by DECA staff or an external CPA, is seen from the start. Quiet and idempotent: no log, no notification; a document already seen keeps its first time.","operationId":"RndVouchingController_markDocumentsSeen","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkDocumentsSeenDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Mark client uploads as seen (internal admins only)","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/files/{fileId}/allocate":{"post":{"description":"Manually assigns the file to one or more transactions (confidence 100%), all or none. Refused while the document is still processing.","operationId":"RndVouchingController_allocateFile","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"fileId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllocateFileDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VouchingUploadedFileEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Allocate an uploaded file to transactions","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/files/{fileId}/type":{"patch":{"description":"Overrides the classifier with the user’s own answer. `other` is a decided answer and is not the same as having no type yet, which nothing here can restore. Extracted fields are not re-read, but the document date is re-picked for the new type. A change un-approves and clears the hand-set status of every transaction the document supports. Document issue, Exception noted and Vouched without exception stay, and a Vouched without exception transaction keeps its approval, unless the new type is not an invoice and the document was its only invoice: then it drops back to Pending invoice, its approval with it. Setting the type it already has changes nothing. Highlighted lines stay and count toward the new type’s total; under `other` they count toward neither. Refused while the document is still processing.","operationId":"RndVouchingController_setFileType","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"fileId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDocumentTypeDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VouchingUploadedFileEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Set what an uploaded document is","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/files/{fileId}/name":{"patch":{"description":"The document keeps its extension, its type, its links and its highlighted lines; the duplicate check matches both the name it was uploaded under and the new one. Renaming it to the name it has changes nothing. Refused while the document is still processing.","operationId":"RndVouchingController_renameFile","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"fileId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameVouchingDocumentDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VouchingUploadedFileEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Rename an uploaded document","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/files/{fileId}/move":{"post":{"description":"Attaches the destination, then detaches the source. Each transaction losing the document is un-approved and loses its hand-set status first. Document issue, Exception noted and Vouched without exception stay, and a Vouched without exception transaction keeps its approval, unless the document is its only invoice: then it drops back to Pending invoice, its approval with it. The destination keeps its approval and loses any hand-set status but Document issue, Exception noted or Vouched without exception. A failure between the two leaves the document on both transactions; repeating the move completes it. The lines highlighted on the document for the source are deleted; the destination’s stay. Every other transaction the document supports is left alone. The document has to be linked to the source transaction. Refused while the document is still processing.","operationId":"RndVouchingController_moveFile","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"fileId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveFileDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VouchingUploadedFileEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Move a document from one transaction to another","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/files/{fileId}/transactions/{transactionId}":{"delete":{"description":"Removes only this one association. The document stays uploaded and keeps every other transaction it supports — deleting the document itself is DELETE /files/:fileId. Each transaction losing the document is un-approved and loses its hand-set status first. Document issue, Exception noted and Vouched without exception stay, and a Vouched without exception transaction keeps its approval, unless the document is its only invoice: then it drops back to Pending invoice, its approval with it. The lines highlighted on the document for the transaction are deleted. Unlinking a document that is not linked to the transaction changes nothing. Refused while the document is still processing.","operationId":"RndVouchingController_unlinkFile","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"fileId","required":true,"in":"path","schema":{"type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VouchingUploadedFileEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Detach a document from one transaction","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/files/{fileId}":{"delete":{"description":"Deletes the file and the lines highlighted on it. Each transaction losing the document is un-approved and loses its hand-set status first. Document issue, Exception noted and Vouched without exception stay, and a Vouched without exception transaction keeps its approval, unless the document is its only invoice: then it drops back to Pending invoice, its approval with it. Idempotent: deleting a file that is already gone succeeds. Refused while the document is still processing.","operationId":"RndVouchingController_deleteFile","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"fileId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete an uploaded file","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/files/{fileId}/preview":{"get":{"description":"Redirects to a short-lived signed URL. A PDF or a JPEG, PNG, GIF or WebP image is served for the browser to show in place; any other file, and one refused as `unsupported_type`, downloads under its file name.","operationId":"RndVouchingController_previewFile","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"fileId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"302":{"description":"Redirect to a short-lived signed URL"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Preview or download a file","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/send-to-review":{"post":{"description":"Notifies the assigned admins that documents are ready.","operationId":"RndVouchingController_sendToReview","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}},"409":{"description":"The documents are already being sent for review, or were just sent."},"503":{"description":"No admin could be notified; the send can be retried."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Submit the vouching set for admin review","tags":["R&D Vouching"]}},"/v1/rnd/{orgProductId}/vouching/transactions/{transactionId}/notes":{"get":{"description":"Root notes for the requested audience, newest first. `visibility` is required: the internal and client threads are separate conversations, and defaulting it would answer the wrong one.","operationId":"RndVouchingNotesController_findMany","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"visibility","required":true,"in":"query","description":"Which thread to act on. `internal` is staff-only commentary; `client` is the client-facing staff thread.","schema":{"$ref":"#/components/schemas/NoteVisibility"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VouchingNotesResponseDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List one of a transaction’s note threads","tags":["R&D Vouching Notes"]},"post":{"description":"A note or reply by a DECA admin may mention other DECA admins who can open the organization; any other mention is kept as plain text. Each person newly mentioned gets a notification and an email.","operationId":"RndVouchingNotesController_create","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVouchingNoteDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VouchingNoteEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Add a note to a transaction","tags":["R&D Vouching Notes"]}},"/v1/rnd/{orgProductId}/vouching/transactions/{transactionId}/notes/{noteId}":{"patch":{"description":"Only the note’s own author may edit it.","operationId":"RndVouchingNotesController_update","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNoteWithMentionsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VouchingNoteEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Edit a note","tags":["R&D Vouching Notes"]},"delete":{"description":"Only the note’s own author may delete it.","operationId":"RndVouchingNotesController_remove","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete a note and its replies","tags":["R&D Vouching Notes"]}},"/v1/rnd/{orgProductId}/vouching/transactions/{transactionId}/notes/{noteId}/replies":{"get":{"operationId":"RndVouchingNotesController_findReplies","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NoteReplyEntity"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List a thread’s replies, oldest first","tags":["R&D Vouching Notes"]},"post":{"description":"A reply inherits its root’s audience, so none is accepted here.","operationId":"RndVouchingNotesController_createReply","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNoteWithMentionsDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteReplyEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Reply in a thread","tags":["R&D Vouching Notes"]}},"/v1/rnd/{orgProductId}/vouching/transactions/{transactionId}/notes/{noteId}/replies/{replyId}":{"patch":{"operationId":"RndVouchingNotesController_updateReply","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","schema":{"type":"string"}},{"name":"replyId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNoteWithMentionsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteReplyEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Edit a reply","tags":["R&D Vouching Notes"]},"delete":{"operationId":"RndVouchingNotesController_deleteReply","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","schema":{"type":"string"}},{"name":"replyId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete a reply","tags":["R&D Vouching Notes"]}},"/v1/rnd/{orgProductId}/vouching/transactions/{transactionId}/notes/{noteId}/read":{"post":{"description":"A marker ahead of the server clock is clamped to now, so replies nobody has seen are not marked read.","operationId":"RndVouchingNotesController_markThreadRead","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkNoteThreadReadDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Mark a thread caught up for the caller","tags":["R&D Vouching Notes"]}},"/v1/rnd/{orgProductId}/vouching/documents/{fileId}/highlights":{"get":{"description":"Every line highlighted on the document for a transaction it is linked to, by page and then from the top. A line highlighted for a link a re-check dropped is left out, and comes back when the link is restored.","operationId":"RndVouchingHighlightsController_findMany","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"fileId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VouchingHighlightEntity"}}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"List the lines highlighted on a document","tags":["R&D Vouching Highlights"]},"post":{"description":"Saves boxes over lines of the document, each with its line’s amount and for a transaction the document is linked to — all of them or none. While a link is live, the total of its transaction’s lines is the document’s share for it (`attributedShare`). Only an invoice or a payment takes highlights, an image has one page, and a document holds at most 200 lines. Approvals and hand-set statuses are left alone. Refused while the document is still processing.","operationId":"RndVouchingHighlightsController_create","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"fileId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVouchingHighlightsDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VouchingHighlightEntity"}}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Save the lines selected on a document","tags":["R&D Vouching Highlights"]}},"/v1/rnd/{orgProductId}/vouching/documents/{fileId}/highlights/{highlightId}":{"delete":{"description":"Refused while the document is still processing.","operationId":"RndVouchingHighlightsController_remove","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"fileId","required":true,"in":"path","schema":{"type":"string"}},{"name":"highlightId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Delete a highlighted line","tags":["R&D Vouching Highlights"]}},"/v1/rnd/{orgProductId}/vouching/documents/{documentId}/comments":{"get":{"description":"Every thread on the document, open and resolved, by page and then top to bottom. Each carries its area and its root note; replies are fetched per thread.","operationId":"RndVouchingAreaCommentsController_findMany","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VouchingAreaCommentEntity"}}}}},"403":{"description":"Internal admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"List a document’s area comments","tags":["R&D Vouching Area Comments"]},"post":{"description":"Starts a thread on a box of one page: drawn, or around selected text, which `quote` keeps.","operationId":"RndVouchingAreaCommentsController_create","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVouchingAreaCommentDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VouchingAreaCommentEntity"}}}},"403":{"description":"Internal admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Comment on an area of a document","tags":["R&D Vouching Area Comments"]}},"/v1/rnd/{orgProductId}/vouching/documents/{documentId}/comments/pdf":{"get":{"description":"The document as a PDF with every thread, open and resolved: a highlight or box annotation on its area holding the thread, and Comments pages after the last page listing them by pin number. A JPEG or PNG becomes a one-page PDF. Built on request, never stored; the plain download stays the original file.","operationId":"RndVouchingAreaCommentsController_downloadWithComments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Internal admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}},"422":{"description":"The document is not a PDF, JPEG or PNG, is too large to build in memory (a file over the upload limit, a PNG with more pixels than can be decoded safely, or one that runs past the memory or time building it may take), needs a password, or cannot be read."},"503":{"description":"Too many files are being prepared right now. Try again in a minute."}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Download a document with its area comments","tags":["R&D Vouching Area Comments"]}},"/v1/rnd/{orgProductId}/vouching/documents/{documentId}/comments/{commentId}/resolved":{"patch":{"description":"Anyone who may comment resolves or reopens a thread; a resolved one leaves the page until resolved ones are shown.","operationId":"RndVouchingAreaCommentsController_setResolved","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"documentId","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/SetVouchingAreaCommentResolvedDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VouchingAreaCommentEntity"}}}},"403":{"description":"Internal admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Resolve or reopen an area comment","tags":["R&D Vouching Area Comments"]}},"/v1/rnd/{orgProductId}/vouching/documents/{documentId}/comments/{commentId}":{"delete":{"description":"Only its author deletes a thread; its replies go with it.","operationId":"RndVouchingAreaCommentsController_delete","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"commentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Internal admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Delete an area comment","tags":["R&D Vouching Area Comments"]}},"/v1/rnd/{orgProductId}/vouching/documents/{documentId}/comments/{commentId}/replies":{"get":{"operationId":"RndVouchingAreaCommentsController_findReplies","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"commentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NoteReplyEntity"}}}}},"403":{"description":"Internal admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"List an area comment’s replies","tags":["R&D Vouching Area Comments"]},"post":{"operationId":"RndVouchingAreaCommentsController_createReply","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"documentId","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/CreateNoteDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteReplyEntity"}}}},"403":{"description":"Internal admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Reply to an area comment","tags":["R&D Vouching Area Comments"]}},"/v1/rnd/{orgProductId}/analytics/step-start":{"post":{"description":"Idempotent: only the first call ever for this section stamps startedAt and reports isFirstOpen.","operationId":"RndStepAnalyticsController_stepStart","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndStepEventDto"}}}},"responses":{"200":{"description":"Section open recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndStepStartResultDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Record first open of an RDTC form section","tags":["R&D Step Analytics"]}},"/v1/rnd/{orgProductId}/analytics/step-complete":{"post":{"description":"Idempotent: only the first call ever for this section stamps completedAt and reports isFirstComplete.","operationId":"RndStepAnalyticsController_stepComplete","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndStepCompleteEventDto"}}}},"responses":{"200":{"description":"Section completion recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndStepCompleteResultDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Record completion of an RDTC form section","tags":["R&D Step Analytics"]}},"/v1/rnd/metrics":{"get":{"description":"Overall and per-section fill metrics for the RDTC client form over a date range.","operationId":"RndMetricsController_getMetrics","parameters":[{"name":"startDate","required":false,"in":"query","description":"Inclusive start of the reporting range, as an instant. Bounds the filing lifecycle columns, which store instants.","schema":{"format":"date-time","example":"2026-09-01T00:00:00.000Z","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Inclusive end of the range, as an instant.","schema":{"format":"date-time","example":"2026-09-30T23:59:59.999Z","type":"string"}},{"name":"startDay","required":true,"in":"query","description":"Inclusive start of the range as the viewer's own calendar day. Bounds the Clarity rollups, which are stored per UTC calendar day.","schema":{"format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-01","type":"string"}},{"name":"endDay","required":true,"in":"query","description":"Inclusive end of the range as the viewer's own calendar day.","schema":{"format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-09-30","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndMetricsDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"R&D tax credit funnel metrics","tags":["R&D Metrics"]}},"/v1/rnd/metrics/clarity/refresh":{"post":{"description":"Spends one of Clarity's daily export calls and overwrites the most recent day's rollup. Refused with 429 once the allowance available to a manual refresh is gone — one call is held back until the nightly run has spent its own.","operationId":"RndMetricsController_refreshClarity","parameters":[],"responses":{"204":{"description":"The snapshot was re-taken. The refreshed allowance arrives with the metrics the caller refetches."},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"The day this refresh would file under is already owned by a finished nightly capture, or Clarity returned an empty window for a day that holds data."},"429":{"description":"Clarity's daily export allowance is spent."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Re-take the latest Clarity snapshot","tags":["R&D Metrics"]}},"/v1/rnd/metrics/products":{"get":{"description":"One row per filing that started or was first submitted inside the range.","operationId":"RndMetricsController_getProducts","parameters":[{"name":"startDate","required":false,"in":"query","description":"Inclusive start of the reporting range, as an instant. Bounds the filing lifecycle columns, which store instants.","schema":{"format":"date-time","example":"2026-09-01T00:00:00.000Z","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Inclusive end of the range, as an instant.","schema":{"format":"date-time","example":"2026-09-30T23:59:59.999Z","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RndProductMetricsDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"R&D tax credit filings breakdown","tags":["R&D Metrics"]}},"/v1/act60/{orgProductId}/business-summary":{"post":{"description":"Submit the completed business information wizard for Act 60.","operationId":"Act60BusinessSummaryController_submit","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60SubmitBusinessSummaryDto"}}}},"responses":{"201":{"description":"Business summary submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BusinessSummaryEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Submit business summary","tags":["Act 60 - Business Summary"]},"get":{"description":"Retrieve submitted business summary data.","operationId":"Act60BusinessSummaryController_getData","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Business summary retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BusinessSummaryEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get business summary","tags":["Act 60 - Business Summary"]},"put":{"description":"Update business summary data.","operationId":"Act60BusinessSummaryController_update","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60UpdateBusinessSummaryDto"}}}},"responses":{"200":{"description":"Business summary updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BusinessSummaryEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update business summary","tags":["Act 60 - Business Summary"]}},"/v1/act60/{orgProductId}/business-summary/prefill":{"get":{"description":"Values seeded from the Business Profile to pre-populate the screening wizard for client confirmation.","operationId":"Act60BusinessSummaryController_getPrefill","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Business summary prefill retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BusinessSummaryPrefillDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get business summary prefill","tags":["Act 60 - Business Summary"]}},"/v1/act60/{orgProductId}/business-summary/draft":{"get":{"description":"The client's unsubmitted assessment answers. 404 when there is no draft.","operationId":"Act60BusinessSummaryController_getDraft","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Business summary draft retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BusinessSummaryDraftEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get business summary draft","tags":["Act 60 - Business Summary"]},"put":{"description":"Saves the assessment answers without validating them. Kept apart from the submitted summary and from the decree form draft; a submit discards it.","operationId":"Act60BusinessSummaryController_saveDraft","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60SaveBusinessSummaryDraftDto"}}}},"responses":{"200":{"description":"Business summary draft saved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BusinessSummaryDraftEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Save business summary draft","tags":["Act 60 - Business Summary"]}},"/v1/act60/{orgProductId}/business-summary/decree-type":{"patch":{"description":"Admin sets the decree type for the business summary.","operationId":"Act60BusinessSummaryController_setDecreeType","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60SetDecreeTypeDto"}}}},"responses":{"200":{"description":"Decree type set successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BusinessSummaryEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Set decree type","tags":["Act 60 - Business Summary"]}},"/v1/act60/{orgProductId}/individual-summary":{"post":{"description":"Submit the completed individual information wizard for Act 60.","operationId":"Act60IndividualSummaryController_submit","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60SubmitIndividualSummaryDto"}}}},"responses":{"201":{"description":"Individual summary submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60IndividualSummaryEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Submit individual summary","tags":["Act 60 - Individual Summary"]},"get":{"description":"Retrieve submitted individual summary data.","operationId":"Act60IndividualSummaryController_getData","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Individual summary retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60IndividualSummaryEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get individual summary","tags":["Act 60 - Individual Summary"]},"put":{"description":"Update individual summary data.","operationId":"Act60IndividualSummaryController_update","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60UpdateIndividualSummaryDto"}}}},"responses":{"200":{"description":"Individual summary updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60IndividualSummaryEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update individual summary","tags":["Act 60 - Individual Summary"]}},"/v1/act60/{orgProductId}/individual-summary/prefill":{"get":{"description":"Values seeded from the Individual Profile to pre-populate the screening wizard for client confirmation.","operationId":"Act60IndividualSummaryController_getPrefill","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Individual summary prefill retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60IndividualSummaryPrefillDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get individual summary prefill","tags":["Act 60 - Individual Summary"]}},"/v1/act60/{orgProductId}/individual-summary/decree-type":{"patch":{"description":"Admin sets the decree type for the individual summary.","operationId":"Act60IndividualSummaryController_setDecreeType","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60SetIndividualDecreeTypeDto"}}}},"responses":{"200":{"description":"Decree type set successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60IndividualSummaryEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Set decree type","tags":["Act 60 - Individual Summary"]}},"/v1/act60/{orgProductId}/manufacturing":{"post":{"description":"Submit the completed manufacturing information for Act 60 manufacturing decree type.","operationId":"Act60ManufacturingController_submit","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60SubmitManufacturingDto"}}}},"responses":{"201":{"description":"Manufacturing information submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60ManufacturingEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Submit manufacturing information","tags":["Act 60 - Manufacturing"]},"get":{"description":"Retrieve submitted manufacturing information data.","operationId":"Act60ManufacturingController_getData","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Manufacturing information retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60ManufacturingEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get manufacturing information","tags":["Act 60 - Manufacturing"]}},"/v1/act60/{orgProductId}/manufacturing/prefill":{"get":{"description":"Aggregate Business Profile, screening, and questionnaire values to seed the manufacturing form.","operationId":"Act60ManufacturingController_getPrefill","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Manufacturing prefill retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60ManufacturingPrefillDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get manufacturing prefill","tags":["Act 60 - Manufacturing"]}},"/v1/act60/{orgProductId}/manufacturing/documents/bulk-uploads/init":{"post":{"description":"Creates a batch and returns a signed URL per file. PUT each file straight to its URL, then call `bulk-uploads/:batchId/start`. Any `.zip` in the selection is expanded server-side.","operationId":"Act60ManufacturingDocumentsController_initBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60InitBulkUploadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUploadInitEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Start a bulk document upload","tags":["Act 60 - Manufacturing Documents"]}},"/v1/act60/{orgProductId}/manufacturing/documents/bulk-uploads/{batchId}/start":{"post":{"description":"Hands the batch to background processing and returns immediately. Poll `bulk-uploads/:batchId` for progress; the work continues if the user navigates away.","operationId":"Act60ManufacturingDocumentsController_startBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BulkUploadStatusDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Begin processing an uploaded batch","tags":["Act 60 - Manufacturing Documents"]}},"/v1/act60/{orgProductId}/manufacturing/documents/bulk-uploads/active":{"get":{"description":"Returns the batch still running or awaiting confirmation for this application, so the page can pick up where the user left off. Null when there is nothing outstanding.","operationId":"Act60ManufacturingDocumentsController_getActiveBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60ActiveBulkUploadDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the outstanding bulk upload, if any","tags":["Act 60 - Manufacturing Documents"]}},"/v1/act60/{orgProductId}/manufacturing/documents/bulk-uploads/{batchId}":{"get":{"description":"Poll while processing.","operationId":"Act60ManufacturingDocumentsController_getBulkUploadStatus","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BulkUploadStatusDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get bulk upload progress","tags":["Act 60 - Manufacturing Documents"]}},"/v1/act60/{orgProductId}/manufacturing/documents/bulk-uploads/{batchId}/review":{"get":{"description":"Every uploaded file with its suggested category. A null `suggestedCategory` means the file was not identified and must be categorised before confirming.","operationId":"Act60ManufacturingDocumentsController_getBulkUploadReview","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BulkUploadReviewDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the review & confirm list","tags":["Act 60 - Manufacturing Documents"]}},"/v1/act60/{orgProductId}/manufacturing/documents/bulk-uploads/documents/{documentId}/category":{"put":{"description":"Replaces the suggestion for one staged file. The file is still not attached to the application until the batch is confirmed.","operationId":"Act60ManufacturingDocumentsController_setBulkUploadDocumentCategory","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60SetDocumentCategoryDto"}}}},"responses":{"204":{"description":"Category updated"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Override a suggested category","tags":["Act 60 - Manufacturing Documents"]}},"/v1/act60/{orgProductId}/manufacturing/documents/bulk-uploads/documents/{documentId}":{"delete":{"description":"Removes a staged file and its stored object.","operationId":"Act60ManufacturingDocumentsController_removeBulkUploadDocument","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"File removed"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Drop a file from the review list","tags":["Act 60 - Manufacturing Documents"]}},"/v1/act60/{orgProductId}/manufacturing/documents/bulk-uploads/{batchId}/confirm":{"post":{"description":"Attaches each file to its category, writes the categories it files into without the files the form has removed but not yet saved, and returns the refreshed documents. Does not send anything for review — use the existing upload route for that.","operationId":"Act60ManufacturingDocumentsController_confirmBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60ConfirmBulkUploadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Confirm & add the reviewed documents","tags":["Act 60 - Manufacturing Documents"]}},"/v1/act60/{orgProductId}/manufacturing/documents/bulk-uploads/{batchId}/cancel":{"post":{"description":"Retires a batch the client stopped uploading to, so the section takes a new upload immediately. Does nothing to a batch that already started processing.","operationId":"Act60ManufacturingDocumentsController_cancelBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Upload cancelled"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Cancel an upload whose transfer was aborted","tags":["Act 60 - Manufacturing Documents"]}},"/v1/act60/{orgProductId}/manufacturing/documents/bulk-uploads/{batchId}/discard":{"post":{"description":"Closes the batch without attaching anything, so the review stops reappearing.","operationId":"Act60ManufacturingDocumentsController_discardBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Review dismissed"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Dismiss a pending review","tags":["Act 60 - Manufacturing Documents"]}},"/v1/act60/{orgProductId}/manufacturing/documents":{"get":{"description":"Retrieve uploaded documents by category.","operationId":"Act60ManufacturingDocumentsController_getDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Documents retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get documents","tags":["Act 60 - Manufacturing Documents"]},"put":{"description":"Upload or replace documents for one or more categories and other documents, optionally sending them for review. A request that changes nothing writes nothing.","operationId":"Act60ManufacturingDocumentsController_uploadDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60UploadDocumentsDto"}}}},"responses":{"200":{"description":"Documents uploaded successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Upload documents","tags":["Act 60 - Manufacturing Documents"]}},"/v1/act60/{orgProductId}/manufacturing/documents/other":{"get":{"description":"Retrieve the supporting documents the client named under \"Other\", oldest first.","operationId":"Act60ManufacturingDocumentsController_getOtherDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Other documents retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentSectionDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get other documents","tags":["Act 60 - Manufacturing Documents"]}},"/v1/act60/{orgProductId}/manufacturing/documents/not-applicable":{"put":{"description":"Mark a document category as (not) applicable for the client. Marking it not applicable also clears any uploaded files in that category, so files under review or approved block the change for non-staff.","operationId":"Act60ManufacturingDocumentsController_setNotApplicable","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProductDocumentNotApplicableDto"}}}},"responses":{"200":{"description":"Not-applicable flag updated successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Set document category not-applicable flag","tags":["Act 60 - Manufacturing Documents"]}},"/v1/act60/{orgProductId}/manufacturing/documents/{category}":{"delete":{"description":"Remove all documents in a category (e.g. when the client marks it not applicable). Documents under review or approved can only be removed by DECA staff.","operationId":"Act60ManufacturingDocumentsController_clearDocumentsCategory","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"category","required":true,"in":"path","schema":{"$ref":"#/components/schemas/ProductDocumentCategory"}}],"responses":{"200":{"description":"Documents category cleared successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Clear a documents category","tags":["Act 60 - Manufacturing Documents"]}},"/v1/act60/{orgProductId}/manufacturing/report/preview":{"get":{"operationId":"Act60ManufacturingReportController_getPreviewData","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Report preview data for frontend rendering","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60ManufacturingReportPreviewDto"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Get manufacturing report preview data","tags":["Act 60 - Manufacturing Report"]}},"/v1/act60/{orgProductId}/manufacturing/report/approve":{"post":{"operationId":"Act60ManufacturingReportController_approve","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Application approved by government","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Approve manufacturing by government","tags":["Act 60 - Manufacturing Report"]}},"/v1/act60/{orgProductId}/manufacturing/report/generate":{"post":{"operationId":"Act60ManufacturingReportController_generate","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"201":{"description":"Report generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Generate manufacturing report","tags":["Act 60 - Manufacturing Report"]}},"/v1/act60/{orgProductId}/manufacturing/report":{"get":{"operationId":"Act60ManufacturingReportController_getReport","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Report metadata retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Get manufacturing report metadata","tags":["Act 60 - Manufacturing Report"]}},"/v1/act60/naics-codes":{"get":{"operationId":"Act60NaicsCodesController_search","parameters":[{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Search by NAICS code or title (minimum 2 characters)","schema":{"type":"string"}},{"name":"scope","required":false,"in":"query","description":"Restrict results to a decree scope. \"manufacturing\" limits to codes starting with 31/32/33/54171/5132.","schema":{"type":"string","enum":["manufacturing"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Act60NaicsCodeEntity"}}}}}}}},"security":[{"cookie":[]}],"summary":"Search NAICS codes by code or title","tags":["Act 60 / NAICS Codes"]}},"/v1/act60/{orgProductId}/export":{"post":{"description":"Submit the completed export information for Act 60 export decree type.","operationId":"Act60ExportController_submit","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60SubmitExportDto"}}}},"responses":{"201":{"description":"Export information submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60ExportEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Submit export information","tags":["Act 60 - Export"]},"get":{"description":"Retrieve submitted export information data.","operationId":"Act60ExportController_getData","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Export information retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60ExportEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get export information","tags":["Act 60 - Export"]}},"/v1/act60/{orgProductId}/export/prefill":{"get":{"description":"Aggregate Business Profile, screening, and questionnaire values to seed the export form.","operationId":"Act60ExportController_getPrefill","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Export prefill retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60ExportPrefillDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get export prefill","tags":["Act 60 - Export"]}},"/v1/act60/{orgProductId}/export/documents/bulk-uploads/init":{"post":{"description":"Creates a batch and returns a signed URL per file. PUT each file straight to its URL, then call `bulk-uploads/:batchId/start`. Any `.zip` in the selection is expanded server-side.","operationId":"Act60ExportDocumentsController_initBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60InitBulkUploadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUploadInitEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Start a bulk document upload","tags":["Act 60 - Export Documents"]}},"/v1/act60/{orgProductId}/export/documents/bulk-uploads/{batchId}/start":{"post":{"description":"Hands the batch to background processing and returns immediately. Poll `bulk-uploads/:batchId` for progress; the work continues if the user navigates away.","operationId":"Act60ExportDocumentsController_startBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BulkUploadStatusDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Begin processing an uploaded batch","tags":["Act 60 - Export Documents"]}},"/v1/act60/{orgProductId}/export/documents/bulk-uploads/active":{"get":{"description":"Returns the batch still running or awaiting confirmation for this application, so the page can pick up where the user left off. Null when there is nothing outstanding.","operationId":"Act60ExportDocumentsController_getActiveBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60ActiveBulkUploadDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the outstanding bulk upload, if any","tags":["Act 60 - Export Documents"]}},"/v1/act60/{orgProductId}/export/documents/bulk-uploads/{batchId}":{"get":{"description":"Poll while processing.","operationId":"Act60ExportDocumentsController_getBulkUploadStatus","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BulkUploadStatusDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get bulk upload progress","tags":["Act 60 - Export Documents"]}},"/v1/act60/{orgProductId}/export/documents/bulk-uploads/{batchId}/review":{"get":{"description":"Every uploaded file with its suggested category. A null `suggestedCategory` means the file was not identified and must be categorised before confirming.","operationId":"Act60ExportDocumentsController_getBulkUploadReview","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BulkUploadReviewDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the review & confirm list","tags":["Act 60 - Export Documents"]}},"/v1/act60/{orgProductId}/export/documents/bulk-uploads/documents/{documentId}/category":{"put":{"description":"Replaces the suggestion for one staged file. The file is still not attached to the application until the batch is confirmed.","operationId":"Act60ExportDocumentsController_setBulkUploadDocumentCategory","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60SetDocumentCategoryDto"}}}},"responses":{"204":{"description":"Category updated"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Override a suggested category","tags":["Act 60 - Export Documents"]}},"/v1/act60/{orgProductId}/export/documents/bulk-uploads/documents/{documentId}":{"delete":{"description":"Removes a staged file and its stored object.","operationId":"Act60ExportDocumentsController_removeBulkUploadDocument","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"File removed"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Drop a file from the review list","tags":["Act 60 - Export Documents"]}},"/v1/act60/{orgProductId}/export/documents/bulk-uploads/{batchId}/confirm":{"post":{"description":"Attaches each file to its category, writes the categories it files into without the files the form has removed but not yet saved, and returns the refreshed documents. Does not send anything for review — use the existing upload route for that.","operationId":"Act60ExportDocumentsController_confirmBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60ConfirmBulkUploadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Confirm & add the reviewed documents","tags":["Act 60 - Export Documents"]}},"/v1/act60/{orgProductId}/export/documents/bulk-uploads/{batchId}/cancel":{"post":{"description":"Retires a batch the client stopped uploading to, so the section takes a new upload immediately. Does nothing to a batch that already started processing.","operationId":"Act60ExportDocumentsController_cancelBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Upload cancelled"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Cancel an upload whose transfer was aborted","tags":["Act 60 - Export Documents"]}},"/v1/act60/{orgProductId}/export/documents/bulk-uploads/{batchId}/discard":{"post":{"description":"Closes the batch without attaching anything, so the review stops reappearing.","operationId":"Act60ExportDocumentsController_discardBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Review dismissed"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Dismiss a pending review","tags":["Act 60 - Export Documents"]}},"/v1/act60/{orgProductId}/export/documents":{"get":{"description":"Retrieve uploaded documents by category.","operationId":"Act60ExportDocumentsController_getDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Documents retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get documents","tags":["Act 60 - Export Documents"]},"put":{"description":"Upload or replace documents for one or more categories and other documents, optionally sending them for review. A request that changes nothing writes nothing.","operationId":"Act60ExportDocumentsController_uploadDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60UploadDocumentsDto"}}}},"responses":{"200":{"description":"Documents uploaded successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Upload documents","tags":["Act 60 - Export Documents"]}},"/v1/act60/{orgProductId}/export/documents/other":{"get":{"description":"Retrieve the supporting documents the client named under \"Other\", oldest first.","operationId":"Act60ExportDocumentsController_getOtherDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Other documents retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentSectionDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get other documents","tags":["Act 60 - Export Documents"]}},"/v1/act60/{orgProductId}/export/documents/not-applicable":{"put":{"description":"Mark a document category as (not) applicable for the client. Marking it not applicable also clears any uploaded files in that category, so files under review or approved block the change for non-staff.","operationId":"Act60ExportDocumentsController_setNotApplicable","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProductDocumentNotApplicableDto"}}}},"responses":{"200":{"description":"Not-applicable flag updated successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Set document category not-applicable flag","tags":["Act 60 - Export Documents"]}},"/v1/act60/{orgProductId}/export/documents/{category}":{"delete":{"description":"Remove all documents in a category (e.g. when the client marks it not applicable). Documents under review or approved can only be removed by DECA staff.","operationId":"Act60ExportDocumentsController_clearDocumentsCategory","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"category","required":true,"in":"path","schema":{"$ref":"#/components/schemas/ProductDocumentCategory"}}],"responses":{"200":{"description":"Documents category cleared successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Clear a documents category","tags":["Act 60 - Export Documents"]}},"/v1/act60/{orgProductId}/export/report/preview":{"get":{"operationId":"Act60ExportReportController_getPreviewData","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Report preview data for frontend rendering","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60ExportReportPreviewDto"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Get export report preview data","tags":["Act 60 - Export Report"]}},"/v1/act60/{orgProductId}/export/report/approve":{"post":{"operationId":"Act60ExportReportController_approve","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Application approved by government","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Approve export by government","tags":["Act 60 - Export Report"]}},"/v1/act60/{orgProductId}/export/report/generate":{"post":{"operationId":"Act60ExportReportController_generate","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"201":{"description":"Report generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Generate export report","tags":["Act 60 - Export Report"]}},"/v1/act60/{orgProductId}/export/report":{"get":{"operationId":"Act60ExportReportController_getReport","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Report metadata retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Get export report metadata","tags":["Act 60 - Export Report"]}},"/v1/act60/{orgProductId}/tourism":{"post":{"description":"Submit the completed tourism information for Act 60 tourism decree type.","operationId":"Act60TourismController_submit","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60SubmitTourismDto"}}}},"responses":{"201":{"description":"Tourism information submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60TourismEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Submit tourism information","tags":["Act 60 - Tourism"]},"get":{"description":"Retrieve submitted tourism information data.","operationId":"Act60TourismController_getData","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Tourism information retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60TourismEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get tourism information","tags":["Act 60 - Tourism"]}},"/v1/act60/{orgProductId}/tourism/prefill":{"get":{"description":"Aggregate Business Profile and Incentives Assessment values to seed the tourism form.","operationId":"Act60TourismController_getPrefill","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Tourism prefill retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60TourismPrefillDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get tourism prefill","tags":["Act 60 - Tourism"]}},"/v1/act60/{orgProductId}/tourism/documents/bulk-uploads/init":{"post":{"description":"Creates a batch and returns a signed URL per file. PUT each file straight to its URL, then call `bulk-uploads/:batchId/start`. Any `.zip` in the selection is expanded server-side.","operationId":"Act60TourismDocumentsController_initBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60InitBulkUploadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUploadInitEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Start a bulk document upload","tags":["Act 60 - Tourism Documents"]}},"/v1/act60/{orgProductId}/tourism/documents/bulk-uploads/{batchId}/start":{"post":{"description":"Hands the batch to background processing and returns immediately. Poll `bulk-uploads/:batchId` for progress; the work continues if the user navigates away.","operationId":"Act60TourismDocumentsController_startBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BulkUploadStatusDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Begin processing an uploaded batch","tags":["Act 60 - Tourism Documents"]}},"/v1/act60/{orgProductId}/tourism/documents/bulk-uploads/active":{"get":{"description":"Returns the batch still running or awaiting confirmation for this application, so the page can pick up where the user left off. Null when there is nothing outstanding.","operationId":"Act60TourismDocumentsController_getActiveBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60ActiveBulkUploadDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the outstanding bulk upload, if any","tags":["Act 60 - Tourism Documents"]}},"/v1/act60/{orgProductId}/tourism/documents/bulk-uploads/{batchId}":{"get":{"description":"Poll while processing.","operationId":"Act60TourismDocumentsController_getBulkUploadStatus","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BulkUploadStatusDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get bulk upload progress","tags":["Act 60 - Tourism Documents"]}},"/v1/act60/{orgProductId}/tourism/documents/bulk-uploads/{batchId}/review":{"get":{"description":"Every uploaded file with its suggested category. A null `suggestedCategory` means the file was not identified and must be categorised before confirming.","operationId":"Act60TourismDocumentsController_getBulkUploadReview","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BulkUploadReviewDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the review & confirm list","tags":["Act 60 - Tourism Documents"]}},"/v1/act60/{orgProductId}/tourism/documents/bulk-uploads/documents/{documentId}/category":{"put":{"description":"Replaces the suggestion for one staged file. The file is still not attached to the application until the batch is confirmed.","operationId":"Act60TourismDocumentsController_setBulkUploadDocumentCategory","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60SetDocumentCategoryDto"}}}},"responses":{"204":{"description":"Category updated"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Override a suggested category","tags":["Act 60 - Tourism Documents"]}},"/v1/act60/{orgProductId}/tourism/documents/bulk-uploads/documents/{documentId}":{"delete":{"description":"Removes a staged file and its stored object.","operationId":"Act60TourismDocumentsController_removeBulkUploadDocument","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"File removed"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Drop a file from the review list","tags":["Act 60 - Tourism Documents"]}},"/v1/act60/{orgProductId}/tourism/documents/bulk-uploads/{batchId}/confirm":{"post":{"description":"Attaches each file to its category, writes the categories it files into without the files the form has removed but not yet saved, and returns the refreshed documents. Does not send anything for review — use the existing upload route for that.","operationId":"Act60TourismDocumentsController_confirmBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60ConfirmBulkUploadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Confirm & add the reviewed documents","tags":["Act 60 - Tourism Documents"]}},"/v1/act60/{orgProductId}/tourism/documents/bulk-uploads/{batchId}/cancel":{"post":{"description":"Retires a batch the client stopped uploading to, so the section takes a new upload immediately. Does nothing to a batch that already started processing.","operationId":"Act60TourismDocumentsController_cancelBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Upload cancelled"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Cancel an upload whose transfer was aborted","tags":["Act 60 - Tourism Documents"]}},"/v1/act60/{orgProductId}/tourism/documents/bulk-uploads/{batchId}/discard":{"post":{"description":"Closes the batch without attaching anything, so the review stops reappearing.","operationId":"Act60TourismDocumentsController_discardBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Review dismissed"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Dismiss a pending review","tags":["Act 60 - Tourism Documents"]}},"/v1/act60/{orgProductId}/tourism/documents":{"get":{"description":"Retrieve uploaded documents by category.","operationId":"Act60TourismDocumentsController_getDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Documents retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get documents","tags":["Act 60 - Tourism Documents"]},"put":{"description":"Upload or replace documents for one or more categories and other documents, optionally sending them for review. A request that changes nothing writes nothing.","operationId":"Act60TourismDocumentsController_uploadDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60UploadDocumentsDto"}}}},"responses":{"200":{"description":"Documents uploaded successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Upload documents","tags":["Act 60 - Tourism Documents"]}},"/v1/act60/{orgProductId}/tourism/documents/other":{"get":{"description":"Retrieve the supporting documents the client named under \"Other\", oldest first.","operationId":"Act60TourismDocumentsController_getOtherDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Other documents retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentSectionDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get other documents","tags":["Act 60 - Tourism Documents"]}},"/v1/act60/{orgProductId}/tourism/documents/not-applicable":{"put":{"description":"Mark a document category as (not) applicable for the client. Marking it not applicable also clears any uploaded files in that category, so files under review or approved block the change for non-staff.","operationId":"Act60TourismDocumentsController_setNotApplicable","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProductDocumentNotApplicableDto"}}}},"responses":{"200":{"description":"Not-applicable flag updated successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Set document category not-applicable flag","tags":["Act 60 - Tourism Documents"]}},"/v1/act60/{orgProductId}/tourism/documents/{category}":{"delete":{"description":"Remove all documents in a category (e.g. when the client marks it not applicable). Documents under review or approved can only be removed by DECA staff.","operationId":"Act60TourismDocumentsController_clearDocumentsCategory","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"category","required":true,"in":"path","schema":{"$ref":"#/components/schemas/ProductDocumentCategory"}}],"responses":{"200":{"description":"Documents category cleared successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Clear a documents category","tags":["Act 60 - Tourism Documents"]}},"/v1/act60/{orgProductId}/tourism/report/preview":{"get":{"operationId":"Act60TourismReportController_getPreviewData","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Report preview data for frontend rendering","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60TourismReportPreviewDto"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Get tourism report preview data","tags":["Act 60 - Tourism Report"]}},"/v1/act60/{orgProductId}/tourism/report/approve":{"post":{"operationId":"Act60TourismReportController_approve","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Application approved by government","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Approve tourism by government","tags":["Act 60 - Tourism Report"]}},"/v1/act60/{orgProductId}/tourism/report/generate":{"post":{"operationId":"Act60TourismReportController_generate","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"201":{"description":"Report generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Generate tourism report","tags":["Act 60 - Tourism Report"]}},"/v1/act60/{orgProductId}/tourism/report":{"get":{"operationId":"Act60TourismReportController_getReport","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Report metadata retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Get tourism report metadata","tags":["Act 60 - Tourism Report"]}},"/v1/act60/{orgProductId}/hard-to-recruit":{"post":{"description":"Submit the completed hard to recruit information for Act 60 hard to recruit decree type.","operationId":"Act60HardToRecruitController_submit","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60SubmitHardToRecruitDto"}}}},"responses":{"201":{"description":"Hard to recruit information submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60HardToRecruitEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Submit hard to recruit information","tags":["Act 60 - Hard to Recruit"]},"get":{"description":"Retrieve submitted hard to recruit information data.","operationId":"Act60HardToRecruitController_getData","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Hard to recruit information retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60HardToRecruitEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get hard to recruit information","tags":["Act 60 - Hard to Recruit"]},"put":{"description":"Update hard to recruit information data.","operationId":"Act60HardToRecruitController_update","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60UpdateHardToRecruitDto"}}}},"responses":{"200":{"description":"Hard to recruit information updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60HardToRecruitEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update hard to recruit information","tags":["Act 60 - Hard to Recruit"]}},"/v1/act60/{orgProductId}/hard-to-recruit/prefill":{"get":{"description":"Seed the hard to recruit form from the organization's Individual Profile.","operationId":"Act60HardToRecruitController_getPrefill","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Hard to recruit prefill retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60HardToRecruitPrefillDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get hard to recruit prefill","tags":["Act 60 - Hard to Recruit"]}},"/v1/act60/{orgProductId}/hard-to-recruit/documents/bulk-uploads/init":{"post":{"description":"Creates a batch and returns a signed URL per file. PUT each file straight to its URL, then call `bulk-uploads/:batchId/start`. Any `.zip` in the selection is expanded server-side.","operationId":"Act60HardToRecruitDocumentsController_initBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60InitBulkUploadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUploadInitEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Start a bulk document upload","tags":["Act 60 - Hard to Recruit Documents"]}},"/v1/act60/{orgProductId}/hard-to-recruit/documents/bulk-uploads/{batchId}/start":{"post":{"description":"Hands the batch to background processing and returns immediately. Poll `bulk-uploads/:batchId` for progress; the work continues if the user navigates away.","operationId":"Act60HardToRecruitDocumentsController_startBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BulkUploadStatusDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Begin processing an uploaded batch","tags":["Act 60 - Hard to Recruit Documents"]}},"/v1/act60/{orgProductId}/hard-to-recruit/documents/bulk-uploads/active":{"get":{"description":"Returns the batch still running or awaiting confirmation for this application, so the page can pick up where the user left off. Null when there is nothing outstanding.","operationId":"Act60HardToRecruitDocumentsController_getActiveBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60ActiveBulkUploadDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the outstanding bulk upload, if any","tags":["Act 60 - Hard to Recruit Documents"]}},"/v1/act60/{orgProductId}/hard-to-recruit/documents/bulk-uploads/{batchId}":{"get":{"description":"Poll while processing.","operationId":"Act60HardToRecruitDocumentsController_getBulkUploadStatus","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BulkUploadStatusDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get bulk upload progress","tags":["Act 60 - Hard to Recruit Documents"]}},"/v1/act60/{orgProductId}/hard-to-recruit/documents/bulk-uploads/{batchId}/review":{"get":{"description":"Every uploaded file with its suggested category. A null `suggestedCategory` means the file was not identified and must be categorised before confirming.","operationId":"Act60HardToRecruitDocumentsController_getBulkUploadReview","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BulkUploadReviewDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the review & confirm list","tags":["Act 60 - Hard to Recruit Documents"]}},"/v1/act60/{orgProductId}/hard-to-recruit/documents/bulk-uploads/documents/{documentId}/category":{"put":{"description":"Replaces the suggestion for one staged file. The file is still not attached to the application until the batch is confirmed.","operationId":"Act60HardToRecruitDocumentsController_setBulkUploadDocumentCategory","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60SetDocumentCategoryDto"}}}},"responses":{"204":{"description":"Category updated"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Override a suggested category","tags":["Act 60 - Hard to Recruit Documents"]}},"/v1/act60/{orgProductId}/hard-to-recruit/documents/bulk-uploads/documents/{documentId}":{"delete":{"description":"Removes a staged file and its stored object.","operationId":"Act60HardToRecruitDocumentsController_removeBulkUploadDocument","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"File removed"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Drop a file from the review list","tags":["Act 60 - Hard to Recruit Documents"]}},"/v1/act60/{orgProductId}/hard-to-recruit/documents/bulk-uploads/{batchId}/confirm":{"post":{"description":"Attaches each file to its category, writes the categories it files into without the files the form has removed but not yet saved, and returns the refreshed documents. Does not send anything for review — use the existing upload route for that.","operationId":"Act60HardToRecruitDocumentsController_confirmBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60ConfirmBulkUploadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Confirm & add the reviewed documents","tags":["Act 60 - Hard to Recruit Documents"]}},"/v1/act60/{orgProductId}/hard-to-recruit/documents/bulk-uploads/{batchId}/cancel":{"post":{"description":"Retires a batch the client stopped uploading to, so the section takes a new upload immediately. Does nothing to a batch that already started processing.","operationId":"Act60HardToRecruitDocumentsController_cancelBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Upload cancelled"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Cancel an upload whose transfer was aborted","tags":["Act 60 - Hard to Recruit Documents"]}},"/v1/act60/{orgProductId}/hard-to-recruit/documents/bulk-uploads/{batchId}/discard":{"post":{"description":"Closes the batch without attaching anything, so the review stops reappearing.","operationId":"Act60HardToRecruitDocumentsController_discardBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Review dismissed"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Dismiss a pending review","tags":["Act 60 - Hard to Recruit Documents"]}},"/v1/act60/{orgProductId}/hard-to-recruit/documents":{"get":{"description":"Retrieve uploaded documents by category.","operationId":"Act60HardToRecruitDocumentsController_getDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Documents retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get documents","tags":["Act 60 - Hard to Recruit Documents"]},"put":{"description":"Upload or replace documents for one or more categories and other documents, optionally sending them for review. A request that changes nothing writes nothing.","operationId":"Act60HardToRecruitDocumentsController_uploadDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60UploadDocumentsDto"}}}},"responses":{"200":{"description":"Documents uploaded successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Upload documents","tags":["Act 60 - Hard to Recruit Documents"]}},"/v1/act60/{orgProductId}/hard-to-recruit/documents/other":{"get":{"description":"Retrieve the supporting documents the client named under \"Other\", oldest first.","operationId":"Act60HardToRecruitDocumentsController_getOtherDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Other documents retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentSectionDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get other documents","tags":["Act 60 - Hard to Recruit Documents"]}},"/v1/act60/{orgProductId}/hard-to-recruit/documents/not-applicable":{"put":{"description":"Mark a document category as (not) applicable for the client. Marking it not applicable also clears any uploaded files in that category, so files under review or approved block the change for non-staff.","operationId":"Act60HardToRecruitDocumentsController_setNotApplicable","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProductDocumentNotApplicableDto"}}}},"responses":{"200":{"description":"Not-applicable flag updated successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Set document category not-applicable flag","tags":["Act 60 - Hard to Recruit Documents"]}},"/v1/act60/{orgProductId}/hard-to-recruit/documents/{category}":{"delete":{"description":"Remove all documents in a category (e.g. when the client marks it not applicable). Documents under review or approved can only be removed by DECA staff.","operationId":"Act60HardToRecruitDocumentsController_clearDocumentsCategory","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"category","required":true,"in":"path","schema":{"$ref":"#/components/schemas/ProductDocumentCategory"}}],"responses":{"200":{"description":"Documents category cleared successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Clear a documents category","tags":["Act 60 - Hard to Recruit Documents"]}},"/v1/act60/{orgProductId}/hard-to-recruit/report/preview":{"get":{"operationId":"Act60HardToRecruitReportController_getPreviewData","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Report preview data for frontend rendering","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60HardToRecruitReportPreviewDto"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Get hard to recruit report preview data","tags":["Act 60 - Hard to Recruit Report"]}},"/v1/act60/{orgProductId}/hard-to-recruit/report/approve":{"post":{"operationId":"Act60HardToRecruitReportController_approve","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Application approved by government","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Approve hard to recruit by government","tags":["Act 60 - Hard to Recruit Report"]}},"/v1/act60/{orgProductId}/hard-to-recruit/report/generate":{"post":{"operationId":"Act60HardToRecruitReportController_generate","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"201":{"description":"Report generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Generate hard to recruit report","tags":["Act 60 - Hard to Recruit Report"]}},"/v1/act60/{orgProductId}/hard-to-recruit/report":{"get":{"operationId":"Act60HardToRecruitReportController_getReport","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Report metadata retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Get hard to recruit report metadata","tags":["Act 60 - Hard to Recruit Report"]}},"/v1/act60/{orgProductId}/private-equity":{"post":{"description":"Submit the completed information for the Act 60 private equity decree.","operationId":"Act60PrivateEquityController_submit","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60SubmitPrivateEquityDto"}}}},"responses":{"201":{"description":"Private equity information submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60PrivateEquityEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Submit private equity information","tags":["Act 60 - Private Equity"]},"get":{"description":"Retrieve submitted private equity information data.","operationId":"Act60PrivateEquityController_getData","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Private equity information retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60PrivateEquityEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get private equity information","tags":["Act 60 - Private Equity"]}},"/v1/act60/{orgProductId}/private-equity/prefill":{"get":{"description":"Values seeded from the Business Profile and the Incentives Assessment to pre-fill the private equity decree, and the contacts PE15 and PE20 offer.","operationId":"Act60PrivateEquityController_getPrefill","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Private equity prefill retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60PrivateEquityPrefillDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get private equity prefill","tags":["Act 60 - Private Equity"]}},"/v1/act60/{orgProductId}/private-equity/documents/bulk-uploads/init":{"post":{"description":"Creates a batch and returns a signed URL per file. PUT each file straight to its URL, then call `bulk-uploads/:batchId/start`. Any `.zip` in the selection is expanded server-side.","operationId":"Act60PrivateEquityDocumentsController_initBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60InitBulkUploadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUploadInitEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Start a bulk document upload","tags":["Act 60 - Private Equity Documents"]}},"/v1/act60/{orgProductId}/private-equity/documents/bulk-uploads/{batchId}/start":{"post":{"description":"Hands the batch to background processing and returns immediately. Poll `bulk-uploads/:batchId` for progress; the work continues if the user navigates away.","operationId":"Act60PrivateEquityDocumentsController_startBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BulkUploadStatusDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Begin processing an uploaded batch","tags":["Act 60 - Private Equity Documents"]}},"/v1/act60/{orgProductId}/private-equity/documents/bulk-uploads/active":{"get":{"description":"Returns the batch still running or awaiting confirmation for this application, so the page can pick up where the user left off. Null when there is nothing outstanding.","operationId":"Act60PrivateEquityDocumentsController_getActiveBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60ActiveBulkUploadDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the outstanding bulk upload, if any","tags":["Act 60 - Private Equity Documents"]}},"/v1/act60/{orgProductId}/private-equity/documents/bulk-uploads/{batchId}":{"get":{"description":"Poll while processing.","operationId":"Act60PrivateEquityDocumentsController_getBulkUploadStatus","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BulkUploadStatusDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get bulk upload progress","tags":["Act 60 - Private Equity Documents"]}},"/v1/act60/{orgProductId}/private-equity/documents/bulk-uploads/{batchId}/review":{"get":{"description":"Every uploaded file with its suggested category. A null `suggestedCategory` means the file was not identified and must be categorised before confirming.","operationId":"Act60PrivateEquityDocumentsController_getBulkUploadReview","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BulkUploadReviewDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the review & confirm list","tags":["Act 60 - Private Equity Documents"]}},"/v1/act60/{orgProductId}/private-equity/documents/bulk-uploads/documents/{documentId}/category":{"put":{"description":"Replaces the suggestion for one staged file. The file is still not attached to the application until the batch is confirmed.","operationId":"Act60PrivateEquityDocumentsController_setBulkUploadDocumentCategory","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60SetDocumentCategoryDto"}}}},"responses":{"204":{"description":"Category updated"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Override a suggested category","tags":["Act 60 - Private Equity Documents"]}},"/v1/act60/{orgProductId}/private-equity/documents/bulk-uploads/documents/{documentId}":{"delete":{"description":"Removes a staged file and its stored object.","operationId":"Act60PrivateEquityDocumentsController_removeBulkUploadDocument","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"File removed"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Drop a file from the review list","tags":["Act 60 - Private Equity Documents"]}},"/v1/act60/{orgProductId}/private-equity/documents/bulk-uploads/{batchId}/confirm":{"post":{"description":"Attaches each file to its category, writes the categories it files into without the files the form has removed but not yet saved, and returns the refreshed documents. Does not send anything for review — use the existing upload route for that.","operationId":"Act60PrivateEquityDocumentsController_confirmBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60ConfirmBulkUploadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Confirm & add the reviewed documents","tags":["Act 60 - Private Equity Documents"]}},"/v1/act60/{orgProductId}/private-equity/documents/bulk-uploads/{batchId}/cancel":{"post":{"description":"Retires a batch the client stopped uploading to, so the section takes a new upload immediately. Does nothing to a batch that already started processing.","operationId":"Act60PrivateEquityDocumentsController_cancelBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Upload cancelled"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Cancel an upload whose transfer was aborted","tags":["Act 60 - Private Equity Documents"]}},"/v1/act60/{orgProductId}/private-equity/documents/bulk-uploads/{batchId}/discard":{"post":{"description":"Closes the batch without attaching anything, so the review stops reappearing.","operationId":"Act60PrivateEquityDocumentsController_discardBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Review dismissed"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Dismiss a pending review","tags":["Act 60 - Private Equity Documents"]}},"/v1/act60/{orgProductId}/private-equity/documents":{"get":{"description":"Retrieve uploaded documents by category.","operationId":"Act60PrivateEquityDocumentsController_getDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Documents retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get documents","tags":["Act 60 - Private Equity Documents"]},"put":{"description":"Upload or replace documents for one or more categories and other documents, optionally sending them for review. A request that changes nothing writes nothing.","operationId":"Act60PrivateEquityDocumentsController_uploadDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60UploadDocumentsDto"}}}},"responses":{"200":{"description":"Documents uploaded successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Upload documents","tags":["Act 60 - Private Equity Documents"]}},"/v1/act60/{orgProductId}/private-equity/documents/other":{"get":{"description":"Retrieve the supporting documents the client named under \"Other\", oldest first.","operationId":"Act60PrivateEquityDocumentsController_getOtherDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Other documents retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentSectionDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get other documents","tags":["Act 60 - Private Equity Documents"]}},"/v1/act60/{orgProductId}/private-equity/documents/not-applicable":{"put":{"description":"Mark a document category as (not) applicable for the client. Marking it not applicable also clears any uploaded files in that category, so files under review or approved block the change for non-staff.","operationId":"Act60PrivateEquityDocumentsController_setNotApplicable","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProductDocumentNotApplicableDto"}}}},"responses":{"200":{"description":"Not-applicable flag updated successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Set document category not-applicable flag","tags":["Act 60 - Private Equity Documents"]}},"/v1/act60/{orgProductId}/private-equity/documents/{category}":{"delete":{"description":"Remove all documents in a category (e.g. when the client marks it not applicable). Documents under review or approved can only be removed by DECA staff.","operationId":"Act60PrivateEquityDocumentsController_clearDocumentsCategory","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"category","required":true,"in":"path","schema":{"$ref":"#/components/schemas/ProductDocumentCategory"}}],"responses":{"200":{"description":"Documents category cleared successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Clear a documents category","tags":["Act 60 - Private Equity Documents"]}},"/v1/act60/{orgProductId}/private-equity/report/preview":{"get":{"operationId":"Act60PrivateEquityReportController_getPreviewData","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Report preview data for frontend rendering","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60PrivateEquityReportPreviewDto"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Get private equity report preview data","tags":["Act 60 - Private Equity Report"]}},"/v1/act60/{orgProductId}/private-equity/report/approve":{"post":{"operationId":"Act60PrivateEquityReportController_approve","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Application approved by government","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Approve private equity by government","tags":["Act 60 - Private Equity Report"]}},"/v1/act60/{orgProductId}/private-equity/report/generate":{"post":{"operationId":"Act60PrivateEquityReportController_generate","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"201":{"description":"Report generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Generate private equity report","tags":["Act 60 - Private Equity Report"]}},"/v1/act60/{orgProductId}/private-equity/report":{"get":{"operationId":"Act60PrivateEquityReportController_getReport","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Report metadata retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Get private equity report metadata","tags":["Act 60 - Private Equity Report"]}},"/v1/act60/{orgProductId}/young-entrepreneur":{"post":{"description":"Submit the completed young entrepreneur information for Act 60 young entrepreneur decree type.","operationId":"Act60YoungEntrepreneurController_submit","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60SubmitYoungEntrepreneurDto"}}}},"responses":{"201":{"description":"Young entrepreneur information submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60YoungEntrepreneurEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Submit young entrepreneur information","tags":["Act 60 - Young Entrepreneur"]},"get":{"description":"Retrieve submitted young entrepreneur information data.","operationId":"Act60YoungEntrepreneurController_getData","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Young entrepreneur information retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60YoungEntrepreneurEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get young entrepreneur information","tags":["Act 60 - Young Entrepreneur"]},"put":{"description":"Update young entrepreneur information data.","operationId":"Act60YoungEntrepreneurController_update","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60UpdateYoungEntrepreneurDto"}}}},"responses":{"200":{"description":"Young entrepreneur information updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60YoungEntrepreneurEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update young entrepreneur information","tags":["Act 60 - Young Entrepreneur"]}},"/v1/act60/{orgProductId}/young-entrepreneur/prefill":{"get":{"description":"Aggregate Individual Profile and Act 60 individual screening values to seed the young entrepreneur form.","operationId":"Act60YoungEntrepreneurController_getPrefill","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Young entrepreneur prefill retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60YoungEntrepreneurPrefillDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get young entrepreneur prefill","tags":["Act 60 - Young Entrepreneur"]}},"/v1/act60/{orgProductId}/young-entrepreneur/documents/bulk-uploads/init":{"post":{"description":"Creates a batch and returns a signed URL per file. PUT each file straight to its URL, then call `bulk-uploads/:batchId/start`. Any `.zip` in the selection is expanded server-side.","operationId":"Act60YoungEntrepreneurDocumentsController_initBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60InitBulkUploadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUploadInitEntity"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Start a bulk document upload","tags":["Act 60 - Young Entrepreneur Documents"]}},"/v1/act60/{orgProductId}/young-entrepreneur/documents/bulk-uploads/{batchId}/start":{"post":{"description":"Hands the batch to background processing and returns immediately. Poll `bulk-uploads/:batchId` for progress; the work continues if the user navigates away.","operationId":"Act60YoungEntrepreneurDocumentsController_startBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BulkUploadStatusDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Begin processing an uploaded batch","tags":["Act 60 - Young Entrepreneur Documents"]}},"/v1/act60/{orgProductId}/young-entrepreneur/documents/bulk-uploads/active":{"get":{"description":"Returns the batch still running or awaiting confirmation for this application, so the page can pick up where the user left off. Null when there is nothing outstanding.","operationId":"Act60YoungEntrepreneurDocumentsController_getActiveBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60ActiveBulkUploadDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the outstanding bulk upload, if any","tags":["Act 60 - Young Entrepreneur Documents"]}},"/v1/act60/{orgProductId}/young-entrepreneur/documents/bulk-uploads/{batchId}":{"get":{"description":"Poll while processing.","operationId":"Act60YoungEntrepreneurDocumentsController_getBulkUploadStatus","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BulkUploadStatusDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get bulk upload progress","tags":["Act 60 - Young Entrepreneur Documents"]}},"/v1/act60/{orgProductId}/young-entrepreneur/documents/bulk-uploads/{batchId}/review":{"get":{"description":"Every uploaded file with its suggested category. A null `suggestedCategory` means the file was not identified and must be categorised before confirming.","operationId":"Act60YoungEntrepreneurDocumentsController_getBulkUploadReview","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60BulkUploadReviewDto"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the review & confirm list","tags":["Act 60 - Young Entrepreneur Documents"]}},"/v1/act60/{orgProductId}/young-entrepreneur/documents/bulk-uploads/documents/{documentId}/category":{"put":{"description":"Replaces the suggestion for one staged file. The file is still not attached to the application until the batch is confirmed.","operationId":"Act60YoungEntrepreneurDocumentsController_setBulkUploadDocumentCategory","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60SetDocumentCategoryDto"}}}},"responses":{"204":{"description":"Category updated"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Override a suggested category","tags":["Act 60 - Young Entrepreneur Documents"]}},"/v1/act60/{orgProductId}/young-entrepreneur/documents/bulk-uploads/documents/{documentId}":{"delete":{"description":"Removes a staged file and its stored object.","operationId":"Act60YoungEntrepreneurDocumentsController_removeBulkUploadDocument","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"File removed"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Drop a file from the review list","tags":["Act 60 - Young Entrepreneur Documents"]}},"/v1/act60/{orgProductId}/young-entrepreneur/documents/bulk-uploads/{batchId}/confirm":{"post":{"description":"Attaches each file to its category, writes the categories it files into without the files the form has removed but not yet saved, and returns the refreshed documents. Does not send anything for review — use the existing upload route for that.","operationId":"Act60YoungEntrepreneurDocumentsController_confirmBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60ConfirmBulkUploadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Confirm & add the reviewed documents","tags":["Act 60 - Young Entrepreneur Documents"]}},"/v1/act60/{orgProductId}/young-entrepreneur/documents/bulk-uploads/{batchId}/cancel":{"post":{"description":"Retires a batch the client stopped uploading to, so the section takes a new upload immediately. Does nothing to a batch that already started processing.","operationId":"Act60YoungEntrepreneurDocumentsController_cancelBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Upload cancelled"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Cancel an upload whose transfer was aborted","tags":["Act 60 - Young Entrepreneur Documents"]}},"/v1/act60/{orgProductId}/young-entrepreneur/documents/bulk-uploads/{batchId}/discard":{"post":{"description":"Closes the batch without attaching anything, so the review stops reappearing.","operationId":"Act60YoungEntrepreneurDocumentsController_discardBulkUpload","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"batchId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Review dismissed"},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Dismiss a pending review","tags":["Act 60 - Young Entrepreneur Documents"]}},"/v1/act60/{orgProductId}/young-entrepreneur/documents":{"get":{"description":"Retrieve uploaded documents by category.","operationId":"Act60YoungEntrepreneurDocumentsController_getDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Documents retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get documents","tags":["Act 60 - Young Entrepreneur Documents"]},"put":{"description":"Upload or replace documents for one or more categories and other documents, optionally sending them for review. A request that changes nothing writes nothing.","operationId":"Act60YoungEntrepreneurDocumentsController_uploadDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60UploadDocumentsDto"}}}},"responses":{"200":{"description":"Documents uploaded successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Upload documents","tags":["Act 60 - Young Entrepreneur Documents"]}},"/v1/act60/{orgProductId}/young-entrepreneur/documents/other":{"get":{"description":"Retrieve the supporting documents the client named under \"Other\", oldest first.","operationId":"Act60YoungEntrepreneurDocumentsController_getOtherDocuments","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Other documents retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentSectionDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get other documents","tags":["Act 60 - Young Entrepreneur Documents"]}},"/v1/act60/{orgProductId}/young-entrepreneur/documents/not-applicable":{"put":{"description":"Mark a document category as (not) applicable for the client. Marking it not applicable also clears any uploaded files in that category, so files under review or approved block the change for non-staff.","operationId":"Act60YoungEntrepreneurDocumentsController_setNotApplicable","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProductDocumentNotApplicableDto"}}}},"responses":{"200":{"description":"Not-applicable flag updated successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Set document category not-applicable flag","tags":["Act 60 - Young Entrepreneur Documents"]}},"/v1/act60/{orgProductId}/young-entrepreneur/documents/{category}":{"delete":{"description":"Remove all documents in a category (e.g. when the client marks it not applicable). Documents under review or approved can only be removed by DECA staff.","operationId":"Act60YoungEntrepreneurDocumentsController_clearDocumentsCategory","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}},{"name":"category","required":true,"in":"path","schema":{"$ref":"#/components/schemas/ProductDocumentCategory"}}],"responses":{"200":{"description":"Documents category cleared successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Clear a documents category","tags":["Act 60 - Young Entrepreneur Documents"]}},"/v1/act60/{orgProductId}/young-entrepreneur/report/preview":{"get":{"operationId":"Act60YoungEntrepreneurReportController_getPreviewData","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Report preview data for frontend rendering","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Act60YoungEntrepreneurReportPreviewDto"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Get young entrepreneur report preview data","tags":["Act 60 - Young Entrepreneur Report"]}},"/v1/act60/{orgProductId}/young-entrepreneur/report/approve":{"post":{"operationId":"Act60YoungEntrepreneurReportController_approve","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Application approved by government","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Approve young entrepreneur by government","tags":["Act 60 - Young Entrepreneur Report"]}},"/v1/act60/{orgProductId}/young-entrepreneur/report/generate":{"post":{"operationId":"Act60YoungEntrepreneurReportController_generate","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"201":{"description":"Report generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Generate young entrepreneur report","tags":["Act 60 - Young Entrepreneur Report"]}},"/v1/act60/{orgProductId}/young-entrepreneur/report":{"get":{"operationId":"Act60YoungEntrepreneurReportController_getReport","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Report metadata retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportEntity"}}}},"403":{"description":"Admin access required\n\nAccess to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]},{"cookie":[]}],"summary":"Get young entrepreneur report metadata","tags":["Act 60 - Young Entrepreneur Report"]}},"/v1/org-products/{orgProductId}/report/download":{"get":{"operationId":"ReportDownloadController_download","parameters":[{"name":"orgProductId","required":true,"in":"path","description":"Organization's product ID","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Access to this product is not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Access to this product is not allowed"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"Organization's product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Organization's product with ID {id} not found"},"statusCode":{"type":"number","example":404}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Download report as docx","tags":["Reports"]}},"/v1/products":{"get":{"description":"Retrieve the product catalog — active products unless `statuses` says otherwise. Pass `orgId` for what that organization can be assigned right now: active products only.","operationId":"ProductsController_findAll","parameters":[{"name":"orgId","required":false,"in":"query","description":"Narrows the catalog to what this organization can still be assigned","schema":{"format":"uuid","type":"string"}},{"name":"statuses","required":false,"in":"query","description":"Defaults to active products only, which is all the assignment flows offer","schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductStatus"}}},{"name":"withOrganizations","required":false,"in":"query","description":"Also lists each product's organizations by name; otherwise `organizations` is null","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Products retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDto"}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List all products","tags":["Products"]},"post":{"description":"Adds a product to the catalog with its general settings, one per selected department.","operationId":"ProductsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDto"}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"Another product in the same department already uses the name, ignoring case."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Create a product","tags":["Products"]}},"/v1/products/predefined":{"get":{"description":"Built-in products that were deleted: each can be created again under its own name, in its own department only","operationId":"ProductsController_findPredefined","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PredefinedProductDto"}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List the predefined product names free to use","tags":["Products"]}},"/v1/products/{productId}":{"get":{"operationId":"ProductsController_findOne","parameters":[{"name":"productId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get a product","tags":["Products"]},"patch":{"description":"Changes any of the product's general settings; the ones left out keep their value. Name, description, Time Log, Rates and the Extended date setting reach the organizations already holding the product, and a changed Deadline or Extended date rule moves the dates of every service that follows it (a date typed on a service stays, except an Extended date no longer after its deadline, or left with none, which follows the product again); its questionnaire and range apply to new assignments only. An ad-hoc product keeps Time Log and Rates. Department, period and multiple services are locked once organizations hold the product or a live agreement (not declined, voided or revoked) links it from its brief or proposes it, and its product type until it is unlinked from every organization.","operationId":"ProductsController_update","parameters":[{"name":"productId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"The name or department changes, and another product in that department already uses the name, ignoring case."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update a product","tags":["Products"]},"delete":{"description":"Permanently unassigns the product from every organization holding it, then deletes it, so it also needs the right to delete organization products. Products with a fixed flow cannot be deleted.","operationId":"ProductsController_delete","parameters":[{"name":"productId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete a product","tags":["Products"]}},"/v1/products/{productId}/pending-agreement-proposals/count":{"get":{"description":"Proposals of the product still pending in agreements not declined, voided or revoked","operationId":"ProductsController_countPendingAgreementProposals","parameters":[{"name":"productId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingAgreementProposalCountDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Count the pending agreement proposals of a product","tags":["Products"]}},"/v1/products/{productId}/questionnaire":{"get":{"description":"The tabs an organization receives when the product is assigned; null while the product has no questionnaire set up. Saved with the product (`questionnaireTabs` on create and update). Products with a fixed flow have none.","operationId":"ProductQuestionnaireController_findOne","parameters":[{"name":"productId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductQuestionnaireDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get a product's questionnaire template","tags":["Products"]}},"/v1/products/{productId}/organizations":{"get":{"description":"The caller's readable organizations holding the product, by name, each with its assignments of the product.","operationId":"ProductOrganizationsController_findAll","parameters":[{"name":"productId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductOrganizationDto"}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List the organizations a product is assigned to","tags":["Products"]},"post":{"description":"Creates every row's assignment with its task leads in one transaction, or none: an invalid row (named as `Row N:` in the message) blocks the whole batch. Each row takes what the product's settings ask for — a period inside its range, held once unless the product is multi-instance, a name unique among the organization's services of the product, an hourly rate for a product with rates — and 1 to 2 task leads who are admins of that organization. A product with a questionnaire starts in Backlog, hidden from the client, with a copy of the current template.","operationId":"ProductOrganizationsController_assign","parameters":[{"name":"productId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignProductOrganizationsDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Assign a product to organizations","tags":["Products"]}},"/v1/products/{productId}/organizations/assignable":{"get":{"description":"Active organizations the caller can read, of an entity type the product is offered to, by name.","operationId":"ProductOrganizationsController_findAssignable","parameters":[{"name":"productId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}},{"name":"search","required":false,"in":"query","description":"Search by organization name or nickname","schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationRefDto"}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List the organizations a product can be assigned to","tags":["Products"]}},"/v1/prospects/groups":{"get":{"description":"Prospects grouped by nickname, sorted by it and paged by prospects — a nickname cut by the page edge goes on at the top of the next page; `meta` counts prospects","operationId":"ProspectsController_findManyGrouped","parameters":[{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"prospectTypes","required":false,"in":"query","schema":{"type":"array","items":{"type":"string","enum":["business","individual"]}}},{"name":"sources","required":false,"in":"query","schema":{"type":"array","items":{"type":"string","enum":["referral","word_of_mouth","seo_organic_search","social_media","website_direct_inquiry","cold_email","cold_calling","linkedin_outreach","paid_advertising","strategic_partnership","trade_show_conference","webinar_virtual_event","lead_generation_tool","existing_customer","employee_introduction","other"]}}},{"name":"phase","required":false,"in":"query","schema":{"type":"string","enum":["phase_1","phase_2","phase_3","phase_4","phase_5"]}},{"name":"showArchived","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"archiveReminder","required":false,"in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectGroupListEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List prospects grouped by nickname","tags":["Prospects"]}},"/v1/prospects/export":{"get":{"description":"Every prospect matching the list filters, across all pages, with the requested sections for those prospects","operationId":"ProspectsController_findForExport","parameters":[{"name":"sortOrder","required":false,"in":"query","description":"Defaults to `desc`","schema":{"$ref":"#/components/schemas/SortOrder"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"prospectTypes","required":false,"in":"query","schema":{"type":"array","items":{"type":"string","enum":["business","individual"]}}},{"name":"sources","required":false,"in":"query","schema":{"type":"array","items":{"type":"string","enum":["referral","word_of_mouth","seo_organic_search","social_media","website_direct_inquiry","cold_email","cold_calling","linkedin_outreach","paid_advertising","strategic_partnership","trade_show_conference","webinar_virtual_event","lead_generation_tool","existing_customer","employee_introduction","other"]}}},{"name":"phase","required":false,"in":"query","schema":{"type":"string","enum":["phase_1","phase_2","phase_3","phase_4","phase_5"]}},{"name":"showArchived","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"archiveReminder","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"sortBy","required":false,"in":"query","schema":{"type":"string","enum":["fullName","nickname","createdAt","priority"]}},{"name":"sections","required":true,"in":"query","description":"Information groups to export. Prospects are always returned, since every worksheet names its parent prospect.","schema":{"type":"array","items":{"$ref":"#/components/schemas/ProspectExportSection"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectsExportDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Export prospects","tags":["Prospects"]}},"/v1/prospects":{"post":{"description":"Create a new prospect with optional file attachments","operationId":"ProspectsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProspectDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Create prospect","tags":["Prospects"]},"get":{"description":"Get a paginated list of prospects with search, filter, sort, and phase counts","operationId":"ProspectsController_findMany","parameters":[{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"sortOrder","required":false,"in":"query","description":"Defaults to `desc`","schema":{"$ref":"#/components/schemas/SortOrder"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"prospectTypes","required":false,"in":"query","schema":{"type":"array","items":{"type":"string","enum":["business","individual"]}}},{"name":"sources","required":false,"in":"query","schema":{"type":"array","items":{"type":"string","enum":["referral","word_of_mouth","seo_organic_search","social_media","website_direct_inquiry","cold_email","cold_calling","linkedin_outreach","paid_advertising","strategic_partnership","trade_show_conference","webinar_virtual_event","lead_generation_tool","existing_customer","employee_introduction","other"]}}},{"name":"phase","required":false,"in":"query","schema":{"type":"string","enum":["phase_1","phase_2","phase_3","phase_4","phase_5"]}},{"name":"showArchived","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"archiveReminder","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"sortBy","required":false,"in":"query","schema":{"type":"string","enum":["fullName","nickname","createdAt","priority"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectListEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List prospects","tags":["Prospects"]}},"/v1/prospects/{prospectId}":{"get":{"description":"Fetch a single prospect with workflow state, contacts, files, and questionnaire summary","operationId":"ProspectsController_findOne","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectDetailEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get prospect detail","tags":["Prospects"]},"patch":{"description":"Update prospect fields","operationId":"ProspectsController_update","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProspectDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update prospect","tags":["Prospects"]},"delete":{"description":"Permanently delete a prospect","operationId":"ProspectsController_delete","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete prospect","tags":["Prospects"]}},"/v1/prospects/{prospectId}/workflow/status":{"patch":{"description":"Manually move the current workflow step to one of its `availableStatuses`. Status-only changes; side-effecting transitions have their own endpoints. Setting a terminal status advances the workflow to the next step.","operationId":"ProspectsController_setWorkflowStatus","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProspectWorkflowStatusDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Set prospect workflow status","tags":["Prospects"]}},"/v1/prospects/{prospectId}/toggle-archived":{"post":{"description":"Archive or unarchive a prospect","operationId":"ProspectsController_toggleArchived","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Toggle prospect archived status","tags":["Prospects"]}},"/v1/prospects/{prospectId}/toggle-not-moving-forward":{"post":{"description":"Parks the prospect as Not Moving Forward, or reopens it when already parked. The step and step status are left as they are; setting the flag cancels pending reminders, reopening resets the last activity date. Setting it on a converted prospect is rejected with 400.","operationId":"ProspectsController_toggleNotMovingForward","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Toggle prospect Not Moving Forward flag","tags":["Prospects"]}},"/v1/prospects/{prospectId}/contacts":{"get":{"operationId":"ProspectContactsController_findMany","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProspectContactEntity"}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List prospect contacts","tags":["Prospect Contacts"]},"post":{"operationId":"ProspectContactsController_create","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProspectContactDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectContactEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Add a point of contact to a prospect","tags":["Prospect Contacts"]}},"/v1/prospects/{prospectId}/contacts/{contactId}":{"patch":{"operationId":"ProspectContactsController_update","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"contactId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProspectContactDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectContactEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update a prospect contact","tags":["Prospect Contacts"]},"delete":{"operationId":"ProspectContactsController_delete","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"contactId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Remove a prospect contact","tags":["Prospect Contacts"]}},"/v1/prospects/{prospectId}/conversion":{"get":{"description":"Suggested users, prepopulated business info, suggested products, and any saved draft for a phase-5 prospect. An archived prospect or one marked as Not Moving Forward is rejected with 400.","operationId":"ProspectConversionController_getPrefill","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionPrefillDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get conversion prefill","tags":["Prospect Conversion"]},"post":{"description":"Atomically create the organization, users (with permissions), optional profile and products, and link the prospect. An archived prospect or one marked as Not Moving Forward is rejected with 400, a conversion while the bypassed agreement is still being read with 409, a KAM who is not an active or invited admin or super admin with 400, and an unknown KAM with 404.","operationId":"ProspectConversionController_convert","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertProspectDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionResultDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Convert prospect to organization","tags":["Prospect Conversion"]}},"/v1/prospects/{prospectId}/conversion/email-availability":{"get":{"operationId":"ProspectConversionController_checkEmailAvailability","parameters":[{"name":"email","required":true,"in":"query","schema":{"format":"email","type":"string"}},{"name":"prospectId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAvailabilityDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Check whether an email is available for a new user","tags":["Prospect Conversion"]}},"/v1/prospects/{prospectId}/conversion/draft":{"put":{"description":"Upsert the in-progress conversion wizard state for a prospect.","operationId":"ProspectConversionController_upsertDraft","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertConversionDraftDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionDraftEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Save conversion wizard draft","tags":["Prospect Conversion"]}},"/v1/prospects/{prospectId}/custom-questionnaires":{"get":{"description":"A prospect's custom questionnaires, newest first, each with its status and the prospect's answers once submitted.","operationId":"ProspectCustomQuestionnaireController_findMany","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProspectCustomQuestionnaireDto"}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List custom questionnaires","tags":["Prospect Custom Questionnaires"]},"post":{"description":"Saves a new questionnaire as a draft. Rejected with 400 for an archived prospect or once the prospect holds the maximum number of questionnaires.","operationId":"ProspectCustomQuestionnaireController_create","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveProspectCustomQuestionnaireDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectCustomQuestionnaireDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Create a custom questionnaire","tags":["Prospect Custom Questionnaires"]}},"/v1/prospects/{prospectId}/custom-questionnaires/{questionnaireId}":{"put":{"description":"Replaces its name and tabs; a sent link keeps working and shows the new version. Rejected with 400 once submitted or for an archived prospect.","operationId":"ProspectCustomQuestionnaireController_update","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"questionnaireId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveProspectCustomQuestionnaireDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectCustomQuestionnaireDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update a custom questionnaire","tags":["Prospect Custom Questionnaires"]},"delete":{"description":"Removes it with its answers and revokes its link. Rejected with 400 for an archived prospect, and with 409 when its status is no longer `expectedStatus`.","operationId":"ProspectCustomQuestionnaireController_remove","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"questionnaireId","required":true,"in":"path","schema":{"type":"string"}},{"name":"expectedStatus","required":true,"in":"query","description":"The status the admin confirmed the delete against; a questionnaire whose status changed since is not deleted","schema":{"$ref":"#/components/schemas/ProspectCustomQuestionnaireStatus"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"The status changed since the admin confirmed the delete"}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete a custom questionnaire","tags":["Prospect Custom Questionnaires"]}},"/v1/prospects/{prospectId}/custom-questionnaires/{questionnaireId}/send":{"post":{"description":"Emails a fresh one-time link to the given To and CC; once it went out, the questionnaire's previous link stops working and the questionnaire is marked sent. The link stays valid until the prospect submits. Rejected with 400 once submitted or for an archived prospect.","operationId":"ProspectCustomQuestionnaireController_send","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"questionnaireId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendProspectCustomQuestionnaireDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectCustomQuestionnaireDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"The questionnaire was deleted while it was being sent"}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Send a custom questionnaire","tags":["Prospect Custom Questionnaires"]}},"/v1/custom-questionnaire/public/{token}":{"get":{"description":"Validates the magic link without spending it and returns the questionnaire and its version. Returns 410 if the link is consumed, revoked or expired, or the questionnaire is already submitted; 404 if the token is invalid.","operationId":"ProspectCustomQuestionnairePublicController_getPayload","parameters":[{"name":"token","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProspectCustomQuestionnaireDto"}}}},"404":{"description":"Token not found"},"410":{"description":"Link is expired or already used"}},"summary":"Get custom questionnaire via magic link","tags":["Prospect Custom Questionnaire (Public)"]}},"/v1/custom-questionnaire/public/{token}/submit":{"post":{"description":"Saves the answers and consumes the magic link. Returns 204 on success; 400 when the questionnaire changed since `questionnaireVersion` or an answer is refused; 410 if the link is already consumed or expired; 404 if the token is invalid.","operationId":"ProspectCustomQuestionnairePublicController_submit","parameters":[{"name":"token","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitProspectCustomQuestionnaireDto"}}}},"responses":{"204":{"description":"Answers saved, link consumed"},"404":{"description":"Token not found"},"410":{"description":"Link is expired or already used"}},"summary":"Submit custom questionnaire via magic link","tags":["Prospect Custom Questionnaire (Public)"]}},"/v1/prospects/{prospectId}/emails":{"get":{"description":"Get a paginated list of email threads for a prospect, sorted by latest message first","operationId":"ProspectEmailsController_findThreadSummaries","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","description":"Case-insensitive. Matches a thread when any of its shown messages matches by sender name or address (or the name of the admin who sent it), To / CC address, subject or text, or when one of its active participants matches by name or address (a teammate nobody emails aside).","schema":{"maxLength":255,"type":"string"}},{"name":"readStatus","required":false,"in":"query","description":"Both when omitted","schema":{"$ref":"#/components/schemas/EmailThreadReadStatus"}},{"name":"types","required":false,"in":"query","description":"Threads of any of these types; `untagged` is a client's or an outside sender's","schema":{"type":"array","items":{"$ref":"#/components/schemas/EmailThreadType"}}},{"name":"lastMessageFrom","required":false,"in":"query","description":"Last message at or after this instant","schema":{"format":"date-time","type":"string"}},{"name":"lastMessageTo","required":false,"in":"query","description":"Last message at or before this instant","schema":{"format":"date-time","type":"string"}},{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadSummariesDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List prospect email thread summaries","tags":["Prospect Emails"]},"post":{"description":"Send a new email or reply within an existing thread","operationId":"ProspectEmailsController_send","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"A converted prospect, or the thread's participants changed since the reply was opened"}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Send manual email","tags":["Prospect Emails"]}},"/v1/prospects/{prospectId}/emails/threads/mark-read":{"post":{"description":"For the caller alone: the selected threads read as read for them, until a client message is stored after their mark, or they mark them unread. Picked by `latestEmailIds` and `asOf`, a thread reads up to the newest message the list showed: a message stored after `asOf`, or dated after that message, stays unread. Picked by `filter`, a thread reads up to the newest message this owner shows. On a converted prospect the organization's later replies stay unread. Other admins keep their own state.","operationId":"ProspectEmailsController_markThreadsRead","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadsMarkReadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadsReadResultDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Mark email threads read","tags":["Prospect Emails"]}},"/v1/prospects/{prospectId}/emails/threads/mark-unread":{"post":{"description":"For the caller alone: the selected threads read as unread for them, on every owner holding them, until they open them or mark them read. Other admins keep their own state.","operationId":"ProspectEmailsController_markThreadsUnread","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadsSelectionDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadsReadResultDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Mark email threads unread","tags":["Prospect Emails"]}},"/v1/prospects/{prospectId}/emails/threads/delete":{"post":{"description":"Deletes every selected conversation for good, as deleting each one does, except that one which got a new message since it was shown is deleted too. One that fails is counted in `failedCount` and the others still go. A `filter` deletes at most 100 conversations per request, newest first; `remainingCount` says how many it left, to delete with another request. Nobody is emailed.","operationId":"ProspectEmailsController_deleteThreads","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadsSelectionDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadsDeleteResultDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"A converted prospect: `{ message, field: \"orgId\", orgId }`. One converted while the delete ran also carries `deletedCount`, how many conversations it deleted before it stopped"}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete email conversations","tags":["Prospect Emails"]}},"/v1/prospects/{prospectId}/emails/threads/{threadKey}":{"get":{"description":"Get all messages in a thread, ordered chronologically, with its participants and who sees it","operationId":"ProspectEmailsController_findThread","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"threadKey","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThreadDetailDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get full email thread","tags":["Prospect Emails"]},"delete":{"description":"Deletes the conversation for good, every message with its attachments, from every owner holding it: one an organization took over from its prospect goes from both. Nobody is emailed. Refused when a message arrived since the caller saw `latestEmailId` and `messageCount`.","operationId":"ProspectEmailsController_deleteThread","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"threadKey","required":true,"in":"path","schema":{"type":"string"}},{"name":"latestEmailId","required":true,"in":"query","description":"The newest message the caller saw","schema":{"format":"uuid","type":"string"}},{"name":"messageCount","required":true,"in":"query","description":"How many messages the caller saw: a message dated before the newest one, such as a late Gmail import, changes only this","schema":{"minimum":1,"maximum":2147483647,"type":"number"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"A message arrived since the conversation was opened, or a converted prospect"}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete an email conversation","tags":["Prospect Emails"]}},"/v1/prospects/{prospectId}/emails/threads/{threadKey}/participants/{participantId}":{"delete":{"description":"Nobody is emailed. Portal replies stop going to them, and a client or external participant's replies are refused. An admin stops getting the notifications that came from being on the thread (a private or a prospect thread), and loses a private thread unless it reached their own mailbox. Nobody can remove themselves.","operationId":"ProspectEmailsController_removeParticipant","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"threadKey","required":true,"in":"path","schema":{"type":"string"}},{"name":"participantId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"The last To recipient, one already removed, or a converted prospect"}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Remove a participant from an email thread","tags":["Prospect Emails"]}},"/v1/prospects/{prospectId}/emails/threads/{threadKey}/participants/{participantId}/re-add":{"post":{"description":"Nobody is emailed and the re-add sends no history; later replies quote recent messages as usual, including any sent while they were removed. They're back where they were addressed: a To or CC participant gets portal replies again, and anyone's replies are accepted again. Only the address's latest row can be re-added, never your own; a deleted admin can't be, nor anyone addressed once the thread already has as many recipients as an email may.","operationId":"ProspectEmailsController_reAddParticipant","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"threadKey","required":true,"in":"path","schema":{"type":"string"}},{"name":"participantId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"Already added back, a deleted admin, past the recipient limit, or a converted prospect"}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Re-add a removed participant to an email thread","tags":["Prospect Emails"]}},"/v1/prospects/{prospectId}/emails/threads/{threadKey}/share":{"post":{"description":"Every admin who can open the prospect sees it from then on","operationId":"ProspectEmailsController_shareThread","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"threadKey","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"A converted prospect"}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Share a private email thread with the team","tags":["Prospect Emails"]}},"/v1/prospects/{prospectId}/notes/all":{"get":{"description":"Get every note attached to a prospect, newest first","operationId":"ProspectNotesController_findAll","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProspectNoteEntity"}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List all prospect notes","tags":["Prospect Notes"]}},"/v1/prospects/{prospectId}/notes":{"post":{"description":"Add a new note to a prospect","operationId":"ProspectNotesController_create","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProspectNoteDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectNoteEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Create prospect note","tags":["Prospect Notes"]}},"/v1/prospects/{prospectId}/notes/{noteId}":{"patch":{"description":"Update the content of a prospect note","operationId":"ProspectNotesController_update","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProspectNoteDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectNoteEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update prospect note","tags":["Prospect Notes"]},"delete":{"description":"Delete a note from a prospect","operationId":"ProspectNotesController_delete","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete prospect note","tags":["Prospect Notes"]}},"/v1/prospects/{prospectId}/notes/summary":{"get":{"description":"Get the stored AI summary of manual notes for this prospect","operationId":"ProspectNotesController_getSummary","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectNotesSummaryResponseDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get prospect notes summary","tags":["Prospect Notes"]},"post":{"description":"Generate or regenerate the AI summary of manual notes for this prospect","operationId":"ProspectNotesController_generateSummary","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectNotesSummaryResponseDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Generate prospect notes summary","tags":["Prospect Notes"]}},"/v1/prospects/{prospectId}/meeting-notes":{"get":{"description":"Get a paginated list of meeting notes attached to a prospect","operationId":"ProspectMeetingNotesController_findMany","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectNoteListEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List prospect meeting notes","tags":["Prospect Meeting Notes"]},"post":{"description":"Paste a transcript as a meeting note on a prospect","operationId":"ProspectMeetingNotesController_create","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProspectMeetingNoteDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectNoteEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Create prospect meeting note","tags":["Prospect Meeting Notes"]}},"/v1/prospects/{prospectId}/meeting-notes/all":{"get":{"description":"Get every meeting note attached to a prospect (non-paginated, for copy-all)","operationId":"ProspectMeetingNotesController_findAll","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProspectNoteEntity"}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List all prospect meeting notes","tags":["Prospect Meeting Notes"]}},"/v1/prospects/{prospectId}/meeting-notes/summary":{"get":{"description":"Get the stored AI summary of meeting notes for this prospect","operationId":"ProspectMeetingNotesController_getSummary","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectNotesSummaryResponseDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get prospect meeting notes summary","tags":["Prospect Meeting Notes"]},"post":{"description":"Generate or regenerate the AI summary of meeting notes for this prospect","operationId":"ProspectMeetingNotesController_generateSummary","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectNotesSummaryResponseDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Generate prospect meeting notes summary","tags":["Prospect Meeting Notes"]}},"/v1/prospects/{prospectId}/meeting-notes/{noteId}":{"patch":{"description":"Update the content of a prospect meeting note","operationId":"ProspectMeetingNotesController_update","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProspectMeetingNoteDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectNoteEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update prospect meeting note","tags":["Prospect Meeting Notes"]},"delete":{"description":"Delete a meeting note from a prospect","operationId":"ProspectMeetingNotesController_delete","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete prospect meeting note","tags":["Prospect Meeting Notes"]}},"/v1/prospects/{prospectId}/pricing-sheet":{"get":{"description":"Returns the persisted pricing sheet plus accumulated totals (`dueAtSigning`, `corpTaxTotalAnnualCost`, `individualTaxTotalAnnualCost`), or a virtual template (`id` is null) when none is saved yet. The introductionMeeting section falls back per-field to the ProspectQuestionnaire when nothing is saved on the pricing sheet itself, except the primary contact, which is one person once the Pricing Form answers are submitted. For a prospect that is neither archived nor marked Not Moving Forward, while the sheet status is not one of: completed, approved, rejected, every empty value is filled as well: the first page from the submitted Pricing Form answers, then the questionnaire (Location of Registered Entity from PF3 or IQ6 while IQ5 says the business is registered, the Authorized Signatory from PF4's first signer, the primary contact from PF4's first card, compliance statuses and service interests row by row), and the empty Foundational, Incentives Decree, Corporate Tax and Access to Capital statuses from that first page; rows filled that way and not yet saved have a null `id`. Any other sheet returns the saved rows only, or the questionnaire's mapping when none is saved. `answersSubmittedAt` names the submit the response read.","operationId":"ProspectPricingSheetController_findOne","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectPricingSheetEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get prospect pricing sheet","tags":["Prospect Pricing Sheet"]},"post":{"description":"Creates the pricing sheet on first call and replaces it on subsequent calls. The introductionMeeting and servicesAssessment sections are persisted on the ProspectPricingSheet itself (the questionnaire is left untouched). Item arrays are replaced with the payload (delete + createMany). Deletes any saved draft on success. The first submit on the pricing-sheet step moves status=preparing to status=drafted. Rejected with 400 for an archived prospect, or while the pricing sheet status is one of: completed, approved, rejected; rejected with 409 for a prospect who submitted the Pricing Form after `answersSubmittedAt`.","operationId":"ProspectPricingSheetController_upsert","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertProspectPricingSheetDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectPricingSheetEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"The prospect submitted the Pricing Form after `answersSubmittedAt`"}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Upsert prospect pricing sheet","tags":["Prospect Pricing Sheet"]}},"/v1/prospects/{prospectId}/pricing-sheet/prefill":{"get":{"description":"What an empty sheet is filled with, whether or not one is saved: for a prospect whose sheet takes the fill (see the GET), the submitted Pricing Form answers, then the Initial Questionnaire, and the later tabs' statuses from that first page; otherwise the questionnaire's mapping. The admin fills a restored draft's empty values from it, and with `skipQuestionnaire` replaces a draft's values with answers submitted after it was saved.","operationId":"ProspectPricingSheetController_findPrefill","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"skipQuestionnaire","required":false,"in":"query","description":"Leaves out the Initial Questionnaire's fallback, so the prefill holds only what the submitted Pricing Form answers give: the values the admin lets win over a draft saved before the prospect's latest submit.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectPricingSheetEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the pricing sheet prefill","tags":["Prospect Pricing Sheet"]}},"/v1/prospects/{prospectId}/pricing-sheet/draft":{"get":{"description":"Returns the saved pricing-sheet wizard draft (`data` blob owned by the admin; the api reads only its first page and `answersSubmittedAt`, for a resent Pricing Form link), or null when no draft has been saved yet.","operationId":"ProspectPricingSheetController_findDraft","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectPricingSheetDraftEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get prospect pricing-sheet draft","tags":["Prospect Pricing Sheet"]},"put":{"description":"Upserts the in-progress pricing-sheet wizard state (the admin's `data` blob, validated only for size; the api reads only its first page and `answersSubmittedAt`, for a resent Pricing Form link). Rejected with 400 for an archived prospect, or while the pricing sheet status is one of: completed, approved, rejected.","operationId":"ProspectPricingSheetController_upsertDraft","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertProspectPricingSheetDraftDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectPricingSheetDraftEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Save prospect pricing-sheet draft","tags":["Prospect Pricing Sheet"]}},"/v1/prospects/{prospectId}/pricing-sheet/approve":{"post":{"description":"Approves a completed pricing sheet (status=completed -> approved). Caller must be an active super admin, or an active admin who holds the `prospect_approval` permission. No other Prospect permission is required. Rejected with 400 for an archived prospect.","operationId":"ProspectPricingSheetController_approve","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Approve pricing sheet","tags":["Prospect Pricing Sheet"]}},"/v1/prospects/{prospectId}/pricing-sheet/reject":{"post":{"description":"Rejects a completed pricing sheet (status=completed -> rejected). Caller must be an active super admin, or an active admin who holds the `prospect_approval` permission. No other Prospect permission is required. Sends the rejection email to the given To and CC and keeps the prospect active. Rejected with 400 for an archived prospect.","operationId":"ProspectPricingSheetController_reject","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectProspectPricingSheetDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Reject pricing sheet","tags":["Prospect Pricing Sheet"]}},"/v1/prospects/{prospectId}/pricing-sheet/notify-tax-team":{"post":{"description":"Sends the tax-complexity notification email to all active users with the `tax_complexity` permission, asking them to complete their part of the pricing form. Can be triggered repeatedly; every send is audited. Rejected with 400 for an archived prospect, or unless the pricing sheet status is preparing or drafted.","operationId":"ProspectPricingSheetController_notifyTaxTeam","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectTaxTeamNotificationResultDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Notify the Tax Team about pricing-sheet complexity","tags":["Prospect Pricing Sheet"]}},"/v1/prospects/{prospectId}/pricing-sheet/mark-completed":{"post":{"description":"Transitions the prospect from pricing-sheet status=drafted to status=completed and emails the pricing-sheet approvers. Deletes any saved, unsubmitted draft. Rejected with 400 when the prospect is archived, when no pricing sheet has been submitted, when the prospect submitted the Pricing Form after the sheet was last saved or when obligatory sections (Incentives Decree, Access to Capital, Foundational Services) are missing. The workflow stays on the pricing-sheet step; once an approver approves it, the admin advances to the agreement step explicitly via the \"Generate Agreement\" CTA.","operationId":"ProspectPricingSheetController_markCompleted","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Mark pricing-sheet completed","tags":["Prospect Pricing Sheet"]}},"/v1/prospects/{prospectId}/pricing-sheet/lookup":{"get":{"description":"Returns the effective pricing-lookup matrices for the prospect. Sections without a per-prospect override row resolve to the in-code defaults seeded from the Excel template; sections with overrides return the saved values. Each section carries an `isOverridden` flag.","operationId":"ProspectPricingSheetLookupController_findOne","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectPricingSheetLookupEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get prospect pricing sheet lookup","tags":["Prospect Pricing Sheet Lookup"]},"post":{"description":"Replaces per-section override rows for the prospect. Per-section: omitted = no-op, value = full replacement (delete-then-createMany). Cell-level `null` is a real value (means \"no price applies for that cell\").","operationId":"ProspectPricingSheetLookupController_upsert","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertProspectPricingSheetLookupDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectPricingSheetLookupEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Upsert prospect pricing sheet lookup","tags":["Prospect Pricing Sheet Lookup"]}},"/v1/prospects/{prospectId}/pricing-form":{"get":{"description":"The prospect's answers to the Pricing Form questions, with when the link was last sent and submitted. Returns null body until a link is first issued; `sentAt` stays null until its email goes out.","operationId":"ProspectPricingFormController_findOne","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the answers, or null until a link is first issued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectPricingFormAnswersEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the Pricing Form answers","tags":["Prospect Pricing Form"]}},"/v1/prospects/{prospectId}/pricing-form/send":{"post":{"description":"Issue a magic link to the Pricing Form questions and email it to the given To and CC, then record when it was sent and revoke any earlier Pricing Form link. Once the email is out, a failure to record it is logged, not returned. Leaves the Pricing Sheet step as it is. Rejected with 400 for an archived prospect, or while the Pricing Sheet status is one of: completed, approved, rejected.","operationId":"ProspectPricingFormController_send","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendPricingFormLinkDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectPricingFormAnswersEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Send the Pricing Form link","tags":["Prospect Pricing Form"]}},"/v1/pricing-form/public/{token}":{"get":{"description":"Validates the magic link and returns the answers the form starts from: the prospect's submitted answers with business development's corrections since, PF3 from the Initial Questionnaire when the submit left it out, or else a pre-fill from the Initial Questionnaire. Returns 410 in the cases below; 404 if the token is invalid.","operationId":"ProspectPricingFormPublicController_getPayload","parameters":[{"name":"token","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPricingFormDto"}}}},"404":{"description":"Token not found"},"410":{"description":"Link is expired, used or replaced; the prospect is archived; or the Pricing Sheet status is one of: completed, approved, rejected"}},"summary":"Get the Pricing Form via magic link","tags":["Prospect Pricing Form (Public)"]}},"/v1/pricing-form/public/{token}/submit":{"post":{"description":"Saves the prospect's answers, replacing any earlier ones, and uses up the magic link. Returns 204 on success; 400 when a required answer is missing; 409 when the questionnaire now asks where the business is registered and the answers leave it out; 410 in the cases below; 404 if the token is invalid.","operationId":"ProspectPricingFormPublicController_submit","parameters":[{"name":"token","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitPricingFormDto"}}}},"responses":{"204":{"description":"Answers saved, link used up"},"400":{"description":"A required answer is missing"},"404":{"description":"Token not found"},"409":{"description":"Where the business is registered (PF3) is asked since the page loaded; reload to answer it"},"410":{"description":"Link is expired, used or replaced; the prospect is archived; or the Pricing Sheet status is one of: completed, approved, rejected"}},"summary":"Submit the Pricing Form via magic link","tags":["Prospect Pricing Form (Public)"]}},"/v1/prospects/{prospectId}/meetings/availability":{"get":{"description":"Returns free slots and busy windows from the main sales manager's Google Calendar so an admin can pick a slot (and optionally override busy times).","operationId":"ProspectMeetingsController_getAvailability","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAvailabilityEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"calendar_not_connected or no_main_sales_manager"}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get scheduling availability for the main sales manager","tags":["Prospect Meetings"]}},"/v1/prospects/{prospectId}/meetings/upcoming":{"get":{"description":"Returns the next scheduled meeting, the active booking link, the most recent past meeting, or none — in that priority order.","operationId":"ProspectMeetingsController_getUpcoming","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectMeetingCardEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the meeting card for a prospect","tags":["Prospect Meetings"]}},"/v1/prospects/{prospectId}/meetings/schedule":{"post":{"description":"Creates a Google Calendar event in the main sales manager's calendar. Use overrideConflict=true to bypass a busy slot.","operationId":"ProspectMeetingsController_schedule","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleMeetingDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectMeetingEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"calendar_conflict, calendar_not_connected, or no_main_sales_manager"}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Schedule a meeting manually","tags":["Prospect Meetings"]}},"/v1/prospects/{prospectId}/meetings/booking-link":{"post":{"description":"Creates an active booking link for the prospect's current phase. Any existing active link for the same phase is revoked.","operationId":"ProspectMeetingsController_createBookingLink","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBookingLinkDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectBookingLinkEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Generate a booking link and email it to the prospect, or the given To and CC","tags":["Prospect Meetings"]}},"/v1/prospects/{prospectId}/meetings/booking-link/{linkId}":{"delete":{"operationId":"ProspectMeetingsController_revokeBookingLink","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"linkId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Revoke an active booking link","tags":["Prospect Meetings"]}},"/v1/prospects/{prospectId}/meetings/{meetingId}":{"delete":{"operationId":"ProspectMeetingsController_cancel","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"meetingId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Cancel a scheduled meeting","tags":["Prospect Meetings"]}},"/v1/public/booking/{token}":{"get":{"operationId":"ProspectBookingsController_getPage","parameters":[{"name":"token","required":true,"in":"path","schema":{"type":"string"}},{"name":"tz","required":false,"in":"query","description":"IANA time zone of the prospect's browser, used to render the response. Slot generation always follows the sales manager's business hours.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicBookingPageEntity"}}}},"404":{"description":"Token is invalid, expired, or revoked"}},"summary":"Get a public booking page for a prospect token","tags":["Public Booking"]}},"/v1/public/booking/{token}/confirm":{"post":{"operationId":"ProspectBookingsController_confirm","parameters":[{"name":"token","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmBookingDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicBookingConfirmationEntity"}}}}},"summary":"Confirm a booking slot as the prospect","tags":["Public Booking"]}},"/v1/prospects/{prospectId}/mnda":{"get":{"operationId":"ProspectMndaController_findMostRecent","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectMndaEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get most recent MNDA for prospect","tags":["Prospect MNDA"]},"post":{"description":"Creates a new MNDA backed by a DocuSign draft envelope. Recipient and signing order are derived from the prospect. Idempotent: if a draft is already in flight, the existing one is returned. Rejected with 400 for an archived prospect.","operationId":"ProspectMndaController_create","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectMndaEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Create new MNDA from template","tags":["Prospect MNDA"]}},"/v1/prospects/{prospectId}/mnda/upload":{"post":{"description":"Stores an uploaded PDF, DOCX, or DOC as a new MNDA backed by a DocuSign draft envelope. Sender view configuration is required before this MNDA can be sent. Rejected if an MNDA is already in flight — cancel it first. Rejected with 400 for an archived prospect.","operationId":"ProspectMndaController_upload","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectMndaEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Upload an MNDA file","tags":["Prospect MNDA"]}},"/v1/prospects/{prospectId}/mnda/{mndaId}/sender-view":{"post":{"description":"Returns a DocuSign sender view URL for placing the signature fields on an uploaded MNDA. Rejected with 400 for an archived prospect.","operationId":"ProspectMndaController_createSenderView","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mndaId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMndaSenderViewDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MndaSenderViewResponseDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Create DocuSign sender view URL","tags":["Prospect MNDA"]}},"/v1/prospects/{prospectId}/mnda/{mndaId}/sender-view/complete":{"post":{"description":"Called by the frontend after the user returns from DocuSign. The backend re-fetches the envelope state and reconciles status — the FE-supplied query event is intentionally ignored.","operationId":"ProspectMndaController_completeSenderView","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mndaId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectMndaEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Mark sender view as completed","tags":["Prospect MNDA"]}},"/v1/prospects/{prospectId}/mnda/{mndaId}/send":{"post":{"description":"Syncs the envelope carbon copies, then sends the MNDA DocuSign envelope to the client. Optionally customizes the envelope email (subject and bodyHtml) before sending. Rejected with 400 for an archived prospect.","operationId":"ProspectMndaController_send","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mndaId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendProspectMndaDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectMndaEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"Another send of the draft is under way, or it was sent or cancelled meanwhile; reload it to see where it stands."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Send MNDA to recipients","tags":["Prospect MNDA"]}},"/v1/prospects/{prospectId}/mnda/{mndaId}/cancel":{"post":{"description":"Cancels the DocuSign envelope. Only valid for in-flight MNDAs (drafted, sent, viewed); rejected with 400 for an archived prospect.","operationId":"ProspectMndaController_cancel","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mndaId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectMndaEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Cancel MNDA envelope","tags":["Prospect MNDA"]}},"/v1/prospect-mnda/public/sign/{token}":{"get":{"description":"Called by the client-portal MNDA page (the page reminder emails link to). On success returns the DocuSign recipient-view URL — short-lived (~5 min), so forward the browser to it immediately. On failure returns a structured `{ code, message }` body so the portal can render a proper state instead of showing raw error JSON.","operationId":"ProspectMndaPublicController_sign","parameters":[{"name":"token","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectMndaSignUrlResponseDto"}}}},"404":{"description":"Token not found (`code: token_not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectMndaSignErrorResponseDto"}}}},"409":{"description":"MNDA is not in a signable state — already finalized (signed/declined/voided), or otherwise unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectMndaSignErrorResponseDto"}}}},"410":{"description":"Link is expired or already used (`code: link_expired_or_used`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectMndaSignErrorResponseDto"}}}}},"summary":"Resolve an MNDA reminder magic link to a DocuSign signing URL","tags":["Prospect MNDA (Public)"]}},"/v1/prospects/{prospectId}/manual-reminder/context":{"get":{"description":"Returns the values used to fill in template placeholders (prospect name, sender name, today), and the To and CC of the newest reminder behind each template (never the signer-only MNDA auto-reminder), which prefill the follow-up. The frontend substitutes these into the template strings before showing them in the modal.","operationId":"ProspectManualReminderController_getContext","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualReminderContextEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get interpolation context for manual reminder templates","tags":["Prospect Manual Reminder"]}},"/v1/prospects/{prospectId}/manual-reminder":{"post":{"description":"Render the chosen template with the user-edited copy, send the email, record a sent ProspectReminder (triggerType=manual), cancel any scheduled auto-reminder of the same type, and schedule a fresh auto-reminder 7 days out.","operationId":"ProspectManualReminderController_send","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendManualReminderDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectReminderEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"calendar_not_connected or no_main_sales_manager"}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Send a manual reminder email to a prospect","tags":["Prospect Manual Reminder"]}},"/v1/prospects/{prospectId}/agreements":{"get":{"operationId":"ProspectAgreementController_list","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProspectAgreementEntity"}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List agreements for prospect","tags":["Prospect Agreements"]}},"/v1/prospects/{prospectId}/agreements/{agreementId}":{"get":{"operationId":"ProspectAgreementController_findOne","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"agreementId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectAgreementEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get a single agreement","tags":["Prospect Agreements"]},"delete":{"description":"Voids the DocuSign envelope (if voidable), removes all stored files, and hard-deletes the row. Blocked when the agreement is signed.","operationId":"ProspectAgreementController_remove","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"agreementId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete agreement","tags":["Prospect Agreements"]}},"/v1/prospects/{prospectId}/agreements/generate":{"post":{"description":"Renders the selected agreement template, stores both DOCX and PDF copies, and creates a DocuSign draft envelope.","operationId":"ProspectAgreementController_generate","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateProspectAgreementDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectAgreementEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Generate a new agreement from template","tags":["Prospect Agreements"]}},"/v1/prospects/{prospectId}/agreements/upload":{"post":{"description":"Stores an uploaded PDF, DOCX, or DOC as a new version. Sender view configuration is required before this version can be sent.","operationId":"ProspectAgreementController_upload","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"},"kind":{"type":"string","enum":["hard_to_recruit","tourism","general"]}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectAgreementEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Upload an agreement file","tags":["Prospect Agreements"]}},"/v1/prospects/{prospectId}/agreements/{agreementId}/sender-view":{"post":{"description":"Returns a DocuSign sender view URL for placing anchors and configuring recipients on an uploaded agreement.","operationId":"ProspectAgreementController_createSenderView","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"agreementId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSenderViewDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderViewResponseDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Create DocuSign sender view URL","tags":["Prospect Agreements"]}},"/v1/prospects/{prospectId}/agreements/{agreementId}/sender-view/complete":{"post":{"description":"Called by the frontend after the user returns from DocuSign. The backend re-fetches the envelope state from DocuSign and reconciles status — the FE-supplied query event is intentionally ignored.","operationId":"ProspectAgreementController_completeSenderView","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"agreementId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectAgreementEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Mark sender view as completed","tags":["Prospect Agreements"]}},"/v1/prospects/{prospectId}/agreements/{agreementId}/send":{"post":{"description":"Updates the DocuSign envelope signer, carbon copies and email, sends the envelope, then sends the signer and CC a custom email with the unsigned PDF and the uploaded files attached.","operationId":"ProspectAgreementController_send","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"agreementId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendProspectAgreementDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendProspectAgreementResultDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"Another send of the draft is under way, or it was sent or cancelled meanwhile; reload it to see where it stands."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Send agreement to client","tags":["Prospect Agreements"]}},"/v1/prospects/{prospectId}/agreements/{agreementId}/cancel":{"post":{"description":"Voids the DocuSign envelope but keeps the agreement row in the list for audit visibility.","operationId":"ProspectAgreementController_cancel","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"agreementId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectAgreementEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Cancel agreement (void DocuSign envelope)","tags":["Prospect Agreements"]}},"/v1/prospects/{prospectId}/questionnaire":{"get":{"description":"Fetch the questionnaire record (status + answers + sub-tables) for a prospect. Returns null body when no questionnaire has been created yet.","operationId":"ProspectQuestionnaireController_findOne","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the questionnaire, or null when none exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get prospect questionnaire","tags":["Prospect Questionnaire"]}},"/v1/prospects/{prospectId}/questionnaire/setup":{"get":{"description":"Returns the full question catalog for the active flow with enabled flags plus configured custom questions. Does not create a questionnaire row.","operationId":"ProspectQuestionnaireController_getSetup","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireSetupDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get questionnaire setup","tags":["Prospect Questionnaire"]},"put":{"description":"Persists the disabled question keys (existence-validated) and the full custom questions list for the active flow. Custom questions are synced: items with an id are updated, items without an id are created, and existing questions omitted from the list are deleted. Rejected with 400 once approved or for an archived prospect.","operationId":"ProspectQuestionnaireController_updateSetup","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQuestionnaireSetupDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireSetupDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update questionnaire setup","tags":["Prospect Questionnaire"]}},"/v1/prospects/{prospectId}/questionnaire/prefill":{"get":{"description":"The prospect's type now, and what the form opens with before its first save, as the prospect's link gets it: the prospect's name, email, phone and business name; for an Individual, the first contact's phone when the prospect has none, and the answers its Business questionnaire gives the IIQ.","operationId":"ProspectQuestionnaireController_getPrefill","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnairePrefillDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get questionnaire prefill","tags":["Prospect Questionnaire"]}},"/v1/prospects/{prospectId}/questionnaire/send":{"post":{"description":"Generate a magic link, email it to the given To and CC, and mark the questionnaire status as sent. Revokes any previously issued magic link for this prospect. Rejected with 400 for an archived prospect or an approved questionnaire.","operationId":"ProspectQuestionnaireController_send","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendQuestionnaireLinkDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Send questionnaire link","tags":["Prospect Questionnaire"]}},"/v1/prospects/{prospectId}/questionnaire/draft":{"put":{"description":"Save the answers given so far without submitting: required answers may be missing, and the Questionnaire step, the magic link and the reminder stay as they are. Answers to questions their display conditions hide are dropped. Rejected with 400 if the questionnaire has already been approved or the prospect is archived, and with 409 when its answers changed since `questionnaireVersion` (their `answersUpdatedAt`) — or when `questionnaireVersion` is left out but answers were already saved. Sending the link and approval leave the answers unchanged; Setup changes them only when it clears or removes an answered custom question.","operationId":"ProspectQuestionnaireController_saveDraft","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"questionnaireVersion","required":false,"in":"query","description":"The questionnaire's `answersUpdatedAt` (when its answers last changed) as the form opened; the save is refused with 409 when the answers changed since. Leave it out only when no answer was saved yet: a save without it is refused with 409 once answers are saved.","schema":{"format":"date-time","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitQuestionnaireDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"The answers changed since `questionnaireVersion`, or answers were already saved and no `questionnaireVersion` was sent."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Save questionnaire draft on behalf of prospect","tags":["Prospect Questionnaire"]}},"/v1/prospects/{prospectId}/questionnaire/submit":{"post":{"description":"Save the questionnaire answers; a submission needs every required answer its prospect type's questionnaire shows. Handles both first-time submission and post-submission edits. Revokes any active magic link. Rejected with 400 when a required answer is missing, the questionnaire has already been approved or the prospect is archived, and with 409 when its answers changed since `questionnaireVersion` (their `answersUpdatedAt`) — or when `questionnaireVersion` is left out but answers were already saved. Sending the link and approval leave the answers unchanged; Setup changes them only when it clears or removes an answered custom question.","operationId":"ProspectQuestionnaireController_submit","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"questionnaireVersion","required":false,"in":"query","description":"The questionnaire's `answersUpdatedAt` (when its answers last changed) as the form opened; the save is refused with 409 when the answers changed since. Leave it out only when no answer was saved yet: a save without it is refused with 409 once answers are saved.","schema":{"format":"date-time","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitQuestionnaireDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"The answers changed since `questionnaireVersion`, or answers were already saved and no `questionnaireVersion` was sent."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Submit questionnaire on behalf of prospect","tags":["Prospect Questionnaire"]}},"/v1/prospects/{prospectId}/questionnaire/approve":{"post":{"description":"Lock the questionnaire and advance the workflow from initial_contact to mnda_request. Valid only when initial_contact status is completed and the prospect is not archived.","operationId":"ProspectQuestionnaireController_approve","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Approve questionnaire","tags":["Prospect Questionnaire"]}},"/v1/questionnaire/public/{token}":{"get":{"description":"Validates the magic link and returns the data needed to render the form: active flow, prospect prefill values, disabled question keys, custom questions (without answers), the answers saved so far, and when they last changed. Returns 410 if consumed or expired, or the questionnaire is approved; 404 if the token is invalid.","operationId":"ProspectQuestionnairePublicController_getPayload","parameters":[{"name":"token","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicQuestionnaireDto"}}}},"404":{"description":"Token not found"},"410":{"description":"Link is expired or already used, or the questionnaire was approved"}},"summary":"Get questionnaire form payload via magic link","tags":["Prospect Questionnaire (Public)"]}},"/v1/questionnaire/public/{token}/submit":{"post":{"description":"Submits the questionnaire answers and consumes the magic link. Returns 204 on success; 410 if the link is already consumed or expired, or the questionnaire was approved meanwhile; 404 if the token is invalid. Rejected with 409 when its answers changed since `questionnaireVersion` (their `answersUpdatedAt`) — or when `questionnaireVersion` is left out but answers were already saved. Sending the link and approval leave the answers unchanged; Setup changes them only when it clears or removes an answered custom question.","operationId":"ProspectQuestionnairePublicController_submit","parameters":[{"name":"token","required":true,"in":"path","schema":{"type":"string"}},{"name":"questionnaireVersion","required":false,"in":"query","description":"The questionnaire's `answersUpdatedAt` (when its answers last changed) as the form opened; the save is refused with 409 when the answers changed since. Leave it out only when no answer was saved yet: a save without it is refused with 409 once answers are saved.","schema":{"format":"date-time","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitQuestionnaireDto"}}}},"responses":{"204":{"description":"Answers saved, link consumed"},"404":{"description":"Token not found"},"409":{"description":"The answers changed since `questionnaireVersion`, or answers were already saved and no `questionnaireVersion` was sent."},"410":{"description":"Link is expired or already used, or the questionnaire was approved"}},"summary":"Submit questionnaire via magic link","tags":["Prospect Questionnaire (Public)"]}},"/v1/prospects/{prospectId}/documents-request":{"get":{"description":"Fetch the documents request (sections + files) for a prospect. Returns null when no request has been created yet.","operationId":"ProspectDocumentsRequestController_findOne","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the documents request, or null when none exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentsRequestEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get documents request","tags":["Prospect Documents Request"]}},"/v1/prospects/{prospectId}/documents-request/sections":{"post":{"description":"Add a new custom section to the documents request","operationId":"ProspectDocumentsRequestController_addSection","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddSectionDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSectionEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Add custom section","tags":["Prospect Documents Request"]}},"/v1/prospects/{prospectId}/documents-request/sections/{sectionId}":{"delete":{"description":"Delete a custom section and its files. Default sections cannot be deleted.","operationId":"ProspectDocumentsRequestController_deleteSection","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"sectionId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete custom section","tags":["Prospect Documents Request"]},"patch":{"description":"Request a section from the prospect, or stop requesting it. A section not requested is not shown to the prospect; one that already has files or a description stays requested.","operationId":"ProspectDocumentsRequestController_updateSection","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"sectionId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProspectDocumentSectionDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSectionEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update section","tags":["Prospect Documents Request"]}},"/v1/prospects/{prospectId}/documents-request/sections/{sectionId}/files":{"post":{"description":"Persist an admin-uploaded file to a section. Rejected while the section is not requested.","operationId":"ProspectDocumentsRequestController_addFile","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"sectionId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReferenceDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSectionEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Add admin-uploaded file to a section","tags":["Prospect Documents Request"]}},"/v1/prospects/{prospectId}/documents-request/sections/{sectionId}/files/{fileId}":{"delete":{"description":"Removes the file row and the GCS object.","operationId":"ProspectDocumentsRequestController_deleteFile","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"sectionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"fileId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete a file from a section","tags":["Prospect Documents Request"]}},"/v1/prospects/{prospectId}/documents-request/send":{"post":{"description":"Generate a magic link, email it to the given To and CC, and mark the documents request as sent. Revokes any previously issued magic link.","operationId":"ProspectDocumentsRequestController_send","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDocumentsRequestLinkDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentsRequestEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Send documents request link","tags":["Prospect Documents Request"]}},"/v1/prospects/{prospectId}/documents-request/transition":{"post":{"description":"Runs one of the documents-request status transitions (mark_submitted, mark_completed, prepare_pricing_sheet, flag_clarification, exit_clarification). The transitions valid for the current state are exposed as `allowedActions` on the documents-request entity; an archived prospect has none. `targetStatus` is required for exit_clarification.","operationId":"ProspectDocumentsRequestController_applyTransition","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransitionDocumentsRequestDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Apply a documents-request workflow transition","tags":["Prospect Documents Request"]}},"/v1/documents-request/public/{token}":{"get":{"description":"Returns 200 with pending sections when the link is valid; 410 if consumed or expired; 404 if the token is invalid.","operationId":"ProspectDocumentsRequestPublicController_validate","parameters":[{"name":"token","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDocumentsRequestEntity"}}}},"404":{"description":"Token not found"},"410":{"description":"Link is expired or already used"}},"summary":"Validate documents request magic link","tags":["Prospect Documents Request (Public)"]}},"/v1/documents-request/public/{token}/files/upload":{"post":{"description":"Uploads a single file to GCS. Token is validated (peeked) but not consumed.","operationId":"ProspectDocumentsRequestPublicController_uploadFile","parameters":[{"name":"token","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadResultEntity"}}}}},"summary":"Upload a file via the magic link","tags":["Prospect Documents Request (Public)"]}},"/v1/documents-request/public/{token}/submit":{"post":{"description":"Persists the answered sections (file references and descriptions), marks the request as submitted, and consumes the magic link. Returns 409 without saving anything when an answered section is no longer pending, so the page can reload the sections.","operationId":"ProspectDocumentsRequestPublicController_submit","parameters":[{"name":"token","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitPublicDto"}}}},"responses":{"204":{"description":"Submission saved, link consumed"},"404":{"description":"Token not found"},"409":{"description":"An answered section is no longer requested, was deleted or was answered since the page loaded"},"410":{"description":"Link is expired or already used"}},"summary":"Submit the documents request via magic link","tags":["Prospect Documents Request (Public)"]}},"/v1/prospects/{prospectId}/documents-request/sections/{sectionId}/notes/review-request":{"post":{"description":"Start a review conversation on the section with its current files, and notify the selected administrators by email and in the app.","operationId":"ProspectDocumentSectionNotesController_createReviewRequest","parameters":[{"name":"sectionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentReviewRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentReviewRequestResultDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Request a document review","tags":["Prospect Document Section Notes"]}},"/v1/prospects/{prospectId}/documents-request/sections/{sectionId}/notes/reviewers":{"get":{"description":"Internal administrators other than the caller, not suspended, who can view prospects, sorted by name; a long list is cut short, so search by name or email narrows it.","operationId":"ProspectDocumentSectionNotesController_findReviewerOptions","parameters":[{"name":"search","required":false,"in":"query","description":"Matches the name or email; at most 255 characters.","schema":{"type":"string"}},{"name":"sectionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserSummaryEntity"}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Search the administrators a document review can be requested from","tags":["Prospect Document Section Notes"]}},"/v1/prospects/{prospectId}/documents-request/sections/{sectionId}/notes":{"get":{"description":"Root notes only, newest first, each with its thread summary.","operationId":"ProspectDocumentSectionNotesController_findMany","parameters":[{"name":"sectionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProspectDocumentSectionNoteEntity"}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List the notes on a document section","tags":["Prospect Document Section Notes"]},"post":{"operationId":"ProspectDocumentSectionNotesController_create","parameters":[{"name":"sectionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNoteDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectDocumentSectionNoteEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Add a note to a document section","tags":["Prospect Document Section Notes"]}},"/v1/prospects/{prospectId}/documents-request/sections/{sectionId}/notes/{noteId}":{"patch":{"description":"Only the note's author may edit it.","operationId":"ProspectDocumentSectionNotesController_update","parameters":[{"name":"sectionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}},{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNoteDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectDocumentSectionNoteEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Edit a note","tags":["Prospect Document Section Notes"]},"delete":{"description":"Only the note's author may delete it. Its replies go with it.","operationId":"ProspectDocumentSectionNotesController_delete","parameters":[{"name":"sectionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}},{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete a note","tags":["Prospect Document Section Notes"]}},"/v1/prospects/{prospectId}/documents-request/sections/{sectionId}/notes/{noteId}/replies":{"get":{"description":"Every reply on a note, oldest first.","operationId":"ProspectDocumentSectionNotesController_findReplies","parameters":[{"name":"sectionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}},{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NoteReplyEntity"}}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List replies in a note thread","tags":["Prospect Document Section Notes"]},"post":{"operationId":"ProspectDocumentSectionNotesController_createReply","parameters":[{"name":"sectionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}},{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNoteDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteReplyEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Reply to a note","tags":["Prospect Document Section Notes"]}},"/v1/prospects/{prospectId}/documents-request/sections/{sectionId}/notes/{noteId}/replies/{replyId}":{"patch":{"description":"Only the reply's author may edit it.","operationId":"ProspectDocumentSectionNotesController_updateReply","parameters":[{"name":"sectionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}},{"name":"replyId","required":true,"in":"path","description":"Reply ID","schema":{"type":"string"}},{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNoteDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteReplyEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Edit a reply","tags":["Prospect Document Section Notes"]},"delete":{"description":"Only the reply's author may delete it.","operationId":"ProspectDocumentSectionNotesController_deleteReply","parameters":[{"name":"sectionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}},{"name":"replyId","required":true,"in":"path","description":"Reply ID","schema":{"type":"string"}},{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Delete a reply","tags":["Prospect Document Section Notes"]}},"/v1/prospects/{prospectId}/documents-request/sections/{sectionId}/notes/{noteId}/read":{"post":{"description":"Move the caller's read marker on a note thread forward.","operationId":"ProspectDocumentSectionNotesController_markThreadRead","parameters":[{"name":"sectionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"noteId","required":true,"in":"path","description":"Note ID","schema":{"type":"string"}},{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkNoteThreadReadDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Mark a note thread read","tags":["Prospect Document Section Notes"]}},"/v1/prospects/{prospectId}/ai-summary":{"get":{"description":"Get the prospect stage, services needed, document status, and the last generated AI assessment for this prospect","operationId":"AiSummaryController_get","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectAiSummaryResponseDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get prospect AI summary","tags":["Prospect AI Summary"]},"post":{"description":"Generate or regenerate the AI assessment for this prospect","operationId":"AiSummaryController_generate","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectAiSummaryResponseDto"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Generate prospect AI summary","tags":["Prospect AI Summary"]}},"/v1/prospects/{prospectId}/bypass":{"post":{"description":"Stores the uploaded PDF as a signed agreement and moves the prospect to Phase 5, ready to convert. Agreements the client has yet to sign are voided (one waiting only on DECA is left), the reminders of every step are cancelled, a saved conversion draft is discarded, and the agreement is read by AI in the background — its `parsing` reports progress. Caller must be a super admin or hold the `bypass_prospect_flow` permission; no other Prospect permission is required. Rejected for a converted, archived or Not Moving Forward prospect, one whose pricing sheet was rejected, and while the previous bypass agreement is still being read. Cannot be undone.","operationId":"ProspectBypassController_bypass","parameters":[{"name":"prospectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"},"reason":{"type":"string","maxLength":1000}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectAgreementEntity"}}}},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Bypass the prospect flow","tags":["Prospect Bypass"]}},"/v1/google-workspace/me":{"get":{"operationId":"GoogleWorkspaceController_getMine","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceConnectionDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Get current user Google Workspace connection","tags":["Google Workspace"]},"delete":{"operationId":"GoogleWorkspaceController_revoke","parameters":[],"responses":{"200":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Revoke current user Google Workspace connection","tags":["Google Workspace"]}},"/v1/google-workspace/oauth/connect":{"get":{"description":"Returns the Google authorization URL for the current user. Each user connects their own Google account.","operationId":"GoogleWorkspaceController_connect","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeUrlDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Start Google Workspace OAuth flow","tags":["Google Workspace"]}},"/v1/starfruit-hunt/current":{"get":{"description":"Whether the hunt is running, when it ends, and which spots the caller has already collected","operationId":"StarfruitHuntController_getCurrentState","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarfruitHuntStateDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the current hunt state","tags":["Starfruit Hunt"]}},"/v1/starfruit-hunt/collections":{"post":{"description":"Bank one spot for the caller and answer with the resulting state. Collecting the same spot again is a no-op","operationId":"StarfruitHuntController_collect","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectStarfruitDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarfruitHuntStateDto"}}}},"400":{"description":"The hunt is disabled, not open yet, or already over.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"statusCode":{"type":"number","example":400}}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Collect a starfruit","tags":["Starfruit Hunt"]}},"/v1/starfruit-hunt/leaderboard":{"get":{"description":"Every internal admin ranked by starfruits collected this round, including those with none","operationId":"StarfruitHuntController_getLeaderboard","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarfruitLeaderboardDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the hunt standings","tags":["Starfruit Hunt"]}},"/v1/starfruit-hunt/config":{"get":{"description":"The effective isEnabled/round/startsAt/endsAt, merging any stored override onto the code defaults","operationId":"StarfruitHuntController_getConfig","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarfruitHuntConfigDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the live hunt config (super admin only)","tags":["Starfruit Hunt"]},"patch":{"description":"Patches isEnabled/round/startsAt/endsAt without a redeploy. Unset fields keep their current value.","operationId":"StarfruitHuntController_updateConfig","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStarfruitHuntConfigDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarfruitHuntConfigDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update the hunt config (super admin only)","tags":["Starfruit Hunt"]}},"/v1/holiday-greeting/config":{"get":{"description":"Whether the Santa hat and its greeting are on, and the first and last day they show by the browser’s local date. Any stored override is merged onto the code defaults.","operationId":"HolidayGreetingController_getConfig","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HolidayGreetingConfigDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the holiday greeting config","tags":["Holiday Greeting"]},"patch":{"description":"Patches isEnabled/startsOn/endsOn without a redeploy. Unset fields keep their current value.","operationId":"HolidayGreetingController_updateConfig","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateHolidayGreetingConfigDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HolidayGreetingConfigDto"}}}},"400":{"description":"A date is not a real YYYY-MM-DD day, or endsOn would fall before startsOn.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"statusCode":{"type":"number","example":400}}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Update the holiday greeting config (super admin only)","tags":["Holiday Greeting"]}},"/v1/email-attachments/{fileId}/watermark":{"post":{"description":"Only for a PDF uploaded to the email-attachments folder. The copy keeps the original name; asking again for the same file returns the copy already made.","operationId":"EmailAttachmentsController_watermark","parameters":[{"name":"fileId","required":true,"in":"path","description":"File ID from upload response","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadResultEntity"}}}},"400":{"description":"Not a PDF, password-protected, unreadable, or past the memory or time stamping it may take"},"403":{"description":"Admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Admin access required"},"statusCode":{"type":"number","example":403}}}}}},"404":{"description":"File not found"},"503":{"description":"Too many files are being prepared right now. Try again in a minute."}},"security":[{"cookie":[]}],"summary":"Copy an email attachment PDF with a confidential watermark","tags":["Email Attachments"]}},"/v1/email-drafts/generate":{"post":{"description":"Writes one email body under DECA's Executive Communications OS: the flow's predefined message in a preset tone, or for `custom` the email the admin's description asks for or an improved version of their draft. Nothing is stored or sent.","operationId":"EmailDraftsController_generate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateEmailDraftDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedEmailDraftDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"503":{"description":"The message could not be generated right now. Please try again."}},"security":[{"cookie":[]}],"summary":"Generate an email body","tags":["Email Drafts"]}},"/v1/support/bug-reports":{"post":{"description":"Creates a Bug issue in the configured Jira project, assigned to QA, with the reporter and environment details in the description","operationId":"SupportController_createBugReport","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBugReportDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BugReportResultDto"}}}}},"security":[{"cookie":[]}],"summary":"Report a bug","tags":["Support"]}},"/v1/assistant/messages":{"post":{"description":"Answers a general question about DECA, its services and the client portal from curated DECA knowledge — never from client records. The reply is a server-sent event stream: `delta` events carry `{ content }` text chunks, then exactly one `done` or `error` event, each with `{}`, ends it.","operationId":"AssistantController_sendMessage","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendAssistantMessageDto"}}}},"responses":{"200":{"description":"Server-sent event stream of the reply"},"403":{"description":"The assistant is only available in the client portal"},"503":{"description":"The assistant could not answer right now. Please try again in a moment."}},"security":[{"cookie":[]}],"summary":"Ask the DECA Assistant a question","tags":["Assistant"]}},"/v1/finance":{"get":{"operationId":"FinanceController_findMany","parameters":[{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"maxLength":255,"type":"string"}},{"name":"orgIds","required":false,"in":"query","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"nicknameIds","required":false,"in":"query","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"statuses","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationStatus"}}},{"name":"labelIds","required":false,"in":"query","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"financialStatuses","required":false,"in":"query","description":"Rows on any of these invoice statuses.","schema":{"type":"array","items":{"$ref":"#/components/schemas/ServiceFinancialStatus"}}},{"name":"completedFrom","required":false,"in":"query","description":"Earliest completion date to include — the date the row itself shows. Narrows the lines each organization carries, and an organization left with no line in range drops off the page. A line with no completion date falls outside any range.","schema":{"format":"date-time","type":"string"}},{"name":"completedTo","required":false,"in":"query","description":"Latest completion date to include, read the same way as `completedFrom`.","schema":{"format":"date-time","type":"string"}},{"name":"paidFrom","required":false,"in":"query","description":"Earliest payment date to include; a row not paid falls outside any range.","schema":{"format":"date","example":"2026-09-01","type":"string"}},{"name":"paidTo","required":false,"in":"query","description":"Latest payment date to include.","schema":{"format":"date","example":"2026-09-30","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinanceListDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List organizations with their billing lines and the four totals","tags":["Finance"]}},"/v1/finance/export":{"get":{"operationId":"FinanceController_export","parameters":[{"name":"search","required":false,"in":"query","schema":{"maxLength":255,"type":"string"}},{"name":"orgIds","required":false,"in":"query","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"nicknameIds","required":false,"in":"query","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"statuses","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationStatus"}}},{"name":"labelIds","required":false,"in":"query","schema":{"maxItems":60,"type":"array","items":{"type":"string"}}},{"name":"financialStatuses","required":false,"in":"query","description":"Rows on any of these invoice statuses.","schema":{"type":"array","items":{"$ref":"#/components/schemas/ServiceFinancialStatus"}}},{"name":"completedFrom","required":false,"in":"query","description":"Earliest completion date to include — the date the row itself shows. Narrows the lines each organization carries, and an organization left with no line in range drops off the page. A line with no completion date falls outside any range.","schema":{"format":"date-time","type":"string"}},{"name":"completedTo","required":false,"in":"query","description":"Latest completion date to include, read the same way as `completedFrom`.","schema":{"format":"date-time","type":"string"}},{"name":"paidFrom","required":false,"in":"query","description":"Earliest payment date to include; a row not paid falls outside any range.","schema":{"format":"date","example":"2026-09-01","type":"string"}},{"name":"paidTo","required":false,"in":"query","description":"Latest payment date to include.","schema":{"format":"date","example":"2026-09-30","type":"string"}},{"name":"format","required":false,"in":"query","schema":{"default":"xlsx","allOf":[{"$ref":"#/components/schemas/FinanceExportFormat"}]}}],"responses":{"200":{"description":"Finance export (Excel or CSV)","content":{"text/csv; charset=utf-8":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Export the filtered billing lines as Excel or CSV","tags":["Finance"]}},"/v1/finance/organizations/{orgId}/ad-hoc/export":{"get":{"operationId":"FinanceController_exportAdHoc","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}},{"name":"format","required":false,"in":"query","schema":{"default":"csv","allOf":[{"$ref":"#/components/schemas/FinanceExportFormat"}]}}],"responses":{"200":{"description":"Ad hoc time log export (CSV or Excel)","content":{"text/csv; charset=utf-8":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Export every time entry of an organization's ad hoc services, with the billing of the record each sits in","tags":["Finance"]}},"/v1/finance/organizations/{orgId}/success-fees":{"get":{"operationId":"FinanceController_findSuccessFeeFigures","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FinanceSuccessFeeFiguresDto"}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Work out an organization's Success Fee rows from each R&D credit's ledger","tags":["Finance"]}},"/v1/finance/lines/{lineId}/time-logs":{"get":{"operationId":"FinanceController_findRecordTimeLogs","parameters":[{"name":"lineId","required":true,"in":"path","schema":{"type":"string"}},{"name":"size","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":0,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProductTimeLogsResponseDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List the time entries one ad hoc record holds","tags":["Finance"]}},"/v1/finance/lines/{lineId}/status":{"patch":{"operationId":"FinanceController_updateStatus","parameters":[{"name":"lineId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBillingLineStatusDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"The line no longer has `expectedStatus` — it changed since the page loaded it."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Set a billing line's financial status","tags":["Finance"]}},"/v1/finance/lines/{lineId}/follow-up":{"post":{"operationId":"FinanceController_sendFollowUp","parameters":[{"name":"lineId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendFinanceFollowUpDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"The line is no longer a billed invoice — it was marked paid or moved since the page loaded."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Chase an invoice already billed to the client","tags":["Finance"]}},"/v1/finance/lines/{lineId}/amounts":{"patch":{"operationId":"FinanceController_updateAmounts","parameters":[{"name":"lineId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBillingLineAmountsDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"The line changed between being read and this write, or was invoiced since the page loaded."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Set a billing line's amount and fee","tags":["Finance"]}},"/v1/finance/lines/{lineId}/payment-date":{"patch":{"operationId":"FinanceController_updatePaymentDate","parameters":[{"name":"lineId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBillingLinePaymentDateDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"The line is not paid, or stopped being paid since it was read."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Correct a paid line's payment date","tags":["Finance"]}},"/v1/finance/lines/{lineId}/deferral-note":{"patch":{"operationId":"FinanceController_updateDeferralNote","parameters":[{"name":"lineId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBillingLineDeferralNoteDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"The line is not deferred, or stopped being deferred since it was read."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Edit a deferred line's note","tags":["Finance"]}},"/v1/finance/lines/{lineId}/split":{"post":{"description":"The line keeps `keptAmount`; a new line of the same service bills `splitAmount`, in the same status, with the same dates and note. Only a charge in At Signing, Incentives or Tax & Compliance of at least $0.02, Ready to be Billed or Deferred.","operationId":"FinanceController_splitLine","parameters":[{"name":"lineId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitBillingLineDto"}}}},"responses":{"204":{"description":""},"400":{"description":"A part is under $0.01, or the parts do not add up to `expectedAmount`."},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"The line cannot be split, or its amount is no longer `expectedAmount` or its status changed since it was read."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Split a charge in two","tags":["Finance"]}},"/v1/finance/lines/{lineId}/success-fee":{"patch":{"operationId":"FinanceController_updateSuccessFee","parameters":[{"name":"lineId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBillingLineSuccessFeeDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}},"409":{"description":"AUP terms were sent for a row that no longer carries its service’s AUP."}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Set finance's own success fee terms on an R&D credit's Success Fee row","tags":["Finance"]}},"/v1/finance/ai-summary/current":{"get":{"description":"The report built from the newest published QuickBooks upload, or the newest regeneration of it. Generates nothing.","operationId":"FinanceAiSummaryController_findCurrent","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinanceAiSummaryCurrentDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get the newest Accounts Receivable Report","tags":["Finance AI Summary"]}},"/v1/finance/ai-summary/history":{"get":{"description":"The report repository: every report generated by anyone on the Finance team, newest first, a page at a time. Reports are kept indefinitely.","operationId":"FinanceAiSummaryController_findHistory","parameters":[{"name":"cursor","required":false,"in":"query","description":"Opaque cursor returned by the previous page; omit for first page","schema":{"type":"string"}},{"name":"size","required":false,"in":"query","description":"Page size (max 500)","schema":{"minimum":1,"maximum":500,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinanceAiSummaryHistoryPageDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"List stored Accounts Receivable Reports","tags":["Finance AI Summary"]}},"/v1/finance/ai-summary/regenerate":{"post":{"description":"Rebuilds the report from the newest published QuickBooks upload with current portal data: links, labels, tax credits, Finance history, notes, emails and meeting notes. Stored as a new report and audited.","operationId":"FinanceAiSummaryController_regenerate","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinanceAiSummaryViewDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Regenerate the Accounts Receivable Report","tags":["Finance AI Summary"]}},"/v1/finance/ai-summary/uploads":{"post":{"description":"Parses the workbook and proposes an organization for each QuickBooks customer. The upload waits, unpublished, for the uploader to confirm the matches; a new upload replaces one they left pending.","operationId":"FinanceAiSummaryController_upload","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinanceArUploadPreviewDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Upload a QuickBooks A/R Aging Summary","tags":["Finance AI Summary"]}},"/v1/finance/ai-summary/uploads/{uploadId}/publish":{"post":{"description":"Saves the confirmed links, publishes the upload and generates the report from it. Only the uploader can publish their upload. When the upload is already published, links changed since are saved and the report is rebuilt; with none changed, its report is returned if it was built, or rebuilt if it failed to. 409 once another upload has been published since this one was uploaded.","operationId":"FinanceAiSummaryController_publish","parameters":[{"name":"uploadId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishFinanceArUploadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinanceAiSummaryViewDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Publish a pending upload","tags":["Finance AI Summary"]}},"/v1/finance/ai-summary/uploads/{uploadId}":{"delete":{"description":"The current report stays as it is.","operationId":"FinanceAiSummaryController_cancel","parameters":[{"name":"uploadId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Cancel a pending upload","tags":["Finance AI Summary"]}},"/v1/finance/ai-summary/customer-links":{"put":{"description":"Links a QuickBooks customer to an organization, or unlinks it when `organizationId` is null. Reports read links when generated, so the current one turns stale.","operationId":"FinanceAiSummaryController_link","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinanceCustomerLinkChoiceDto"}}}},"responses":{"204":{"description":""},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Link or unlink a QuickBooks customer","tags":["Finance AI Summary"]}},"/v1/finance/ai-summary/organizations":{"get":{"description":"Every organization that isn't archived, whatever the viewer's own organization access: the report covers them all.","operationId":"FinanceAiSummaryController_findOrganizations","parameters":[{"name":"search","required":false,"in":"query","description":"Matches the name or legal name; at most 255 characters.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FinanceOrganizationOptionDto"}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Search the organizations a QuickBooks customer can be linked to","tags":["Finance AI Summary"]}},"/v1/finance/ai-summary/organizations/{orgId}/generate":{"post":{"description":"Captures its Latest Updates, copies its aging from the newest report and generates its Follow-up afresh, then replaces the saved summary whole — unless a generation started later has already saved one, which is kept and returned. A failure leaves the previous one. Changes no other record, the report included.","operationId":"FinanceAiSummaryController_generateIndividual","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinanceIndividualSummaryViewDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Generate an organization's Individual Summary","tags":["Finance AI Summary"]}},"/v1/finance/ai-summary/organizations/{orgId}/export":{"get":{"description":"The saved summary as it is shown, in an editable Word document. Generates nothing and leaves its New labels as they are.","operationId":"FinanceAiSummaryController_exportIndividual","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Individual Summary (Word)","content":{"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Export an organization's Individual Summary as Word","tags":["Finance AI Summary"]}},"/v1/finance/ai-summary/organizations/{orgId}":{"get":{"description":"Generates nothing; `summary` is null until first generated.","operationId":"FinanceAiSummaryController_findIndividual","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinanceIndividualSummaryViewDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get an organization's saved Individual Summary","tags":["Finance AI Summary"]}},"/v1/finance/ai-summary/{summaryId}/export":{"get":{"description":"One sheet per part of the report, exactly as it was generated, plus one for the selected customer when `customerKey` names one. Generates nothing; audited.","operationId":"FinanceAiSummaryController_export","parameters":[{"name":"summaryId","required":true,"in":"path","schema":{"type":"string"}},{"name":"customerKey","required":false,"in":"query","description":"The customer selected in the report, by its `key`: the export then names it and adds a sheet of its aging and Follow-up.","schema":{"type":"string"}}],"responses":{"200":{"description":"Accounts Receivable Report (Excel)","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Export one stored Accounts Receivable Report as Excel","tags":["Finance AI Summary"]}},"/v1/finance/ai-summary/{summaryId}":{"get":{"operationId":"FinanceAiSummaryController_findOne","parameters":[{"name":"summaryId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinanceAiSummaryViewDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]},{"cookie":[]}],"summary":"Get one stored Accounts Receivable Report","tags":["Finance AI Summary"]}},"/v1/notes/mentionable-users":{"get":{"description":"Active admins other than the caller who can open a note of this owner, by name. 404 for an organization the caller cannot open.","operationId":"MentionableUsersController_findMany","parameters":[{"name":"owner","required":true,"in":"query","description":"What the note hangs off.","schema":{"$ref":"#/components/schemas/NotificationNoteOwner"}},{"name":"orgId","required":false,"in":"query","description":"The organization the note belongs to: required for an `aup_vouching`, `org_product` or `organization` note, not accepted for a `prospect` one.","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserSummaryEntity"}}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"List the admins a note can mention","tags":["Note Mentions"]}},"/v1/gmail-client-choices/{id}":{"get":{"operationId":"GmailClientChoicesController_find","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmailClientChoiceDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Get an email that needs a client, with the clients to choose from","tags":["Gmail Client Choices"]}},"/v1/gmail-client-choices/{id}/file":{"post":{"operationId":"GmailClientChoicesController_file","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileGmailClientChoiceDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmailClientChoiceResolutionDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Import the email from Gmail into the chosen client","tags":["Gmail Client Choices"]}},"/v1/gmail-client-choices/{id}/leave":{"post":{"operationId":"GmailClientChoicesController_leave","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmailClientChoiceResolutionDto"}}}},"403":{"description":"Internal admin access required","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Internal admin access required"},"statusCode":{"type":"number","example":403}}}}}}},"security":[{"cookie":[]}],"summary":"Leave the email in Gmail and close the choice","tags":["Gmail Client Choices"]}},"/auth/admin/sign-in/social":{"post":{"tags":["Auth"],"description":"Sign in with a social provider","operationId":"adminSocialSignIn","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"callbackURL":{"type":"string","description":"Callback URL to redirect to after the user has signed in"},"newUserCallbackURL":{"type":"string"},"errorCallbackURL":{"type":"string","description":"Callback URL to redirect to if an error happens"},"provider":{"anyOf":[{"type":"string","enum":["apple","atlassian","cloudflare","cognito","discord","facebook","figma","github","microsoft","google","huggingface","slack","spotify","twitch","twitter","dropbox","kick","linear","linkedin","gitlab","tiktok","reddit","roblox","salesforce","vk","zoom","notion","kakao","naver","line","paybin","paypal","polar","railway","vercel","wechat"]},{"type":"string"}]},"disableRedirect":{"type":"boolean","description":"Disable automatic redirection to the provider. Useful for handling the redirection yourself"},"idToken":{"type":"object","properties":{"token":{"type":"string","description":"ID token from the provider"},"nonce":{"type":"string","description":"Nonce used to generate the token"},"accessToken":{"type":"string","description":"Access token from the provider"},"refreshToken":{"type":"string","description":"Refresh token from the provider"},"expiresAt":{"type":"number","description":"Expiry date of the token"},"user":{"type":"object","properties":{"name":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"}}},"email":{"type":"string"}},"description":"The user object from the provider. Only available for some providers like Apple."}},"required":["token"]},"scopes":{"type":"array","items":{"type":"string"},"description":"Array of scopes to request from the provider. This will override the default scopes passed."},"requestSignUp":{"type":"boolean","description":"Explicitly request sign-up. Useful when disableImplicitSignUp is true for this provider"},"loginHint":{"type":"string","description":"The login hint to use for the authorization code request"},"additionalParams":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Extra query parameters to append to the provider authorization URL (e.g. Cognito identity_provider, Google hd)."},"additionalData":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["provider"]}}}},"responses":{"200":{"description":"Success - Returns session details (idToken branch) or an authorize URL (redirect branch)","content":{"application/json":{"schema":{"type":"object","description":"Returns session details when idToken is provided, or an authorize URL otherwise","properties":{"token":{"type":"string"},"user":{"type":"object","$ref":"#/components/schemas/User"},"url":{"type":"string"},"redirect":{"type":"boolean"}},"required":["redirect"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/admin/get-session":{"get":{"tags":["Auth"],"description":"Get the current session","operationId":"adminGetSession","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":["object","null"],"properties":{"session":{"$ref":"#/components/schemas/Session"},"user":{"$ref":"#/components/schemas/User"}},"required":["session","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/admin/sign-out":{"post":{"tags":["Auth"],"description":"Sign out the current user","operationId":"adminSignOut","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"callbackURL":{"type":"string","description":"The URL to redirect to after provider logout"},"disableRedirect":{"type":"boolean","description":"Return the provider logout URL without redirecting"},"state":{"type":"string","description":"State to pass to the provider logout endpoint"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"url":{"type":"string","description":"Provider logout URL when RP-initiated logout is available"},"redirect":{"type":"boolean","description":"Whether the client should redirect to the provider logout URL"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/client/get-session":{"get":{"tags":["Auth"],"description":"Get the current session","operationId":"clientGetSession","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":["object","null"],"properties":{"session":{"$ref":"#/components/schemas/Session"},"user":{"$ref":"#/components/schemas/User"}},"required":["session","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/client/sign-out":{"post":{"tags":["Auth"],"description":"Sign out the current user","operationId":"clientSignOut","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"callbackURL":{"type":"string","description":"The URL to redirect to after provider logout"},"disableRedirect":{"type":"boolean","description":"Return the provider logout URL without redirecting"},"state":{"type":"string","description":"State to pass to the provider logout endpoint"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"url":{"type":"string","description":"Provider logout URL when RP-initiated logout is available"},"redirect":{"type":"boolean","description":"Whether the client should redirect to the provider logout URL"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/client/sign-in/email":{"post":{"tags":["Auth"],"description":"Sign in with email and password","operationId":"clientSignInEmail","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the user"},"password":{"type":"string","description":"Password of the user"},"callbackURL":{"type":"string","description":"Callback URL to use as a redirect for email verification"},"rememberMe":{"type":"boolean","description":"If this is false, the session will not be remembered. Default is `true`."}},"required":["email","password"]}}}},"responses":{"200":{"description":"Success - Returns either session details or redirect URL","content":{"application/json":{"schema":{"type":"object","description":"Session response when idToken is provided","properties":{"redirect":{"type":"boolean","enum":[false]},"token":{"type":"string","description":"Session token"},"url":{"type":["string","null"]},"user":{"type":"object","$ref":"#/components/schemas/User"}},"required":["redirect","token","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/client/reset-password":{"post":{"tags":["Auth"],"description":"Reset the password for a user","operationId":"clientResetPassword","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newPassword":{"type":"string","description":"The new password to set"},"token":{"type":"string","description":"The token to reset the password"}},"required":["newPassword"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/client/request-password-reset":{"post":{"tags":["Auth"],"description":"Send a password reset email to the user","operationId":"clientRequestPasswordReset","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"The email address of the user to send a password reset email to"},"redirectTo":{"type":"string","description":"The URL to redirect the user to reset their password. If the token isn't valid or expired, it'll be redirected with a query parameter `?error=INVALID_TOKEN`. If the token is valid, it'll be redirected with a query parameter `?token=VALID_TOKEN"}},"required":["email"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/client/reset-password/{token}":{"get":{"tags":["Auth"],"description":"Redirects the user to the callback URL with the token","operationId":"clientResetPasswordCallback","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"path","required":true,"description":"The token to reset the password","schema":{"type":"string"}},{"name":"callbackURL","in":"query","required":true,"description":"The URL to redirect the user to reset their password","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/client/two-factor/get-totp-uri":{"post":{"tags":["Auth"],"description":"Use this endpoint to get the TOTP URI","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"User password"}},"required":["password"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"totpURI":{"type":"string"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/client/two-factor/verify-totp":{"post":{"tags":["Auth"],"description":"Verify two factor TOTP","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The otp code to verify. Eg: \"012345\""},"trustDevice":{"type":"boolean","description":"If true, the device will be trusted for 30 days. It'll be refreshed on every sign in request within this time. Eg: true"}},"required":["code"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/client/two-factor/send-otp":{"post":{"tags":["Auth"],"description":"Send two factor OTP to the user","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"trustDevice":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/client/two-factor/verify-otp":{"post":{"tags":["Auth"],"description":"Verify two factor OTP","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The otp code to verify. Eg: \"012345\""},"trustDevice":{"type":"boolean"}},"required":["code"]}}}},"responses":{"200":{"description":"Two-factor OTP verified successfully","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Session token for the authenticated session"},"user":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the user"},"email":{"type":["string","null"],"format":"email","description":"User's email address"},"emailVerified":{"type":["boolean","null"],"description":"Whether the email is verified"},"name":{"type":["string","null"],"description":"User's name"},"image":{"type":["string","null"],"format":"uri","description":"User's profile image URL"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the user was created"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the user was last updated"}},"required":["id","createdAt","updatedAt"],"description":"The authenticated user object"}},"required":["token","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}}},"info":{"title":"deca-base-api","description":"All paths are served under the `/api` prefix","version":"1.0.0","contact":{}},"tags":[{"name":"Auth","description":"Authentication endpoints for Admin and Client portals"}],"servers":[],"components":{"securitySchemes":{"admin-auth":{"type":"apiKey","in":"cookie","name":"admin.session_token"},"client-auth":{"type":"apiKey","in":"cookie","name":"client.session_token"}},"schemas":{"HealthResponseDto":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]},"UserType":{"type":"string","enum":["super_admin","admin","client","cpa_external"]},"UserSummaryEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"image":{"type":["string","null"]}},"required":["id","name","email","image"]},"ProfileOrganizationEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string"},"entityType":{"type":"string","enum":["business","individual"]},"notificationsEnabled":{"type":"boolean"},"assignedAdmin":{"anyOf":[{"$ref":"#/components/schemas/UserSummaryEntity"},{"type":"null"}]}},"required":["id","name","domain","entityType","notificationsEnabled","assignedAdmin"]},"UserPermissionsResponseDto":{"type":"object","properties":{"permissions":{"type":"array","description":"Permissions","example":["preview_financials","edit_entity_profile"],"items":{"type":"string","enum":["preview_financials","edit_products","edit_financials","edit_entity_profile","edit_aup","preview_all_organizations","manage_org_notifications","manage_entity_profile","manage_org_users","view_product_list","manage_products","view_logs","head_of_analytics","add_edit_organizations","delete_organizations","archive_organizations","manage_org_products","manage_org_emails","manage_org_agreements","add_edit_users","delete_users","manage_permission_templates","reset_user_two_factor","view_prospects","add_edit_prospects","archive_prospects","delete_prospects","manage_prospect_emails","tax_complexity","prospect_approval","bypass_prospect_flow","manage_prospect_meetings","finance","delete_payment_methods","manage_nicknames","manage_meeting_notes","manage_announcements"]}},"userId":{"type":"string","format":"uuid","description":"User ID","example":"123e4567-e89b-12d3-a456-426614174000"},"userType":{"type":"string","enum":["super_admin","admin","client","cpa_external"],"description":"User type","example":"client"}},"required":["permissions","userId","userType"]},"AbilityRuleDto":{"type":"object","properties":{"action":{"type":"array","description":"The action(s) that can be performed","example":["read"],"items":{"type":"string","enum":["create","read","list","update","delete","archive","manage"]}},"subject":{"type":"string","enum":["Organization","OrganizationDocument","Product","OrgProduct","OrgUser","OrgResponsibleUser","OrgContact","OrgAgreement","CustomerProduct","FinancialLedger","ServiceFinance","OrganizationLabel","ExpensePaymentMethod","User","Profile","PermissionTemplate","Logs","Analytics","Notification","EntityProfile","TwoFactor","Prospect","ProspectApproval","ProspectBypass","ProspectEmail","OrgEmail","Nickname","MeetingNote","ProspectMeeting","GoogleWorkspaceConnection","Aup","AupSampleSelection","AupEngagementLetter","AupCertificate","Announcement","all"],"description":"The subject/resource type","example":"Product"},"conditions":{"type":"object","additionalProperties":true,"description":"Optional conditions for the rule","example":{"id":"123e4567-e89b-12d3-a456-426614174000"}}},"required":["action","subject"]},"UserAbilitiesResponseDto":{"type":"object","properties":{"permissions":{"description":"Raw permissions assigned to the user","allOf":[{"$ref":"#/components/schemas/UserPermissionsResponseDto"}]},"rules":{"description":"CASL ability rules mapped from permissions","example":[{"action":"read","subject":"Product"},{"action":"update","subject":"User","conditions":{"id":"123e4567-e89b-12d3-a456-426614174000"}}],"type":"array","items":{"$ref":"#/components/schemas/AbilityRuleDto"}}},"required":["permissions","rules"]},"PendingEmailChangeEntity":{"type":"object","properties":{"newEmail":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"}},"required":["newEmail","expiresAt"]},"PendingPhoneChangeEntity":{"type":"object","properties":{"newPhoneNumber":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"}},"required":["newPhoneNumber","expiresAt"]},"ThemePreference":{"type":"string","enum":["light","dark","system"],"description":"The theme the user picked; null until they pick one, which shows Light."},"OnboardingTourStatus":{"type":"string","enum":["completed","skipped"],"description":"How the client portal tour ended for the current user."},"ProfileEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"image":{"type":["string","null"]},"phoneNumber":{"type":["string","null"]},"userType":{"allOf":[{"$ref":"#/components/schemas/UserType"}]},"activeOrgId":{"type":["string","null"]},"organizations":{"description":"Ordered by name, ignoring case, with numbers compared by value.","type":"array","items":{"$ref":"#/components/schemas/ProfileOrganizationEntity"}},"abilities":{"$ref":"#/components/schemas/UserAbilitiesResponseDto"},"pendingEmailChange":{"anyOf":[{"$ref":"#/components/schemas/PendingEmailChangeEntity"},{"type":"null"}]},"pendingPhoneChange":{"anyOf":[{"$ref":"#/components/schemas/PendingPhoneChangeEntity"},{"type":"null"}]},"isPricingSheetApprover":{"type":"boolean"},"twoFactorEnabled":{"type":"boolean","description":"Two-factor authentication is on; the phone then changes only through the phone change flow."},"themePreference":{"description":"The theme the user picked; null until they pick one, which shows Light.","anyOf":[{"$ref":"#/components/schemas/ThemePreference"},{"type":"null"}]},"onboardingTourStatus":{"description":"How the client portal tour ended for the current user.","anyOf":[{"$ref":"#/components/schemas/OnboardingTourStatus"},{"type":"null"}]}},"required":["id","name","email","image","phoneNumber","userType","activeOrgId","organizations","abilities","pendingEmailChange","pendingPhoneChange","isPricingSheetApprover","twoFactorEnabled","themePreference","onboardingTourStatus"]},"UpdateProfileDto":{"type":"object","properties":{"name":{"type":"string","description":"User display name","example":"John Doe"},"phoneNumber":{"type":["string","null"],"description":"Phone number in international format. On the admin portal null removes the contact number; on the client portal an empty value means no change.","example":"+17871234567"}}},"UpdateThemePreferenceDto":{"type":"object","properties":{"themePreference":{"allOf":[{"$ref":"#/components/schemas/ThemePreference"}]}},"required":["themePreference"]},"UpdateOnboardingTourDto":{"type":"object","properties":{"status":{"description":"How the client portal tour ended for the current user.","allOf":[{"$ref":"#/components/schemas/OnboardingTourStatus"}]}},"required":["status"]},"RequestEmailChangeDto":{"type":"object","properties":{"newEmail":{"type":"string","format":"email"}},"required":["newEmail"]},"ConfirmEmailChangeDto":{"type":"object","properties":{"code":{"type":"string","description":"6-digit verification code sent to your current email address."}},"required":["code"]},"RequestPhoneChangeDto":{"type":"object","properties":{"newPhoneNumber":{"type":"string","description":"New phone number in international format","example":"+17871234567"},"password":{"type":"string","description":"Current account password"}},"required":["newPhoneNumber","password"]},"ConfirmPhoneChangeDto":{"type":"object","properties":{"code":{"type":"string","description":"6-digit verification code sent by SMS to the new number."}},"required":["code"]},"PaginationMetaDto":{"type":"object","properties":{"page":{"type":"number","example":0},"size":{"type":"number","example":10},"total":{"type":"number","example":100},"totalPages":{"type":"number","example":10}},"required":["page","size","total","totalPages"]},"ProductPeriodicity":{"type":"string","enum":["monthly","quarterly","yearly","every_n_years"]},"LogDocumentChange":{"type":"string","enum":["added","removed"],"description":"Whether the logged action added or removed the file; unset when the entry lists files without changing a set."},"DocumentInfoDto":{"type":"object","properties":{"filename":{"type":"string"},"size":{"type":"number"},"url":{"type":"string"},"fileId":{"type":"string"},"change":{"description":"Whether the logged action added or removed the file; unset when the entry lists files without changing a set.","allOf":[{"$ref":"#/components/schemas/LogDocumentChange"}]}},"required":["filename"]},"EmailParticipantKind":{"type":"string","enum":["client","external","team"]},"EmailParticipantInfoDto":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":["string","null"]},"kind":{"allOf":[{"$ref":"#/components/schemas/EmailParticipantKind"}]}},"required":["email","name","kind"]},"OrgResponsibilityRole":{"type":"string","enum":["primary_kam","secondary_kam","data_specialist","incentives_advisor","financial_advisor","tax_advisor"]},"SystemLogMetadataDto":{"type":"object","properties":{"orgName":{"type":"string"},"submissionId":{"type":"string"},"billingLineId":{"type":"string"},"foldedLineId":{"type":"string"},"splitLineId":{"type":"string"},"organizationCount":{"type":"number"},"uploadId":{"type":"string"},"productId":{"type":"string"},"productName":{"type":"string"},"year":{"type":["number","null"]},"periodicity":{"anyOf":[{"$ref":"#/components/schemas/ProductPeriodicity"},{"type":"null"}]},"periodValue":{"type":["number","null"]},"userIds":{"type":"array","items":{"type":"string"}},"isAdmin":{"type":"boolean"},"organizationIds":{"type":"array","items":{"type":"string"}},"previousKamId":{"type":["string","null"]},"newKamId":{"type":"string"},"isReUpload":{"type":"boolean"},"appendSkipped":{"type":"boolean"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/DocumentInfoDto"}},"documentDescription":{"type":"string"},"to":{"type":"string"},"cc":{"type":"string"},"subject":{"type":"string"},"messageId":{"type":"string"},"threadKey":{"type":"string"},"participantEmail":{"type":"string"},"prospectId":{"type":"string"},"participants":{"type":"array","items":{"$ref":"#/components/schemas/EmailParticipantInfoDto"}},"messageCount":{"type":"number"},"firstMessageAt":{"type":"string"},"lastMessageAt":{"type":"string"},"deliveredAt":{"type":"string"},"bounceType":{"type":"string"},"bounceName":{"type":"string"},"bounceDescription":{"type":"string"},"bouncedAt":{"type":"string"},"userType":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}},"templateCleared":{"type":"boolean"},"questionnaireId":{"type":"string"},"documentsRequestId":{"type":"string"},"pricingSheetId":{"type":"string"},"pricingFormAnswersId":{"type":"string"},"magicLinkId":{"type":"string"},"oldEmail":{"type":"string"},"newEmail":{"type":"string"},"emailChangeMethod":{"type":"string","enum":["code","link"]},"emailChangeRequestedById":{"type":"string"},"meetingStartAt":{"type":"string"},"meetingSource":{"type":"string"},"meetingCreationMethod":{"type":"string","enum":["admin_scheduled","booking_link"]},"meetingCancelReason":{"type":"string"},"prospectPhase":{"type":"string","enum":["phase_1","phase_2","phase_3","phase_4","phase_5"]},"calendarProviderAccountId":{"type":"string"},"calendarEventId":{"type":"string"},"calendarICalUid":{"type":"string"},"reminderId":{"type":"string"},"reminderType":{"type":"string"},"reminderScheduledFor":{"type":"string"},"reminderCancelReason":{"type":"string"},"reminderCount":{"type":"number"},"manualReminderTemplate":{"type":"string"},"signableDocumentId":{"type":"string"},"signableDocumentType":{"type":"string","enum":["mnda","agreement","engagement_letter","org_agreement"]},"aupSectionNames":{"type":"array","items":{"type":"string"}},"recipients":{"type":"array","items":{"type":"string"}},"minutes":{"type":"number"},"workDescription":{"type":["string","null"]},"workDate":{"type":"string","format":"date"},"amount":{"type":"number"},"expenseDate":{"type":"string","format":"date"},"expenseDescription":{"type":"string"},"loggedByName":{"type":["string","null"]},"loggedAt":{"type":"string"},"responsibilityRole":{"allOf":[{"$ref":"#/components/schemas/OrgResponsibilityRole"}]},"responsibleUserId":{"type":"string"},"previousResponsibleUserId":{"type":["string","null"]},"nicknameId":{"type":"string"},"previousNicknameId":{"type":["string","null"]},"suggestionId":{"type":"string"}}},"ProductType":{"type":"string","enum":["rnd_tax_credit","rnd_tax_credit_amendment","act_60","act_60_amendment","certificate_of_organization","articles_of_incorporation","ein_letter","operating_agreement_bylaws","department_of_state_registrations","treasury_suri_registration","child_support_registration","crim_registration","state_insurance_fund_registration","labor_human_resources_registration","incentives_portal_registration","merchants_registration_certificate","single_permit_application","provisional_municipal_license_tax","local_pr_bank_account","manufacturers_id","non_withholding_waiver","municipal_decree","sales_use_tax","professional_services_rendered","volume_of_business","incentive_income_tax_return","informative_returns","personal_property_tax","annual_report","exempt_annual_report","federal_income_tax_return","irs_form_8898","income_tax_return","state_income_tax_return","filing_extension","tourism_tax_credit","financing","federal_grant","eif_grant","me_grant","other_grant","ad_hoc_foundational_services","ad_hoc_incentives","ad_hoc_tax_compliance","ad_hoc_tax_credits","ad_hoc_financing","ad_hoc_local_grants","ad_hoc_federal_grants","custom"]},"Act60AmendmentType":{"type":"string","enum":["approved_with_act60","non_approved_with_act60","approved_external","non_approved_external"]},"ProductSubmissionPart":{"type":"string","enum":["general","financial","aup"]},"SystemLogFormTargetDto":{"type":"object","properties":{"orgProductId":{"type":"string"},"productType":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"amendmentType":{"anyOf":[{"$ref":"#/components/schemas/Act60AmendmentType"},{"type":"null"}]},"part":{"anyOf":[{"$ref":"#/components/schemas/ProductSubmissionPart"},{"type":"null"}]}},"required":["orgProductId","productType","amendmentType","part"]},"SystemLogEntity":{"type":"object","properties":{"id":{"type":"string"},"actorType":{"type":"string","enum":["admin","customer","system"]},"actorId":{"type":["string","null"]},"actorName":{"type":"string"},"actorImage":{"type":["string","null"]},"actionType":{"type":"string","enum":["organization_created","organization_deleted","organization_archived","organization_unarchived","organization_status_changed","business_profile_created","business_profile_updated","individual_profile_created","individual_profile_updated","product_assigned","product_unassigned","product_admin_assigned","product_admin_unassigned","product_ddec_responsible_changed","product_status_changed","product_time_logged","product_time_log_updated","product_time_log_deleted","product_hourly_rate_changed","product_expense_logged","product_expense_updated","product_expense_deleted","product_expense_attachment_added","product_expense_attachment_removed","product_tax_credit_figures_updated","product_renamed","product_note_created","product_note_updated","product_note_deleted","product_note_reply_created","product_note_reply_updated","product_note_reply_deleted","product_reviewed","product_created","product_updated","product_deleted","product_archived","product_unarchived","product_start_date_changed","product_deadline_changed","product_questionnaire_updated","document_uploaded","document_deleted","report_generated","report_approved_by_government","org_contact_added","org_contact_updated","org_contact_removed","user_created","user_deleted","user_reinvited","user_suspended","user_reactivated","user_assigned_kam","user_unassigned_kam","user_assigned_to_organization","user_removed_from_organization","user_notifications_toggled","user_type_changed","user_two_factor_reset","personal_expense_added","personal_expense_updated","personal_expense_deleted","personal_expense_attachment_added","personal_expense_attachment_removed","personal_expense_reimbursement_updated","expense_payment_method_created","expense_payment_method_removed","permission_assigned","permission_created","permission_updated","permission_deleted","email_sent","email_delivered","email_bounced","email_spam_reported","password_change_requested","email_change_requested","email_change_confirmed","email_change_cancelled","phone_change_requested","phone_change_confirmed","phone_change_cancelled","client_info_added","client_info_updated","client_info_deleted","act60_business_summary_submitted","act60_business_summary_updated","act60_individual_summary_submitted","act60_individual_summary_updated","act60_decree_type_selected","act60_manufacturing_submitted","act60_manufacturing_updated","act60_manufacturing_documents_uploaded","act60_manufacturing_documents_sent_for_review","act60_manufacturing_documents_cleared","act60_manufacturing_documents_applicability_updated","act60_manufacturing_documents_slot_status_updated","act60_export_submitted","act60_export_updated","act60_export_documents_uploaded","act60_export_documents_sent_for_review","act60_export_documents_cleared","act60_export_documents_applicability_updated","act60_export_documents_slot_status_updated","act60_tourism_submitted","act60_tourism_updated","act60_tourism_documents_uploaded","act60_tourism_documents_sent_for_review","act60_tourism_documents_cleared","act60_tourism_documents_applicability_updated","act60_tourism_documents_slot_status_updated","act60_hard_to_recruit_submitted","act60_hard_to_recruit_updated","act60_hard_to_recruit_documents_uploaded","act60_hard_to_recruit_documents_sent_for_review","act60_hard_to_recruit_documents_cleared","act60_hard_to_recruit_documents_applicability_updated","act60_hard_to_recruit_documents_slot_status_updated","act60_private_equity_submitted","act60_private_equity_updated","act60_private_equity_documents_uploaded","act60_private_equity_documents_sent_for_review","act60_private_equity_documents_cleared","act60_private_equity_documents_applicability_updated","act60_private_equity_documents_slot_status_updated","act60_young_entrepreneur_submitted","act60_young_entrepreneur_updated","act60_young_entrepreneur_documents_uploaded","act60_young_entrepreneur_documents_sent_for_review","act60_young_entrepreneur_documents_cleared","act60_young_entrepreneur_documents_applicability_updated","act60_young_entrepreneur_documents_slot_status_updated","act60_amendment_type_set","act60_amendment_upload_submitted","prospect_created","prospect_updated","prospect_deleted","prospect_archived","prospect_unarchived","prospect_not_moving_forward_set","prospect_not_moving_forward_reopened","prospect_converted","prospect_flow_bypassed","prospect_questionnaire_sent","prospect_questionnaire_submitted","prospect_questionnaire_updated","prospect_questionnaire_approved","prospect_questionnaire_config_updated","prospect_custom_questionnaire_created","prospect_custom_questionnaire_updated","prospect_custom_questionnaire_deleted","prospect_custom_questionnaire_sent","prospect_custom_questionnaire_submitted","prospect_documents_request_sent","prospect_documents_request_submitted","prospect_documents_request_completed","prospect_documents_request_clarification_flagged","prospect_documents_request_clarification_resolved","prospect_contact_added","prospect_contact_updated","prospect_contact_removed","prospect_reminder_scheduled","prospect_reminder_sent","prospect_reminder_canceled","prospect_manual_reminder_sent","prospect_workflow_transition","prospect_meeting_scheduled","prospect_meeting_canceled","prospect_booking_link_created","prospect_booking_link_consumed","prospect_booking_link_revoked","google_workspace_connected","google_workspace_revoked","gmail_connected","gmail_disconnected","calendar_event_created","calendar_event_updated","calendar_event_canceled","calendar_event_org_linked","calendar_event_org_unlinked","prospect_agreement_status_set","prospect_note_created","prospect_note_updated","prospect_note_deleted","prospect_document_review_requested","prospect_document_note_created","prospect_document_note_updated","prospect_document_note_deleted","prospect_document_note_reply_created","prospect_document_note_reply_updated","prospect_document_note_reply_deleted","prospect_meeting_note_created","prospect_meeting_note_updated","prospect_meeting_note_deleted","prospect_notes_summary_generated","prospect_meeting_notes_summary_generated","prospect_ai_summary_generated","organization_ai_summary_generated","prospect_pricing_sheet_created","prospect_pricing_sheet_updated","prospect_pricing_sheet_tax_notification_sent","prospect_pricing_sheet_tax_notification_requested","prospect_pricing_sheet_approved","prospect_pricing_sheet_declined","prospect_pricing_sheet_marked_completed","prospect_pricing_sheet_preparation_started","prospect_pricing_form_sent","prospect_pricing_form_submitted","prospect_mnda_created","prospect_mnda_uploaded","prospect_mnda_sender_view_completed","prospect_mnda_recipients_updated","prospect_mnda_sent","prospect_mnda_viewed","prospect_mnda_signed","prospect_mnda_declined","prospect_mnda_cancelled","prospect_email_sent","prospect_emails_transferred","organization_email_sent","email_participant_added","email_participant_removed","email_thread_shared","email_thread_deleted","prospect_agreement_created","prospect_agreement_sender_view_completed","prospect_agreement_recipients_updated","prospect_agreement_sent","prospect_agreement_viewed","prospect_agreement_signed","prospect_agreement_declined","prospect_agreement_cancelled","prospect_agreement_deleted","aup_financial_model_step_updated","aup_required_documents_updated","aup_required_documents_submitted","aup_required_documents_approved","aup_required_documents_docs_requested","aup_sample_selection_uploaded","aup_sample_selection_deleted","aup_addendum_a_category_updated","aup_vouching_transaction_created","aup_vouching_transaction_updated","aup_vouching_transaction_deleted","aup_vouching_transaction_status_set","aup_vouching_transaction_approval_set","aup_vouching_transaction_misstatement_set","aup_vouching_document_linked","aup_vouching_document_unlinked","aup_vouching_document_moved","aup_vouching_document_type_set","aup_vouching_document_renamed","aup_vouching_document_replaced","aup_vouching_document_deleted","aup_vouching_document_highlight_created","aup_vouching_document_highlight_deleted","aup_vouching_sent_to_review","aup_engagement_letter_upload_requested","aup_engagement_letter_uploaded","aup_engagement_letter_sender_view_completed","aup_engagement_letter_recipients_updated","aup_engagement_letter_sent","aup_engagement_letter_resent","aup_engagement_letter_viewed","aup_engagement_letter_signed","aup_engagement_letter_declined","aup_engagement_letter_voided","aup_certificate_cpa_notified","aup_certificate_uploaded","aup_certificate_reviewed","aup_certificate_removed","organization_document_uploaded","organization_document_replaced","organization_document_renamed","organization_document_deleted","organization_document_expiry_updated","organization_document_edited","organization_task_created","organization_task_updated","organization_task_completed","organization_task_reopened","organization_task_deleted","organization_task_lead_assigned","organization_task_attachment_added","organization_task_attachment_removed","organization_task_attachment_description_updated","org_responsible_user_assigned","org_responsible_user_removed","finance_billing_notification_skipped","finance_billing_status_changed","finance_billing_amounts_changed","finance_billing_payment_date_changed","finance_billing_deferral_note_changed","finance_billing_line_split","finance_success_fee_changed","finance_follow_up_sent","finance_ai_summary_generated","finance_ai_summary_exported","finance_ar_upload_published","finance_qb_customer_linked","finance_individual_summary_generated","finance_individual_summary_exported","organization_label_changed","organization_label_created","organization_note_created","organization_note_updated","organization_note_deleted","organization_note_reply_created","organization_note_reply_updated","organization_note_reply_deleted","organization_agreement_created","organization_agreement_reviewed","organization_agreement_sent","organization_agreement_follow_up_sent","organization_agreement_viewed","organization_agreement_signed","organization_agreement_marked_signed","organization_agreement_declined","organization_agreement_revoked","organization_agreement_deleted","organization_agreement_transferred","organization_agreement_recipients_updated","organization_agreement_sender_view_completed","organization_agreement_expiration_notice_failed","organization_agreement_expiration_notice_skipped","nickname_created","nickname_updated","nickname_deleted","ddec_officer_created","ddec_officer_updated","nickname_meeting_note_created","nickname_meeting_note_retried","nickname_meeting_note_deleted","nickname_meeting_task_created","nickname_meeting_note_processed","nickname_meeting_note_processing_failed","nickname_meeting_suggestion_dismissed","nickname_meeting_suggestion_restored","nickname_meeting_created","nickname_meeting_nickname_changed","nickname_meeting_unlinked","meeting_agenda_generated","meeting_agenda_updated","meeting_agenda_deleted","meeting_agenda_exported","meeting_agenda_meeting_attached","announcement_sent","starfruit_hunt_config_updated","holiday_greeting_config_updated","clarity_snapshot_refreshed","organization_exported","prospect_exported"]},"description":{"type":"string"},"timestamp":{"format":"date-time","type":"string"},"entityType":{"type":["string","null"],"enum":["User","Organization","BusinessProfile","OrgProduct","Product","ProductSubmission","Report","PermissionTemplate","Act60BusinessSummary","Act60IndividualSummary","Act60Manufacturing","Act60Export","Act60Tourism","Act60HardToRecruit","Act60PrivateEquity","Act60YoungEntrepreneur","ProductDocument","IndividualProfile","Act60Amendment","Prospect","ProspectMeeting","ProspectBookingLink","GoogleWorkspaceConnection","CalendarEventLink","ProspectNote","ProspectDocumentSectionNote","ProspectNotesSummary","ProspectAiSummary","ProspectEmail","OrgEmail","EmailThread","Aup","OrganizationDocument","OrganizationTask","OrganizationAiSummary","FinanceAiSummary","FinanceArUpload","FinanceQbCustomerLink","FinanceIndividualSummary","Nickname","NicknameMeeting","NicknameMeetingNote","MeetingAgenda","OrganizationLabel","ExpensePaymentMethod","OrganizationNote","OrgProductNote","Analytics","Announcement","DdecOfficer",null]},"entityId":{"type":["string","null"]},"organizationId":{"type":["string","null"]},"changes":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"oldValue":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]},{"type":"null"}]},"newValue":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]},{"type":"null"}]},"label":{"type":"string"}},"required":["label"]}},"metadata":{"anyOf":[{"$ref":"#/components/schemas/SystemLogMetadataDto"},{"type":"null"}]},"formTarget":{"anyOf":[{"$ref":"#/components/schemas/SystemLogFormTargetDto"},{"type":"null"}]}},"required":["id","actorType","actorId","actorName","actorImage","actionType","description","timestamp","entityType","entityId","organizationId","changes","metadata","formTarget"]},"SortOrder":{"type":"string","enum":["asc","desc"]},"Permission":{"type":"string","enum":["preview_financials","edit_products","edit_financials","edit_entity_profile","edit_aup","preview_all_organizations","manage_org_notifications","manage_entity_profile","manage_org_users","view_product_list","manage_products","view_logs","head_of_analytics","add_edit_organizations","delete_organizations","archive_organizations","manage_org_products","manage_org_emails","manage_org_agreements","add_edit_users","delete_users","manage_permission_templates","reset_user_two_factor","view_prospects","add_edit_prospects","archive_prospects","delete_prospects","manage_prospect_emails","tax_complexity","prospect_approval","bypass_prospect_flow","manage_prospect_meetings","finance","delete_payment_methods","manage_nicknames","manage_meeting_notes","manage_announcements"],"description":"Custom permissions to assign to user. Mutually exclusive with permissionTemplateId."},"CreateUserDto":{"type":"object","properties":{"permissionTemplateId":{"type":"string","description":"Permission template ID to assign to user. Mutually exclusive with permissions."},"permissions":{"type":"array","description":"Custom permissions to assign to user. Mutually exclusive with permissionTemplateId.","items":{"$ref":"#/components/schemas/Permission"}},"name":{"type":"string","example":"John Doe"},"email":{"type":"string","example":"john.doe@example.com"},"userType":{"type":"string","enum":["super_admin","admin","client","cpa_external"],"example":"client","description":"User type"},"organizationIds":{"type":"array","items":{"type":"string"}}},"required":["name","email","userType"]},"SettableUserState":{"type":"string","enum":["active","suspended"],"description":"`active` restores a suspended user; `suspended` suspends any other, invited users included."},"BulkUpdateUserStatusDto":{"type":"object","properties":{"userIds":{"maxItems":500,"description":"The users to act on, at most 500 per request: a larger selection is sent in turns. One the action does not apply to is skipped with a reason, never an error.","type":"array","items":{"type":"string"}},"state":{"description":"`active` restores a suspended user; `suspended` suspends any other, invited users included.","allOf":[{"$ref":"#/components/schemas/SettableUserState"}]}},"required":["userIds","state"]},"BulkUserSkipReason":{"type":"string","enum":["not_found","not_manageable","self","head_of_analytics","unchanged","not_invited","user_type_mismatch","not_grantable","invite_failed"]},"BulkUserSkipDto":{"type":"object","properties":{"reason":{"allOf":[{"$ref":"#/components/schemas/BulkUserSkipReason"}]}},"required":["reason"]},"BulkUserActionResultDto":{"type":"object","properties":{"updated":{"description":"The users the action changed","type":"array","items":{"type":"string"}},"skipped":{"type":"array","items":{"$ref":"#/components/schemas/BulkUserSkipDto"}}},"required":["updated","skipped"]},"BulkUserIdsDto":{"type":"object","properties":{"userIds":{"maxItems":500,"description":"The users to act on, at most 500 per request: a larger selection is sent in turns. One the action does not apply to is skipped with a reason, never an error.","type":"array","items":{"type":"string"}}},"required":["userIds"]},"PermissionTemplateSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"userType":{"allOf":[{"$ref":"#/components/schemas/UserType"}]},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/Permission"}}},"required":["id","name","userType","permissions"]},"UserState":{"type":"string","enum":["invited","active","suspended"]},"OrganizationRefDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"UserEntity":{"type":"object","properties":{"userType":{"allOf":[{"$ref":"#/components/schemas/UserType"}]},"permissionTemplateId":{"type":["string","null"]},"permissionTemplate":{"description":"Permission template assigned to user","anyOf":[{"$ref":"#/components/schemas/PermissionTemplateSummaryDto"},{"type":"null"}]},"permissions":{"type":["array","null"],"description":"Custom permissions for this user (overrides template)","items":{"$ref":"#/components/schemas/Permission"}},"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"emailVerified":{"type":"boolean"},"image":{"type":["string","null"]},"twoFactorEnabled":{"type":"boolean"},"state":{"allOf":[{"$ref":"#/components/schemas/UserState"}]},"hasCustomPermissions":{"type":"boolean","description":"Whether an own permission list replaces any template; never for a super admin"},"organizationIds":{"type":"array","items":{"type":"string"}},"organizations":{"description":"Organizations this user belongs to","type":"array","items":{"$ref":"#/components/schemas/OrganizationRefDto"}},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"canManage":{"type":"boolean","description":"Whether the caller may manage this user: edit, suspend, restore, delete, re-invite or reset their 2FA"}},"required":["userType","permissionTemplateId","permissionTemplate","permissions","id","name","email","emailVerified","image","twoFactorEnabled","state","hasCustomPermissions","organizationIds","organizations","createdAt","updatedAt","canManage"]},"UserPermissionKind":{"type":"string","enum":["custom","super_admin"]},"MatchingUserDto":{"type":"object","properties":{"id":{"type":"string"},"hasCustomPermissions":{"type":"boolean","description":"Whether an own permission list replaces any template; never for a super admin"}},"required":["id","hasCustomPermissions"]},"MatchingUsersDto":{"type":"object","properties":{"users":{"description":"Every user the filters match, in list order","type":"array","items":{"$ref":"#/components/schemas/MatchingUserDto"}}},"required":["users"]},"UpdateUserDto":{"type":"object","properties":{"permissionTemplateId":{"type":"string","description":"Permission template ID to assign to user. Mutually exclusive with permissions."},"permissions":{"type":"array","description":"Custom permissions to assign to user. Mutually exclusive with permissionTemplateId.","items":{"$ref":"#/components/schemas/Permission"}},"name":{"type":"string"},"userType":{"description":"User type. Changing to/from super_admin requires the caller to be a super_admin; changing to admin or client requires `permissionTemplateId` or `permissions`.","allOf":[{"$ref":"#/components/schemas/UserType"}]},"organizationIds":{"type":"array","items":{"type":"string"}},"addOrganizationIds":{"maxItems":50,"description":"Organizations to add the user to, keeping the current memberships; at most 50. Not with `organizationIds`.","type":"array","items":{"type":"string"}},"removeOrganizationIds":{"maxItems":50,"description":"Organizations to remove the user from, keeping the other memberships; at most 50. Not with `organizationIds`.","type":"array","items":{"type":"string"}}}},"UpdateUserStatusDto":{"type":"object","properties":{"state":{"description":"`active` restores a suspended user; `suspended` suspends any other, invited users included.","allOf":[{"$ref":"#/components/schemas/SettableUserState"}]}},"required":["state"]},"ToggleHeadOfAnalyticsDto":{"type":"object","properties":{"isHeadOfAnalytics":{"type":"boolean","description":"Whether the user should be a Head of Analytics","example":true}},"required":["isHeadOfAnalytics"]},"FileMetadataEntity":{"type":"object","properties":{"originalName":{"type":"string","description":"Original filename"},"contentType":{"type":"string","description":"MIME content type"},"fileSize":{"type":"number","description":"File size in bytes"},"customPath":{"type":["string","null"],"description":"Custom storage path"}},"required":["originalName","contentType","fileSize","customPath"]},"FileUploadResultEntity":{"type":"object","properties":{"storageKey":{"type":"string","description":"GCP storage key"},"url":{"type":"string","description":"URL to access the file"},"fileId":{"type":"string","description":"File ID for API access"},"metadata":{"description":"File metadata","allOf":[{"$ref":"#/components/schemas/FileMetadataEntity"}]}},"required":["storageKey","url","fileId","metadata"]},"AvailablePermissionsDto":{"type":"object","properties":{"permissions":{"type":"array","description":"Available permission enum values","items":{"type":"string","enum":["preview_financials","edit_products","edit_financials","edit_entity_profile","edit_aup","preview_all_organizations","manage_org_notifications","manage_entity_profile","manage_org_users","view_product_list","manage_products","view_logs","head_of_analytics","add_edit_organizations","delete_organizations","archive_organizations","manage_org_products","manage_org_emails","manage_org_agreements","add_edit_users","delete_users","manage_permission_templates","reset_user_two_factor","view_prospects","add_edit_prospects","archive_prospects","delete_prospects","manage_prospect_emails","tax_complexity","prospect_approval","bypass_prospect_flow","manage_prospect_meetings","finance","delete_payment_methods","manage_nicknames","manage_meeting_notes","manage_announcements"]}}},"required":["permissions"]},"CreatePermissionTemplateDto":{"type":"object","properties":{"name":{"type":"string","description":"Template name","example":"Product Viewer"},"userType":{"type":"string","enum":["admin","client"],"description":"User type this template applies to (admin or client)","example":"client"},"permissions":{"type":"array","description":"Permissions array","example":["preview_financials","edit_entity_profile"],"items":{"type":"string","enum":["preview_financials","edit_products","edit_financials","edit_entity_profile","edit_aup","preview_all_organizations","manage_org_notifications","manage_entity_profile","manage_org_users","view_product_list","manage_products","view_logs","head_of_analytics","add_edit_organizations","delete_organizations","archive_organizations","manage_org_products","manage_org_emails","manage_org_agreements","add_edit_users","delete_users","manage_permission_templates","reset_user_two_factor","view_prospects","add_edit_prospects","archive_prospects","delete_prospects","manage_prospect_emails","tax_complexity","prospect_approval","bypass_prospect_flow","manage_prospect_meetings","finance","delete_payment_methods","manage_nicknames","manage_meeting_notes","manage_announcements"]}}},"required":["name","userType"]},"PermissionTemplateEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"Template name"},"userType":{"type":"string","enum":["admin","client"]},"permissions":{"type":"array","description":"Permissions","items":{"type":"string","enum":["preview_financials","edit_products","edit_financials","edit_entity_profile","edit_aup","preview_all_organizations","manage_org_notifications","manage_entity_profile","manage_org_users","view_product_list","manage_products","view_logs","head_of_analytics","add_edit_organizations","delete_organizations","archive_organizations","manage_org_products","manage_org_emails","manage_org_agreements","add_edit_users","delete_users","manage_permission_templates","reset_user_two_factor","view_prospects","add_edit_prospects","archive_prospects","delete_prospects","manage_prospect_emails","tax_complexity","prospect_approval","bypass_prospect_flow","manage_prospect_meetings","finance","delete_payment_methods","manage_nicknames","manage_meeting_notes","manage_announcements"]}},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"userCount":{"type":"number","description":"Number of users following this template: assigned to it with no own permission list"}},"required":["id","name","userType","permissions","createdAt","updatedAt","createdBy","userCount"]},"PermissionTemplateSortField":{"type":"string","enum":["userType","createdAt"]},"UpdatePermissionTemplateDto":{"type":"object","properties":{"name":{"type":"string"},"permissions":{"type":"array","items":{"type":"string","enum":["preview_financials","edit_products","edit_financials","edit_entity_profile","edit_aup","preview_all_organizations","manage_org_notifications","manage_entity_profile","manage_org_users","view_product_list","manage_products","view_logs","head_of_analytics","add_edit_organizations","delete_organizations","archive_organizations","manage_org_products","manage_org_emails","manage_org_agreements","add_edit_users","delete_users","manage_permission_templates","reset_user_two_factor","view_prospects","add_edit_prospects","archive_prospects","delete_prospects","manage_prospect_emails","tax_complexity","prospect_approval","bypass_prospect_flow","manage_prospect_meetings","finance","delete_payment_methods","manage_nicknames","manage_meeting_notes","manage_announcements"]}}}},"SetCustomPermissionsDto":{"type":"object","properties":{"permissions":{"type":"array","description":"Permissions array","items":{"type":"string","enum":["preview_financials","edit_products","edit_financials","edit_entity_profile","edit_aup","preview_all_organizations","manage_org_notifications","manage_entity_profile","manage_org_users","view_product_list","manage_products","view_logs","head_of_analytics","add_edit_organizations","delete_organizations","archive_organizations","manage_org_products","manage_org_emails","manage_org_agreements","add_edit_users","delete_users","manage_permission_templates","reset_user_two_factor","view_prospects","add_edit_prospects","archive_prospects","delete_prospects","manage_prospect_emails","tax_complexity","prospect_approval","bypass_prospect_flow","manage_prospect_meetings","finance","delete_payment_methods","manage_nicknames","manage_meeting_notes","manage_announcements"]}}}},"UserPermissionEntity":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"permissions":{"type":"array","items":{"type":"string","enum":["preview_financials","edit_products","edit_financials","edit_entity_profile","edit_aup","preview_all_organizations","manage_org_notifications","manage_entity_profile","manage_org_users","view_product_list","manage_products","view_logs","head_of_analytics","add_edit_organizations","delete_organizations","archive_organizations","manage_org_products","manage_org_emails","manage_org_agreements","add_edit_users","delete_users","manage_permission_templates","reset_user_two_factor","view_prospects","add_edit_prospects","archive_prospects","delete_prospects","manage_prospect_emails","tax_complexity","prospect_approval","bypass_prospect_flow","manage_prospect_meetings","finance","delete_payment_methods","manage_nicknames","manage_meeting_notes","manage_announcements"]}},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","userId","permissions","createdAt","updatedAt"]},"VerifyEmailChangeLinkDto":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"token":{"type":"string","description":"Token from the link sent to the new email address."}},"required":["userId","token"]},"ConfirmEmailChangeLinkDto":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"token":{"type":"string","description":"Token from the link sent to the new email address."},"code":{"type":"string","description":"6-digit verification code sent to the current email."}},"required":["userId","token","code"]},"CancelEmailChangeLinkDto":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"token":{"type":"string"}},"required":["userId","token"]},"NotificationType":{"type":"string","enum":["note_mention","task_assigned","task_due_today","client_document_uploaded","org_assigned","service_assigned","email_reply_received","service_added","documents_uploaded","documents_requested","documents_approved","vouching_reply","vouching_thread_started","service_renewal_due","client_email_received","gmail_sync_stopped","prospect_document_review_requested","email_client_choice_needed","service_deadline_approaching","service_extended_date_approaching","service_deadline_missed"]},"NotificationStatusFilter":{"type":"string","enum":["all","unread"]},"NotificationDocumentTarget":{"type":"string","enum":["act60_documents","amendment_documents","rnd_document_set","rnd_ledgers","aup_required_documents","aup_vouching","document_product","library","final_report"]},"NotificationNoteOwner":{"type":"string","enum":["aup_vouching","org_product","organization","prospect"]},"NoteVisibility":{"type":"string","enum":["internal","client"]},"NotificationRefsDto":{"type":"object","properties":{"threadKey":{"type":["string","null"]},"documentTarget":{"anyOf":[{"$ref":"#/components/schemas/NotificationDocumentTarget"},{"type":"null"}]},"productType":{"anyOf":[{"$ref":"#/components/schemas/ProductType"},{"type":"null"}]},"amendmentType":{"anyOf":[{"$ref":"#/components/schemas/Act60AmendmentType"},{"type":"null"}]},"noteOwner":{"anyOf":[{"$ref":"#/components/schemas/NotificationNoteOwner"},{"type":"null"}]},"noteVisibility":{"anyOf":[{"$ref":"#/components/schemas/NoteVisibility"},{"type":"null"}]},"prospectId":{"type":["string","null"]},"transactionId":{"type":["string","null"]},"rootNoteId":{"type":["string","null"]},"documentSectionId":{"type":["string","null"]},"clientChoiceId":{"type":["string","null"],"description":"The Gmail client choice an \"email needs a client\" notification opens."}},"required":["threadKey","documentTarget","productType","amendmentType","noteOwner","noteVisibility","prospectId","transactionId","rootNoteId","documentSectionId","clientChoiceId"]},"NotificationSnapshotDto":{"type":"object","properties":{"actorName":{"type":["string","null"]},"orgName":{"type":["string","null"]},"prospectName":{"type":["string","null"]},"serviceName":{"type":["string","null"]},"partLabel":{"type":["string","null"]},"roleLabel":{"type":["string","null"]},"taskName":{"type":["string","null"]},"fileName":{"type":["string","null"]},"documentCount":{"type":["number","null"]},"isReplacement":{"type":["boolean","null"]},"emailSubject":{"type":["string","null"]},"fromName":{"type":["string","null"]},"fromEmail":{"type":["string","null"]},"categoryLabel":{"type":["string","null"]},"sectionCount":{"type":["number","null"]},"transactionCount":{"type":["number","null"]},"dueDate":{"type":["string","null"],"format":"date"},"extendedDate":{"type":["string","null"],"format":"date"},"isSubYearPeriod":{"type":["boolean","null"]},"isForClient":{"type":["boolean","null"]},"documentSectionName":{"type":["string","null"]}},"required":["actorName","orgName","prospectName","serviceName","partLabel","roleLabel","taskName","fileName","documentCount","isReplacement","emailSubject","fromName","fromEmail","categoryLabel","sectionCount","transactionCount","dueDate","extendedDate","isSubYearPeriod","isForClient","documentSectionName"]},"NotificationDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/NotificationType"}]},"createdAt":{"format":"date-time","type":"string"},"readAt":{"format":"date-time","type":["string","null"]},"isAvailable":{"type":"boolean","description":"False once the source was deleted or the viewer lost access to it; the snapshot is then withheld"},"orgId":{"type":["string","null"]},"orgProductId":{"type":["string","null"]},"entityIds":{"type":"array","items":{"type":"string"}},"refs":{"$ref":"#/components/schemas/NotificationRefsDto"},"snapshot":{"anyOf":[{"$ref":"#/components/schemas/NotificationSnapshotDto"},{"type":"null"}]}},"required":["id","type","createdAt","readAt","isAvailable","orgId","orgProductId","entityIds","refs","snapshot"]},"NotificationsResponseDto":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/NotificationDto"}}},"required":["meta","data"]},"NotificationCountsDto":{"type":"object","properties":{"unread":{"type":"number"},"total":{"type":"number"}},"required":["unread","total"]},"NotificationOrgCountDto":{"type":"object","properties":{"orgId":{"type":"string"},"count":{"type":"number"}},"required":["orgId","count"]},"NotificationSummaryDto":{"type":"object","properties":{"unread":{"type":"number","description":"Every unread notification; for client users, the total of `unreadByOrg`"},"unreadByOrg":{"description":"Client users only: unread notifications per organization they are still a member of and that is not archived. Empty for admins","type":"array","items":{"$ref":"#/components/schemas/NotificationOrgCountDto"}}},"required":["unread","unreadByOrg"]},"UpdateNotificationReadStateDto":{"type":"object","properties":{"isRead":{"type":"boolean"}},"required":["isRead"]},"MainSalesManagerEntity":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"isGoogleWorkspaceConnected":{"type":"boolean"}},"required":["id","name","email","isGoogleWorkspaceConnected"]},"SelectOrganizationDto":{"type":"object","properties":{"orgId":{"type":"string","description":"Organization ID to select"}},"required":["orgId"]},"SelectedOrganizationDto":{"type":"object","properties":{"orgId":{"type":"string"}},"required":["orgId"]},"EntityType":{"type":"string","enum":["business","individual"]},"OrganizationByProductDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"entityType":{"allOf":[{"$ref":"#/components/schemas/EntityType"}]}},"required":["id","name","entityType"]},"UpdateNotificationSettingDto":{"type":"object","properties":{"orgId":{"type":"string","description":"Organization ID to update the notification setting for"},"notificationsEnabled":{"type":"boolean"}},"required":["orgId","notificationsEnabled"]},"NotificationSettingDto":{"type":"object","properties":{"notificationsEnabled":{"type":"boolean"}},"required":["notificationsEnabled"]},"OrganizationTaskPriority":{"type":"string","enum":["low","medium","high","critical"]},"OrganizationTaskType":{"type":"string","enum":["internal","external"]},"OrganizationTaskStatus":{"type":"string","enum":["active","completed"]},"OrganizationTaskOrgEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"OrganizationTaskListItemEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"priority":{"allOf":[{"$ref":"#/components/schemas/OrganizationTaskPriority"}]},"type":{"allOf":[{"$ref":"#/components/schemas/OrganizationTaskType"}]},"status":{"allOf":[{"$ref":"#/components/schemas/OrganizationTaskStatus"}]},"dueDate":{"type":"string","example":"2026-08-03"},"org":{"$ref":"#/components/schemas/OrganizationTaskOrgEntity"},"taskLead":{"anyOf":[{"$ref":"#/components/schemas/UserSummaryEntity"},{"type":"null"}]},"createdAt":{"format":"date-time","type":"string"}},"required":["id","name","priority","type","status","dueDate","org","taskLead","createdAt"]},"OrganizationTasksSummaryDto":{"type":"object","properties":{"activeCount":{"type":"number"}},"required":["activeCount"]},"OrganizationTaskAttachmentEntity":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":["string","null"]},"documentId":{"type":["string","null"],"format":"uuid","description":"The library document the attachment references; null for a file uploaded to the task."},"url":{"type":["string","null"]},"originalName":{"type":["string","null"]},"fileSize":{"type":["number","null"]},"uploadedAt":{"format":"date-time","type":"string"}},"required":["id","description","documentId","url","originalName","fileSize","uploadedAt"]},"OrganizationTaskEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"priority":{"allOf":[{"$ref":"#/components/schemas/OrganizationTaskPriority"}]},"type":{"allOf":[{"$ref":"#/components/schemas/OrganizationTaskType"}]},"status":{"allOf":[{"$ref":"#/components/schemas/OrganizationTaskStatus"}]},"dueDate":{"type":"string","example":"2026-08-03"},"org":{"$ref":"#/components/schemas/OrganizationTaskOrgEntity"},"taskLead":{"anyOf":[{"$ref":"#/components/schemas/UserSummaryEntity"},{"type":"null"}]},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/UserSummaryEntity"},{"type":"null"}]},"completedBy":{"anyOf":[{"$ref":"#/components/schemas/UserSummaryEntity"},{"type":"null"}]},"completedAt":{"format":"date-time","type":["string","null"]},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationTaskAttachmentEntity"}},"createdAt":{"format":"date-time","type":"string"}},"required":["id","name","description","priority","type","status","dueDate","org","taskLead","createdBy","completedBy","completedAt","attachments","createdAt"]},"OrganizationTaskAttachmentInputDto":{"type":"object","properties":{"storageKey":{"type":"string","description":"Storage key returned by POST /files/upload, for a file uploaded to the task. Leave it out for a library document."},"documentId":{"type":"string","format":"uuid","description":"A document of the task organization's library, attached by reference: the task opens the document's own file and never copies it."},"description":{"type":"string"}}},"CreateOrganizationTaskDto":{"type":"object","properties":{"name":{"type":"string"},"orgId":{"type":"string"},"priority":{"allOf":[{"$ref":"#/components/schemas/OrganizationTaskPriority"}]},"type":{"allOf":[{"$ref":"#/components/schemas/OrganizationTaskType"}]},"dueDate":{"type":"string","example":"2026-08-03","description":"Today or later; a past date is rejected."},"taskLeadId":{"type":"string","description":"Required for external tasks. For internal tasks omit it or send the current user, who always leads them; any other value is rejected."},"description":{"type":["string","null"],"description":"Sanitised rich text. Send null to clear it."},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationTaskAttachmentInputDto"}}},"required":["name","orgId","priority","type","dueDate"]},"UpdateOrganizationTaskDto":{"type":"object","properties":{"name":{"type":"string"},"priority":{"allOf":[{"$ref":"#/components/schemas/OrganizationTaskPriority"}]},"type":{"description":"Switching to internal requires the caller to already be the task lead.","allOf":[{"$ref":"#/components/schemas/OrganizationTaskType"}]},"dueDate":{"type":"string","example":"2026-08-03","description":"Today or later; a past date is rejected."},"taskLeadId":{"type":"string","description":"An internal task keeps its lead frozen; reassigning requires switching the task to external in the same request."},"description":{"type":["string","null"],"description":"Sanitised rich text. Send null to clear it."}}},"AddOrganizationTaskAttachmentsDto":{"type":"object","properties":{"attachments":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationTaskAttachmentInputDto"}}},"required":["attachments"]},"UpdateOrganizationTaskAttachmentDto":{"type":"object","properties":{"description":{"type":["string","null"],"description":"Omit it to leave the description alone; send null or an empty string to clear it."}}},"ProductDepartment":{"type":"string","enum":["foundational_services","incentives","tax_compliance","tax_credits","financing","local_grants","federal_grants"]},"DocumentUploaderFilter":{"type":"string","enum":["admin","client","me"]},"OrganizationDocumentSortField":{"type":"string","enum":["name","uploadedAt"]},"DocumentSource":{"type":"string","enum":["product_document","org_product_section","rnd_aup_required_document","rnd_aup_certificate","act60_amendment_file","prospect_file","prospect_document_section","signable_document","generated_report","manual_upload"]},"OrganizationDocumentProductDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"department":{"allOf":[{"$ref":"#/components/schemas/ProductDepartment"}]}},"required":["id","name","department"]},"OrganizationDocumentUploaderDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"DocumentUploaderRole":{"type":"string","enum":["admin","client"],"description":"admin for DECA, signed and generated documents included; client for a client user or the prospect before conversion. Null when the uploader is unknown."},"OrganizationDocumentDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"originalName":{"type":["string","null"]},"storageKey":{"type":["string","null"],"description":"The file it holds, as the product forms list it. Null for a generated report."},"source":{"allOf":[{"$ref":"#/components/schemas/DocumentSource"}]},"departments":{"type":"array","description":"Empty for a document that sits on no product, which the library files under Other.","items":{"$ref":"#/components/schemas/ProductDepartment"}},"linkedProducts":{"description":"Every product the document is linked to. More than one means the same file is attached in several places.","type":"array","items":{"$ref":"#/components/schemas/OrganizationDocumentProductDto"}},"uploadedBy":{"anyOf":[{"$ref":"#/components/schemas/OrganizationDocumentUploaderDto"},{"type":"null"}]},"uploaderRole":{"description":"admin for DECA, signed and generated documents included; client for a client user or the prospect before conversion. Null when the uploader is unknown.","anyOf":[{"$ref":"#/components/schemas/DocumentUploaderRole"},{"type":"null"}]},"uploadedAt":{"format":"date-time","type":"string"},"expiresAt":{"format":"date-time","type":["string","null"]},"isExpiryOverridden":{"type":"boolean"},"canEdit":{"type":"boolean","description":"For an admin, every document but an executed agreement or a generated report can be renamed and relinked here, unless a flow holding it refuses (an Act 60 filing sent to DDEC); unlinking a product takes the file out of that product's flows. A client edits only a library upload no product form has filed."},"canReplace":{"type":"boolean","description":"For an admin, every document but an executed agreement or a generated report can have its file swapped here, keeping its name and its place in every flow holding it, unless one of them refuses with its own reason (the Re-Upload route answers 403 with it). A client replaces a library upload DECA has not approved, or any document filed under a category that expires."},"canDelete":{"type":"boolean","description":"For an admin, every document but an executed agreement or a generated report can be deleted here, from every flow holding it, each the way its own remove does, unless one of them refuses with its own reason (the Delete route answers 403 with it). Always false for a client, whose Delete waits for DECA-3271."}},"required":["id","name","originalName","storageKey","source","departments","linkedProducts","uploadedBy","uploaderRole","uploadedAt","expiresAt","isExpiryOverridden","canEdit","canReplace","canDelete"]},"OrganizationDocumentsResponseDto":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationDocumentDto"}},"isSearchCapped":{"type":"boolean","description":"True when the search term matched more documents than the cap keeps; `meta.total` is then a floor, not the true match count."}},"required":["meta","data","isSearchCapped"]},"GroupedOrganizationDocumentsDto":{"type":"object","properties":{"department":{"description":"Null is the Other block — prospect-stage and loose documents.","anyOf":[{"$ref":"#/components/schemas/ProductDepartment"},{"type":"null"}]},"documents":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationDocumentDto"}}},"required":["department","documents"]},"GroupedOrganizationDocumentsResponseDto":{"type":"object","properties":{"groups":{"type":"array","items":{"$ref":"#/components/schemas/GroupedOrganizationDocumentsDto"}},"total":{"type":"number","description":"Documents matching the filters, counted before the cap. A document linked to two departments is counted once here and listed in both blocks."},"returned":{"type":"number","description":"How many of those the blocks actually hold. Below `total` when the cap was reached."},"isSearchCapped":{"type":"boolean","description":"True when a search term matched more documents than the search cap keeps; `total` is then a floor, not the true match count, even where `returned` equals `total`."}},"required":["groups","total","returned","isSearchCapped"]},"OrganizationDocumentDepartmentsResponseDto":{"type":"object","properties":{"departments":{"type":"array","description":"The departments of every product the viewer can see, withdrawn ones included, each once, in the order the library lists them. A client does not see a Backlog product.","items":{"$ref":"#/components/schemas/ProductDepartment"}}},"required":["departments"]},"OrganizationDocumentActivityEntryDto":{"type":"object","properties":{"id":{"type":"string"},"actorName":{"type":"string"},"actorImage":{"type":["string","null"]},"timestamp":{"format":"date-time","type":"string"},"description":{"type":"string","description":"What the actor did, worded for the document: \"re-uploaded EIN Letter.pdf\"."}},"required":["id","actorName","actorImage","timestamp","description"]},"OrganizationDocumentActivityResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationDocumentActivityEntryDto"}},"isCapped":{"type":"boolean","description":"True when the document has more history than one read returns; the oldest entries are then left out."}},"required":["data","isCapped"]},"CreateOrganizationDocumentDto":{"type":"object","properties":{"storageKey":{"type":"string"},"name":{"type":"string","description":"Defaults to the uploaded filename."},"orgProductIds":{"maxItems":50,"description":"Links the document straight to these products of the organization: it lists in each product’s Documents tab, and the library’s Department filter finds it by their departments. None leaves it under Other. Each must be one of the organization's linkable products (GET …/documents/linkable-products), at most 50.","type":"array","items":{"type":"string"}}},"required":["storageKey"]},"ReplaceOrganizationDocumentFileDto":{"type":"object","properties":{"storageKey":{"type":"string"}},"required":["storageKey"]},"UpdateOrganizationDocumentDto":{"type":"object","properties":{"name":{"type":"string","description":"The document's new name. The upload's extension (the current name's when the upload's is unknown) is kept: appended unless the name already ends with it or another spelling of it (.jpg for .jpeg)."},"orgProductIds":{"maxItems":50,"description":"The products the document is linked to, replacing the links the caller can pick from. Links to products outside that list are kept. An empty array unlinks every product the caller can pick. Each must be one of the organization's linkable products (GET …/documents/linkable-products), at most 50.","type":"array","items":{"type":"string"}}}},"UpdateOrganizationDocumentExpiryDto":{"type":"object","properties":{"expiresAt":{"format":"date-time","type":["string","null"],"description":"Null clears the expiry — the document stops being tracked for renewal. The pin stays, so replacing the file does not put the category clock back on it."}},"required":["expiresAt"]},"AssignedUserEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"image":{"type":["string","null"]},"state":{"allOf":[{"$ref":"#/components/schemas/UserState"}]}},"required":["id","name","email","image","state"]},"OrgResponsibilityAssignmentDto":{"type":"object","properties":{"role":{"allOf":[{"$ref":"#/components/schemas/OrgResponsibilityRole"}]},"user":{"anyOf":[{"$ref":"#/components/schemas/AssignedUserEntity"},{"type":"null"}]}},"required":["role","user"]},"AssignResponsibleUserDto":{"type":"object","properties":{"userId":{"type":"string","description":"Active or invited admin or super admin to assign to the role"}},"required":["userId"]},"RoleAssignedUsersDto":{"type":"object","properties":{"role":{"allOf":[{"$ref":"#/components/schemas/OrgResponsibilityRole"}]},"users":{"type":"array","items":{"$ref":"#/components/schemas/AssignedUserEntity"}}},"required":["role","users"]},"CreateOrganizationDto":{"type":"object","properties":{"entityType":{"type":"string","enum":["business","individual"],"default":"business"},"name":{"type":"string"},"legalName":{"type":"string"},"domain":{"type":"string"},"address":{"type":"string"},"assignedAdminId":{"type":["string","null"],"description":"Primary key account manager. Must be an active or invited admin or super admin."},"userIds":{"type":"array","items":{"type":"string"}},"nicknameId":{"type":"string","description":"Nickname to link. Mandatory for every organization, so it may be omitted only when `newNickname` is sent instead."},"newNickname":{"type":"string","minLength":1,"maxLength":255,"description":"Nickname to create and link, when `nicknameId` is omitted. Wins over `nicknameId` when both are sent."}},"required":["name"]},"OrgProductStatus":{"type":"string","enum":["client_information_approved","client_information_needs_revision","final_report_in_progress","final_report_submitted_to_ddec","final_report_approved_by_ddec","approved_by_government","client_information_in_review","not_started","in_progress","submitted"]},"DepartmentAdminStatus":{"type":"string","enum":["backlog","not_started_yet","data_collection","pending_client_decision","blocked_client","overdue","internal_drafting","internal_review","client_review","ready","blocked_internal","on_hold","renewal_in_progress","extension_submitted","submitted_to_government","submitted_to_lender","filing_submitted","closed_and_funded","not_approved","approved","completed","client_withdrawal","awarded","in_closing_process","monetized"]},"DepartmentClientStatus":{"type":"string","enum":["not_started_yet","in_progress","in_review","on_hold","renewing_documentation","pending_client_decision","overdue","extension_submitted","filing_submitted","submitted_to_government","submitted_to_lender","closed_and_funded","not_approved","approved","withdrawn","completed","awarded","in_closing_process","monetized"]},"ClientStatusFilter":{"type":"string","enum":["action_needed","in_review","submitted"]},"ServiceInactivityLevel":{"type":"string","enum":["warning","critical"]},"TaxCreditGeneralAdminStatus":{"type":"string","enum":["not_started_yet","data_collection","blocked_client","internal_drafting","internal_review","ready","blocked_internal","on_hold","submitted_to_government","not_approved","approved","monetized","data_received"]},"TaxCreditFinancialAdminStatus":{"type":"string","enum":["not_started_yet","data_collection","blocked_client","financial_modeling","internal_review","financial_model_approved","blocked_internal","on_hold","cpa_sample_selection","internal_vouching","cpa_vouching","cpa_certified","submitted_to_government","not_approved","approved","monetized"]},"TaxCreditClientStatus":{"type":"string","enum":["not_started_yet","in_progress","in_review","on_hold","aup_review","aup_completed","submitted_to_government","not_approved","approved","monetized"]},"ProductApplicationStatus":{"type":"string","enum":["not_started_yet","application_in_progress","blocked_internal","application_ready_to_submit","application_submitted","application_certified","application_approved","application_not_approved","partially_monetized","monetized"]},"DdecOfficerEntity":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"addressedAs":{"type":["string","null"],"description":"How an amendment letter greets the officer, e.g. \"Mr. Castro-Segarra\" for \"Dear Mr. Castro-Segarra,\"; null greets by name, flagged for review."}},"required":["id","name","addressedAs"]},"TaxCreditAupAdminStatus":{"type":"string","enum":["not_started_yet","data_collection","blocked_client","blocked_internal","on_hold","cpa_sample_selection","internal_vouching","cpa_vouching","certified","submitted_to_government","not_approved","approved"]},"RndTaxCreditProductEntity":{"type":"object","properties":{"orgProductId":{"type":"string"},"productId":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"name":{"type":"string"},"description":{"type":["string","null"]},"requiresYear":{"type":"boolean"},"year":{"type":["number","null"]},"department":{"allOf":[{"$ref":"#/components/schemas/ProductDepartment"}]},"periodicity":{"anyOf":[{"$ref":"#/components/schemas/ProductPeriodicity"},{"type":"null"}]},"periodValue":{"type":["number","null"]},"isMultiInstance":{"type":"boolean"},"startDate":{"type":["string","null"],"format":"date","description":"When an \"every N years\" product starts running here"},"deadline":{"type":["string","null"],"format":"date","description":"The day the service is due, in Puerto Rico time"},"extendedDate":{"type":["string","null"],"format":"date","description":"The day the deadline is extended to; null when the product is not extendable, there is no deadline, or it is not after the deadline"},"isDeadlineOverridden":{"type":"boolean","description":"`deadline` was typed on the service; otherwise it follows the product's Deadline rule and moves with it"},"isExtendedDateOverridden":{"type":"boolean","description":"`extendedDate` was typed on the service; otherwise it follows the product's Extended date rule"},"productDeadline":{"type":["string","null"],"format":"date","description":"The deadline the product's Deadline rule gives the service, which `deadline` holds while it is not typed; null with no rule"},"productExtendedDate":{"type":["string","null"],"format":"date","description":"The Extended date the product's rules give the service, counted from `productDeadline`; null with no rule or when the product is not extendable"},"isExtendable":{"type":"boolean","description":"The product lets its services carry an Extended date"},"isExtensionFiled":{"type":"boolean","description":"The service has been in Extension Submitted, so its deadline reminders have stopped; it stays set after the service moves on"},"hasCustomName":{"type":"boolean"},"isTaxCreditApplication":{"type":"boolean"},"hasTimeLog":{"type":"boolean","description":"The product logs time against each service"},"hasRates":{"type":"boolean","description":"The product prices logged time at the organization's hourly rate"},"instanceName":{"type":["string","null"]},"progress":{"type":"number","minimum":0,"maximum":100},"status":{"allOf":[{"$ref":"#/components/schemas/OrgProductStatus"}]},"adminStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentAdminStatus"},{"type":"null"}]},"availableAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentAdminStatus"}},"restrictedAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentAdminStatus"}},"adminStatusRestrictionReason":{"type":["string","null"]},"clientStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentClientStatus"},{"type":"null"}]},"locked":{"type":"boolean"},"hasQuestionnaireCopy":{"type":"boolean","description":"True when the product was assigned with its questionnaire switched on: the organization holds its own copy"},"isQuestionnaireSetUp":{"type":"boolean","description":"The organization's copy was saved once, or is past Backlog (or never in it); false without a copy"},"isQuestionnaireNew":{"type":"boolean","description":"The questionnaire was edited for this organization since the client last opened it"},"clientStatusFilter":{"anyOf":[{"$ref":"#/components/schemas/ClientStatusFilter"},{"type":"null"}]},"inactivityLevel":{"anyOf":[{"$ref":"#/components/schemas/ServiceInactivityLevel"},{"type":"null"}]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"lastActivityAt":{"format":"date-time","type":"string"},"pendingReviewCount":{"type":"number"},"pendingDocumentsReviewCount":{"type":"number"},"submissionId":{"type":["string","null"]},"submittedAt":{"format":"date-time","type":["string","null"]},"submittedByName":{"type":["string","null"]},"reportGeneratedAt":{"format":"date-time","type":["string","null"]},"reportGeneratedByName":{"type":["string","null"]},"notesCount":{"type":"number"},"unreadThreadCount":{"type":["number","null"]},"unreviewedActivityCount":{"type":["number","null"]},"assignedAdmins":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AssignedUserEntity"}},"generalAssignedAdmins":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AssignedUserEntity"}},"financialAssignedAdmins":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AssignedUserEntity"}},"generalAdminStatus":{"allOf":[{"$ref":"#/components/schemas/TaxCreditGeneralAdminStatus"}]},"financialAdminStatus":{"allOf":[{"$ref":"#/components/schemas/TaxCreditFinancialAdminStatus"}]},"availableGeneralAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/TaxCreditGeneralAdminStatus"}},"availableFinancialAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/TaxCreditFinancialAdminStatus"}},"generalClientStatus":{"allOf":[{"$ref":"#/components/schemas/TaxCreditClientStatus"}]},"financialClientStatus":{"allOf":[{"$ref":"#/components/schemas/TaxCreditClientStatus"}]},"generalInactivityLevel":{"anyOf":[{"$ref":"#/components/schemas/ServiceInactivityLevel"},{"type":"null"}]},"financialInactivityLevel":{"anyOf":[{"$ref":"#/components/schemas/ServiceInactivityLevel"},{"type":"null"}]},"applicationStatus":{"allOf":[{"$ref":"#/components/schemas/ProductApplicationStatus"}]},"availableApplicationStatuses":{"type":"array","items":{"$ref":"#/components/schemas/ProductApplicationStatus"}},"generalPendingReviewCount":{"type":"number"},"financialPendingReviewCount":{"type":"number"},"generalLastActivityAt":{"format":"date-time","type":"string"},"financialLastActivityAt":{"format":"date-time","type":"string"},"finalDocumentCount":{"type":"number"},"documentsUploaded":{"type":"number"},"documentsTotal":{"type":"number"},"hasRefinedReport":{"type":"boolean"},"isRefinedReportStale":{"type":"boolean"},"generalProgress":{"type":"number","minimum":0,"maximum":100},"financialProgress":{"type":"number","minimum":0,"maximum":100},"aupTransactionCount":{"type":"number","minimum":0},"isAmendable":{"type":"boolean"},"ddecResponsible":{"type":["array","null"],"items":{"$ref":"#/components/schemas/DdecOfficerEntity"}},"aupAssignedAdmins":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AssignedUserEntity"}},"aupAdminStatus":{"allOf":[{"$ref":"#/components/schemas/TaxCreditAupAdminStatus"}]},"availableAupAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/TaxCreditAupAdminStatus"}},"aupClientStatus":{"allOf":[{"$ref":"#/components/schemas/TaxCreditClientStatus"}]},"aupInactivityLevel":{"anyOf":[{"$ref":"#/components/schemas/ServiceInactivityLevel"},{"type":"null"}]},"aupLastActivityAt":{"format":"date-time","type":"string"},"aupProgress":{"type":"number","minimum":0,"maximum":100},"aupLocked":{"type":"boolean"}},"required":["orgProductId","productId","type","name","description","requiresYear","year","department","periodicity","periodValue","isMultiInstance","startDate","deadline","extendedDate","isDeadlineOverridden","isExtendedDateOverridden","productDeadline","productExtendedDate","isExtendable","isExtensionFiled","hasCustomName","isTaxCreditApplication","hasTimeLog","hasRates","instanceName","progress","status","adminStatus","availableAdminStatuses","restrictedAdminStatuses","adminStatusRestrictionReason","clientStatus","locked","hasQuestionnaireCopy","isQuestionnaireSetUp","isQuestionnaireNew","clientStatusFilter","inactivityLevel","createdAt","updatedAt","lastActivityAt","pendingReviewCount","pendingDocumentsReviewCount","submissionId","submittedAt","submittedByName","reportGeneratedAt","reportGeneratedByName","notesCount","unreadThreadCount","unreviewedActivityCount","assignedAdmins","generalAssignedAdmins","financialAssignedAdmins","generalAdminStatus","financialAdminStatus","availableGeneralAdminStatuses","availableFinancialAdminStatuses","generalClientStatus","financialClientStatus","generalInactivityLevel","financialInactivityLevel","applicationStatus","availableApplicationStatuses","generalPendingReviewCount","financialPendingReviewCount","generalLastActivityAt","financialLastActivityAt","finalDocumentCount","documentsUploaded","documentsTotal","hasRefinedReport","isRefinedReportStale","generalProgress","financialProgress","aupTransactionCount","isAmendable","ddecResponsible","aupAssignedAdmins","aupAdminStatus","availableAupAdminStatuses","aupClientStatus","aupInactivityLevel","aupLastActivityAt","aupProgress","aupLocked"]},"RndTaxCreditAmendmentProductEntity":{"type":"object","properties":{"orgProductId":{"type":"string"},"productId":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"name":{"type":"string"},"description":{"type":["string","null"]},"requiresYear":{"type":"boolean"},"year":{"type":["number","null"]},"department":{"allOf":[{"$ref":"#/components/schemas/ProductDepartment"}]},"periodicity":{"anyOf":[{"$ref":"#/components/schemas/ProductPeriodicity"},{"type":"null"}]},"periodValue":{"type":["number","null"]},"isMultiInstance":{"type":"boolean"},"startDate":{"type":["string","null"],"format":"date","description":"When an \"every N years\" product starts running here"},"deadline":{"type":["string","null"],"format":"date","description":"The day the service is due, in Puerto Rico time"},"extendedDate":{"type":["string","null"],"format":"date","description":"The day the deadline is extended to; null when the product is not extendable, there is no deadline, or it is not after the deadline"},"isDeadlineOverridden":{"type":"boolean","description":"`deadline` was typed on the service; otherwise it follows the product's Deadline rule and moves with it"},"isExtendedDateOverridden":{"type":"boolean","description":"`extendedDate` was typed on the service; otherwise it follows the product's Extended date rule"},"productDeadline":{"type":["string","null"],"format":"date","description":"The deadline the product's Deadline rule gives the service, which `deadline` holds while it is not typed; null with no rule"},"productExtendedDate":{"type":["string","null"],"format":"date","description":"The Extended date the product's rules give the service, counted from `productDeadline`; null with no rule or when the product is not extendable"},"isExtendable":{"type":"boolean","description":"The product lets its services carry an Extended date"},"isExtensionFiled":{"type":"boolean","description":"The service has been in Extension Submitted, so its deadline reminders have stopped; it stays set after the service moves on"},"hasCustomName":{"type":"boolean"},"isTaxCreditApplication":{"type":"boolean"},"hasTimeLog":{"type":"boolean","description":"The product logs time against each service"},"hasRates":{"type":"boolean","description":"The product prices logged time at the organization's hourly rate"},"instanceName":{"type":["string","null"]},"progress":{"type":"number","minimum":0,"maximum":100},"status":{"allOf":[{"$ref":"#/components/schemas/OrgProductStatus"}]},"adminStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentAdminStatus"},{"type":"null"}]},"availableAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentAdminStatus"}},"restrictedAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentAdminStatus"}},"adminStatusRestrictionReason":{"type":["string","null"]},"clientStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentClientStatus"},{"type":"null"}]},"locked":{"type":"boolean"},"hasQuestionnaireCopy":{"type":"boolean","description":"True when the product was assigned with its questionnaire switched on: the organization holds its own copy"},"isQuestionnaireSetUp":{"type":"boolean","description":"The organization's copy was saved once, or is past Backlog (or never in it); false without a copy"},"isQuestionnaireNew":{"type":"boolean","description":"The questionnaire was edited for this organization since the client last opened it"},"clientStatusFilter":{"anyOf":[{"$ref":"#/components/schemas/ClientStatusFilter"},{"type":"null"}]},"inactivityLevel":{"anyOf":[{"$ref":"#/components/schemas/ServiceInactivityLevel"},{"type":"null"}]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"lastActivityAt":{"format":"date-time","type":"string"},"pendingReviewCount":{"type":"number"},"pendingDocumentsReviewCount":{"type":"number"},"submissionId":{"type":["string","null"]},"submittedAt":{"format":"date-time","type":["string","null"]},"submittedByName":{"type":["string","null"]},"reportGeneratedAt":{"format":"date-time","type":["string","null"]},"reportGeneratedByName":{"type":["string","null"]},"notesCount":{"type":"number"},"unreadThreadCount":{"type":["number","null"]},"unreviewedActivityCount":{"type":["number","null"]},"assignedAdmins":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AssignedUserEntity"}},"generalAssignedAdmins":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AssignedUserEntity"}},"financialAssignedAdmins":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AssignedUserEntity"}},"generalAdminStatus":{"allOf":[{"$ref":"#/components/schemas/TaxCreditGeneralAdminStatus"}]},"financialAdminStatus":{"allOf":[{"$ref":"#/components/schemas/TaxCreditFinancialAdminStatus"}]},"availableGeneralAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/TaxCreditGeneralAdminStatus"}},"availableFinancialAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/TaxCreditFinancialAdminStatus"}},"generalClientStatus":{"allOf":[{"$ref":"#/components/schemas/TaxCreditClientStatus"}]},"financialClientStatus":{"allOf":[{"$ref":"#/components/schemas/TaxCreditClientStatus"}]},"generalInactivityLevel":{"anyOf":[{"$ref":"#/components/schemas/ServiceInactivityLevel"},{"type":"null"}]},"financialInactivityLevel":{"anyOf":[{"$ref":"#/components/schemas/ServiceInactivityLevel"},{"type":"null"}]},"applicationStatus":{"allOf":[{"$ref":"#/components/schemas/ProductApplicationStatus"}]},"availableApplicationStatuses":{"type":"array","items":{"$ref":"#/components/schemas/ProductApplicationStatus"}},"generalPendingReviewCount":{"type":"number"},"financialPendingReviewCount":{"type":"number"},"generalLastActivityAt":{"format":"date-time","type":"string"},"financialLastActivityAt":{"format":"date-time","type":"string"},"finalDocumentCount":{"type":"number"},"documentsUploaded":{"type":"number"},"documentsTotal":{"type":"number"},"hasRefinedReport":{"type":"boolean"},"isRefinedReportStale":{"type":"boolean"},"generalProgress":{"type":"number","minimum":0,"maximum":100},"financialProgress":{"type":"number","minimum":0,"maximum":100},"aupTransactionCount":{"type":"number","minimum":0},"amendmentNumber":{"type":"number","minimum":1}},"required":["orgProductId","productId","type","name","description","requiresYear","year","department","periodicity","periodValue","isMultiInstance","startDate","deadline","extendedDate","isDeadlineOverridden","isExtendedDateOverridden","productDeadline","productExtendedDate","isExtendable","isExtensionFiled","hasCustomName","isTaxCreditApplication","hasTimeLog","hasRates","instanceName","progress","status","adminStatus","availableAdminStatuses","restrictedAdminStatuses","adminStatusRestrictionReason","clientStatus","locked","hasQuestionnaireCopy","isQuestionnaireSetUp","isQuestionnaireNew","clientStatusFilter","inactivityLevel","createdAt","updatedAt","lastActivityAt","pendingReviewCount","pendingDocumentsReviewCount","submissionId","submittedAt","submittedByName","reportGeneratedAt","reportGeneratedByName","notesCount","unreadThreadCount","unreviewedActivityCount","assignedAdmins","generalAssignedAdmins","financialAssignedAdmins","generalAdminStatus","financialAdminStatus","availableGeneralAdminStatuses","availableFinancialAdminStatuses","generalClientStatus","financialClientStatus","generalInactivityLevel","financialInactivityLevel","applicationStatus","availableApplicationStatuses","generalPendingReviewCount","financialPendingReviewCount","generalLastActivityAt","financialLastActivityAt","finalDocumentCount","documentsUploaded","documentsTotal","hasRefinedReport","isRefinedReportStale","generalProgress","financialProgress","aupTransactionCount","amendmentNumber"]},"Act60ProductEntity":{"type":"object","properties":{"orgProductId":{"type":"string"},"productId":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"name":{"type":"string"},"description":{"type":["string","null"]},"requiresYear":{"type":"boolean"},"year":{"type":["number","null"]},"department":{"allOf":[{"$ref":"#/components/schemas/ProductDepartment"}]},"periodicity":{"anyOf":[{"$ref":"#/components/schemas/ProductPeriodicity"},{"type":"null"}]},"periodValue":{"type":["number","null"]},"isMultiInstance":{"type":"boolean"},"startDate":{"type":["string","null"],"format":"date","description":"When an \"every N years\" product starts running here"},"deadline":{"type":["string","null"],"format":"date","description":"The day the service is due, in Puerto Rico time"},"extendedDate":{"type":["string","null"],"format":"date","description":"The day the deadline is extended to; null when the product is not extendable, there is no deadline, or it is not after the deadline"},"isDeadlineOverridden":{"type":"boolean","description":"`deadline` was typed on the service; otherwise it follows the product's Deadline rule and moves with it"},"isExtendedDateOverridden":{"type":"boolean","description":"`extendedDate` was typed on the service; otherwise it follows the product's Extended date rule"},"productDeadline":{"type":["string","null"],"format":"date","description":"The deadline the product's Deadline rule gives the service, which `deadline` holds while it is not typed; null with no rule"},"productExtendedDate":{"type":["string","null"],"format":"date","description":"The Extended date the product's rules give the service, counted from `productDeadline`; null with no rule or when the product is not extendable"},"isExtendable":{"type":"boolean","description":"The product lets its services carry an Extended date"},"isExtensionFiled":{"type":"boolean","description":"The service has been in Extension Submitted, so its deadline reminders have stopped; it stays set after the service moves on"},"hasCustomName":{"type":"boolean"},"isTaxCreditApplication":{"type":"boolean"},"hasTimeLog":{"type":"boolean","description":"The product logs time against each service"},"hasRates":{"type":"boolean","description":"The product prices logged time at the organization's hourly rate"},"instanceName":{"type":["string","null"]},"progress":{"type":"number","minimum":0,"maximum":100},"status":{"allOf":[{"$ref":"#/components/schemas/OrgProductStatus"}]},"adminStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentAdminStatus"},{"type":"null"}]},"availableAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentAdminStatus"}},"restrictedAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentAdminStatus"}},"adminStatusRestrictionReason":{"type":["string","null"]},"clientStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentClientStatus"},{"type":"null"}]},"locked":{"type":"boolean"},"hasQuestionnaireCopy":{"type":"boolean","description":"True when the product was assigned with its questionnaire switched on: the organization holds its own copy"},"isQuestionnaireSetUp":{"type":"boolean","description":"The organization's copy was saved once, or is past Backlog (or never in it); false without a copy"},"isQuestionnaireNew":{"type":"boolean","description":"The questionnaire was edited for this organization since the client last opened it"},"clientStatusFilter":{"anyOf":[{"$ref":"#/components/schemas/ClientStatusFilter"},{"type":"null"}]},"inactivityLevel":{"anyOf":[{"$ref":"#/components/schemas/ServiceInactivityLevel"},{"type":"null"}]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"lastActivityAt":{"format":"date-time","type":"string"},"pendingReviewCount":{"type":"number"},"pendingDocumentsReviewCount":{"type":"number"},"submissionId":{"type":["string","null"]},"submittedAt":{"format":"date-time","type":["string","null"]},"submittedByName":{"type":["string","null"]},"reportGeneratedAt":{"format":"date-time","type":["string","null"]},"reportGeneratedByName":{"type":["string","null"]},"notesCount":{"type":"number"},"unreadThreadCount":{"type":["number","null"]},"unreviewedActivityCount":{"type":["number","null"]},"assignedAdmins":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AssignedUserEntity"}},"decreeType":{"type":["string","null"],"enum":["manufacturing","tourism","export","private_equity","hard_to_recruit","young_entrepreneur",null]},"hasScreeningInfo":{"type":"boolean"}},"required":["orgProductId","productId","type","name","description","requiresYear","year","department","periodicity","periodValue","isMultiInstance","startDate","deadline","extendedDate","isDeadlineOverridden","isExtendedDateOverridden","productDeadline","productExtendedDate","isExtendable","isExtensionFiled","hasCustomName","isTaxCreditApplication","hasTimeLog","hasRates","instanceName","progress","status","adminStatus","availableAdminStatuses","restrictedAdminStatuses","adminStatusRestrictionReason","clientStatus","locked","hasQuestionnaireCopy","isQuestionnaireSetUp","isQuestionnaireNew","clientStatusFilter","inactivityLevel","createdAt","updatedAt","lastActivityAt","pendingReviewCount","pendingDocumentsReviewCount","submissionId","submittedAt","submittedByName","reportGeneratedAt","reportGeneratedByName","notesCount","unreadThreadCount","unreviewedActivityCount","assignedAdmins","decreeType","hasScreeningInfo"]},"Act60AmendmentProductEntity":{"type":"object","properties":{"orgProductId":{"type":"string"},"productId":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"name":{"type":"string"},"description":{"type":["string","null"]},"requiresYear":{"type":"boolean"},"year":{"type":["number","null"]},"department":{"allOf":[{"$ref":"#/components/schemas/ProductDepartment"}]},"periodicity":{"anyOf":[{"$ref":"#/components/schemas/ProductPeriodicity"},{"type":"null"}]},"periodValue":{"type":["number","null"]},"isMultiInstance":{"type":"boolean"},"startDate":{"type":["string","null"],"format":"date","description":"When an \"every N years\" product starts running here"},"deadline":{"type":["string","null"],"format":"date","description":"The day the service is due, in Puerto Rico time"},"extendedDate":{"type":["string","null"],"format":"date","description":"The day the deadline is extended to; null when the product is not extendable, there is no deadline, or it is not after the deadline"},"isDeadlineOverridden":{"type":"boolean","description":"`deadline` was typed on the service; otherwise it follows the product's Deadline rule and moves with it"},"isExtendedDateOverridden":{"type":"boolean","description":"`extendedDate` was typed on the service; otherwise it follows the product's Extended date rule"},"productDeadline":{"type":["string","null"],"format":"date","description":"The deadline the product's Deadline rule gives the service, which `deadline` holds while it is not typed; null with no rule"},"productExtendedDate":{"type":["string","null"],"format":"date","description":"The Extended date the product's rules give the service, counted from `productDeadline`; null with no rule or when the product is not extendable"},"isExtendable":{"type":"boolean","description":"The product lets its services carry an Extended date"},"isExtensionFiled":{"type":"boolean","description":"The service has been in Extension Submitted, so its deadline reminders have stopped; it stays set after the service moves on"},"hasCustomName":{"type":"boolean"},"isTaxCreditApplication":{"type":"boolean"},"hasTimeLog":{"type":"boolean","description":"The product logs time against each service"},"hasRates":{"type":"boolean","description":"The product prices logged time at the organization's hourly rate"},"instanceName":{"type":["string","null"]},"progress":{"type":"number","minimum":0,"maximum":100},"status":{"allOf":[{"$ref":"#/components/schemas/OrgProductStatus"}]},"adminStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentAdminStatus"},{"type":"null"}]},"availableAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentAdminStatus"}},"restrictedAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentAdminStatus"}},"adminStatusRestrictionReason":{"type":["string","null"]},"clientStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentClientStatus"},{"type":"null"}]},"locked":{"type":"boolean"},"hasQuestionnaireCopy":{"type":"boolean","description":"True when the product was assigned with its questionnaire switched on: the organization holds its own copy"},"isQuestionnaireSetUp":{"type":"boolean","description":"The organization's copy was saved once, or is past Backlog (or never in it); false without a copy"},"isQuestionnaireNew":{"type":"boolean","description":"The questionnaire was edited for this organization since the client last opened it"},"clientStatusFilter":{"anyOf":[{"$ref":"#/components/schemas/ClientStatusFilter"},{"type":"null"}]},"inactivityLevel":{"anyOf":[{"$ref":"#/components/schemas/ServiceInactivityLevel"},{"type":"null"}]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"lastActivityAt":{"format":"date-time","type":"string"},"pendingReviewCount":{"type":"number"},"pendingDocumentsReviewCount":{"type":"number"},"submissionId":{"type":["string","null"]},"submittedAt":{"format":"date-time","type":["string","null"]},"submittedByName":{"type":["string","null"]},"reportGeneratedAt":{"format":"date-time","type":["string","null"]},"reportGeneratedByName":{"type":["string","null"]},"notesCount":{"type":"number"},"unreadThreadCount":{"type":["number","null"]},"unreviewedActivityCount":{"type":["number","null"]},"assignedAdmins":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AssignedUserEntity"}},"amendmentType":{"anyOf":[{"$ref":"#/components/schemas/Act60AmendmentType"},{"type":"null"}]},"sourceOrgProductId":{"type":["string","null"]},"amendmentDescription":{"type":["string","null"]},"fileStorageKeys":{"type":"array","items":{"type":"string"}},"rowIdMap":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Frozen mapping from amendment-row-id to source-row-id, populated at copy time. Used by the frontend diff engine to match amendment rows against source rows for highlighting."},"decreeType":{"type":["string","null"],"enum":["manufacturing","tourism","export","private_equity","hard_to_recruit","young_entrepreneur",null]},"hasScreeningInfo":{"type":"boolean"}},"required":["orgProductId","productId","type","name","description","requiresYear","year","department","periodicity","periodValue","isMultiInstance","startDate","deadline","extendedDate","isDeadlineOverridden","isExtendedDateOverridden","productDeadline","productExtendedDate","isExtendable","isExtensionFiled","hasCustomName","isTaxCreditApplication","hasTimeLog","hasRates","instanceName","progress","status","adminStatus","availableAdminStatuses","restrictedAdminStatuses","adminStatusRestrictionReason","clientStatus","locked","hasQuestionnaireCopy","isQuestionnaireSetUp","isQuestionnaireNew","clientStatusFilter","inactivityLevel","createdAt","updatedAt","lastActivityAt","pendingReviewCount","pendingDocumentsReviewCount","submissionId","submittedAt","submittedByName","reportGeneratedAt","reportGeneratedByName","notesCount","unreadThreadCount","unreviewedActivityCount","assignedAdmins","amendmentType","sourceOrgProductId","amendmentDescription","fileStorageKeys","rowIdMap","decreeType","hasScreeningInfo"]},"DocumentProductEntity":{"type":"object","properties":{"orgProductId":{"type":"string"},"productId":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"name":{"type":"string"},"description":{"type":["string","null"]},"requiresYear":{"type":"boolean"},"year":{"type":["number","null"]},"department":{"allOf":[{"$ref":"#/components/schemas/ProductDepartment"}]},"periodicity":{"anyOf":[{"$ref":"#/components/schemas/ProductPeriodicity"},{"type":"null"}]},"periodValue":{"type":["number","null"]},"isMultiInstance":{"type":"boolean"},"startDate":{"type":["string","null"],"format":"date","description":"When an \"every N years\" product starts running here"},"deadline":{"type":["string","null"],"format":"date","description":"The day the service is due, in Puerto Rico time"},"extendedDate":{"type":["string","null"],"format":"date","description":"The day the deadline is extended to; null when the product is not extendable, there is no deadline, or it is not after the deadline"},"isDeadlineOverridden":{"type":"boolean","description":"`deadline` was typed on the service; otherwise it follows the product's Deadline rule and moves with it"},"isExtendedDateOverridden":{"type":"boolean","description":"`extendedDate` was typed on the service; otherwise it follows the product's Extended date rule"},"productDeadline":{"type":["string","null"],"format":"date","description":"The deadline the product's Deadline rule gives the service, which `deadline` holds while it is not typed; null with no rule"},"productExtendedDate":{"type":["string","null"],"format":"date","description":"The Extended date the product's rules give the service, counted from `productDeadline`; null with no rule or when the product is not extendable"},"isExtendable":{"type":"boolean","description":"The product lets its services carry an Extended date"},"isExtensionFiled":{"type":"boolean","description":"The service has been in Extension Submitted, so its deadline reminders have stopped; it stays set after the service moves on"},"hasCustomName":{"type":"boolean"},"isTaxCreditApplication":{"type":"boolean"},"hasTimeLog":{"type":"boolean","description":"The product logs time against each service"},"hasRates":{"type":"boolean","description":"The product prices logged time at the organization's hourly rate"},"instanceName":{"type":["string","null"]},"progress":{"type":"number","minimum":0,"maximum":100},"status":{"allOf":[{"$ref":"#/components/schemas/OrgProductStatus"}]},"adminStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentAdminStatus"},{"type":"null"}]},"availableAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentAdminStatus"}},"restrictedAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentAdminStatus"}},"adminStatusRestrictionReason":{"type":["string","null"]},"clientStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentClientStatus"},{"type":"null"}]},"locked":{"type":"boolean"},"hasQuestionnaireCopy":{"type":"boolean","description":"True when the product was assigned with its questionnaire switched on: the organization holds its own copy"},"isQuestionnaireSetUp":{"type":"boolean","description":"The organization's copy was saved once, or is past Backlog (or never in it); false without a copy"},"isQuestionnaireNew":{"type":"boolean","description":"The questionnaire was edited for this organization since the client last opened it"},"clientStatusFilter":{"anyOf":[{"$ref":"#/components/schemas/ClientStatusFilter"},{"type":"null"}]},"inactivityLevel":{"anyOf":[{"$ref":"#/components/schemas/ServiceInactivityLevel"},{"type":"null"}]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"lastActivityAt":{"format":"date-time","type":"string"},"pendingReviewCount":{"type":"number"},"pendingDocumentsReviewCount":{"type":"number"},"submissionId":{"type":["string","null"]},"submittedAt":{"format":"date-time","type":["string","null"]},"submittedByName":{"type":["string","null"]},"reportGeneratedAt":{"format":"date-time","type":["string","null"]},"reportGeneratedByName":{"type":["string","null"]},"notesCount":{"type":"number"},"unreadThreadCount":{"type":["number","null"]},"unreviewedActivityCount":{"type":["number","null"]},"assignedAdmins":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AssignedUserEntity"}},"sectionCount":{"type":"number"}},"required":["orgProductId","productId","type","name","description","requiresYear","year","department","periodicity","periodValue","isMultiInstance","startDate","deadline","extendedDate","isDeadlineOverridden","isExtendedDateOverridden","productDeadline","productExtendedDate","isExtendable","isExtensionFiled","hasCustomName","isTaxCreditApplication","hasTimeLog","hasRates","instanceName","progress","status","adminStatus","availableAdminStatuses","restrictedAdminStatuses","adminStatusRestrictionReason","clientStatus","locked","hasQuestionnaireCopy","isQuestionnaireSetUp","isQuestionnaireNew","clientStatusFilter","inactivityLevel","createdAt","updatedAt","lastActivityAt","pendingReviewCount","pendingDocumentsReviewCount","submissionId","submittedAt","submittedByName","reportGeneratedAt","reportGeneratedByName","notesCount","unreadThreadCount","unreviewedActivityCount","assignedAdmins","sectionCount"]},"TourismTaxCreditProductEntity":{"type":"object","properties":{"orgProductId":{"type":"string"},"productId":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"name":{"type":"string"},"description":{"type":["string","null"]},"requiresYear":{"type":"boolean"},"year":{"type":["number","null"]},"department":{"allOf":[{"$ref":"#/components/schemas/ProductDepartment"}]},"periodicity":{"anyOf":[{"$ref":"#/components/schemas/ProductPeriodicity"},{"type":"null"}]},"periodValue":{"type":["number","null"]},"isMultiInstance":{"type":"boolean"},"startDate":{"type":["string","null"],"format":"date","description":"When an \"every N years\" product starts running here"},"deadline":{"type":["string","null"],"format":"date","description":"The day the service is due, in Puerto Rico time"},"extendedDate":{"type":["string","null"],"format":"date","description":"The day the deadline is extended to; null when the product is not extendable, there is no deadline, or it is not after the deadline"},"isDeadlineOverridden":{"type":"boolean","description":"`deadline` was typed on the service; otherwise it follows the product's Deadline rule and moves with it"},"isExtendedDateOverridden":{"type":"boolean","description":"`extendedDate` was typed on the service; otherwise it follows the product's Extended date rule"},"productDeadline":{"type":["string","null"],"format":"date","description":"The deadline the product's Deadline rule gives the service, which `deadline` holds while it is not typed; null with no rule"},"productExtendedDate":{"type":["string","null"],"format":"date","description":"The Extended date the product's rules give the service, counted from `productDeadline`; null with no rule or when the product is not extendable"},"isExtendable":{"type":"boolean","description":"The product lets its services carry an Extended date"},"isExtensionFiled":{"type":"boolean","description":"The service has been in Extension Submitted, so its deadline reminders have stopped; it stays set after the service moves on"},"hasCustomName":{"type":"boolean"},"isTaxCreditApplication":{"type":"boolean"},"hasTimeLog":{"type":"boolean","description":"The product logs time against each service"},"hasRates":{"type":"boolean","description":"The product prices logged time at the organization's hourly rate"},"instanceName":{"type":["string","null"]},"progress":{"type":"number","minimum":0,"maximum":100},"status":{"allOf":[{"$ref":"#/components/schemas/OrgProductStatus"}]},"adminStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentAdminStatus"},{"type":"null"}]},"availableAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentAdminStatus"}},"restrictedAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentAdminStatus"}},"adminStatusRestrictionReason":{"type":["string","null"]},"clientStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentClientStatus"},{"type":"null"}]},"locked":{"type":"boolean"},"hasQuestionnaireCopy":{"type":"boolean","description":"True when the product was assigned with its questionnaire switched on: the organization holds its own copy"},"isQuestionnaireSetUp":{"type":"boolean","description":"The organization's copy was saved once, or is past Backlog (or never in it); false without a copy"},"isQuestionnaireNew":{"type":"boolean","description":"The questionnaire was edited for this organization since the client last opened it"},"clientStatusFilter":{"anyOf":[{"$ref":"#/components/schemas/ClientStatusFilter"},{"type":"null"}]},"inactivityLevel":{"anyOf":[{"$ref":"#/components/schemas/ServiceInactivityLevel"},{"type":"null"}]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"lastActivityAt":{"format":"date-time","type":"string"},"pendingReviewCount":{"type":"number"},"pendingDocumentsReviewCount":{"type":"number"},"submissionId":{"type":["string","null"]},"submittedAt":{"format":"date-time","type":["string","null"]},"submittedByName":{"type":["string","null"]},"reportGeneratedAt":{"format":"date-time","type":["string","null"]},"reportGeneratedByName":{"type":["string","null"]},"notesCount":{"type":"number"},"unreadThreadCount":{"type":["number","null"]},"unreviewedActivityCount":{"type":["number","null"]},"assignedAdmins":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AssignedUserEntity"}},"generalAssignedAdmins":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AssignedUserEntity"}},"financialAssignedAdmins":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AssignedUserEntity"}},"generalAdminStatus":{"allOf":[{"$ref":"#/components/schemas/TaxCreditGeneralAdminStatus"}]},"financialAdminStatus":{"allOf":[{"$ref":"#/components/schemas/TaxCreditFinancialAdminStatus"}]},"availableGeneralAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/TaxCreditGeneralAdminStatus"}},"availableFinancialAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/TaxCreditFinancialAdminStatus"}},"generalClientStatus":{"allOf":[{"$ref":"#/components/schemas/TaxCreditClientStatus"}]},"financialClientStatus":{"allOf":[{"$ref":"#/components/schemas/TaxCreditClientStatus"}]},"generalInactivityLevel":{"anyOf":[{"$ref":"#/components/schemas/ServiceInactivityLevel"},{"type":"null"}]},"financialInactivityLevel":{"anyOf":[{"$ref":"#/components/schemas/ServiceInactivityLevel"},{"type":"null"}]},"applicationStatus":{"allOf":[{"$ref":"#/components/schemas/ProductApplicationStatus"}]},"availableApplicationStatuses":{"type":"array","items":{"$ref":"#/components/schemas/ProductApplicationStatus"}},"generalPendingReviewCount":{"type":"number"},"financialPendingReviewCount":{"type":"number"},"generalLastActivityAt":{"format":"date-time","type":"string"},"financialLastActivityAt":{"format":"date-time","type":"string"},"finalDocumentCount":{"type":"number"}},"required":["orgProductId","productId","type","name","description","requiresYear","year","department","periodicity","periodValue","isMultiInstance","startDate","deadline","extendedDate","isDeadlineOverridden","isExtendedDateOverridden","productDeadline","productExtendedDate","isExtendable","isExtensionFiled","hasCustomName","isTaxCreditApplication","hasTimeLog","hasRates","instanceName","progress","status","adminStatus","availableAdminStatuses","restrictedAdminStatuses","adminStatusRestrictionReason","clientStatus","locked","hasQuestionnaireCopy","isQuestionnaireSetUp","isQuestionnaireNew","clientStatusFilter","inactivityLevel","createdAt","updatedAt","lastActivityAt","pendingReviewCount","pendingDocumentsReviewCount","submissionId","submittedAt","submittedByName","reportGeneratedAt","reportGeneratedByName","notesCount","unreadThreadCount","unreviewedActivityCount","assignedAdmins","generalAssignedAdmins","financialAssignedAdmins","generalAdminStatus","financialAdminStatus","availableGeneralAdminStatuses","availableFinancialAdminStatuses","generalClientStatus","financialClientStatus","generalInactivityLevel","financialInactivityLevel","applicationStatus","availableApplicationStatuses","generalPendingReviewCount","financialPendingReviewCount","generalLastActivityAt","financialLastActivityAt","finalDocumentCount"]},"OrganizationStatus":{"type":"string","enum":["active","on_hold","archived"]},"OrgUserSummaryEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"image":{"type":["string","null"]},"notificationsEnabled":{"type":"boolean"},"isAssignedAdmin":{"type":"boolean"}},"required":["id","name","email","image","notificationsEnabled","isAssignedAdmin"]},"NicknameEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","name","createdAt"]},"OrgPrimaryContactDto":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["name","email"]},"OrganizationEntity":{"type":"object","properties":{"id":{"type":"string"},"entityType":{"type":"string","enum":["business","individual"]},"status":{"allOf":[{"$ref":"#/components/schemas/OrganizationStatus"}]},"onHoldReason":{"type":["string","null"]},"name":{"type":"string"},"legalName":{"type":["string","null"]},"domain":{"type":["string","null"]},"address":{"type":["string","null"]},"assignedAdminId":{"type":["string","null"]},"assignedAdmin":{"anyOf":[{"$ref":"#/components/schemas/AssignedUserEntity"},{"type":"null"}]},"secondaryKam":{"anyOf":[{"$ref":"#/components/schemas/AssignedUserEntity"},{"type":"null"}]},"users":{"type":"array","items":{"$ref":"#/components/schemas/OrgUserSummaryEntity"}},"nickname":{"$ref":"#/components/schemas/NicknameEntity"},"products":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/RndTaxCreditProductEntity"},{"$ref":"#/components/schemas/RndTaxCreditAmendmentProductEntity"},{"$ref":"#/components/schemas/Act60ProductEntity"},{"$ref":"#/components/schemas/Act60AmendmentProductEntity"},{"$ref":"#/components/schemas/DocumentProductEntity"},{"$ref":"#/components/schemas/TourismTaxCreditProductEntity"}],"discriminator":{"propertyName":"type","mapping":{"rnd_tax_credit":"#/components/schemas/RndTaxCreditProductEntity","rnd_tax_credit_amendment":"#/components/schemas/RndTaxCreditAmendmentProductEntity","act_60":"#/components/schemas/Act60ProductEntity","act_60_amendment":"#/components/schemas/Act60AmendmentProductEntity","certificate_of_organization":"#/components/schemas/DocumentProductEntity","articles_of_incorporation":"#/components/schemas/DocumentProductEntity","ein_letter":"#/components/schemas/DocumentProductEntity","operating_agreement_bylaws":"#/components/schemas/DocumentProductEntity","department_of_state_registrations":"#/components/schemas/DocumentProductEntity","treasury_suri_registration":"#/components/schemas/DocumentProductEntity","child_support_registration":"#/components/schemas/DocumentProductEntity","crim_registration":"#/components/schemas/DocumentProductEntity","state_insurance_fund_registration":"#/components/schemas/DocumentProductEntity","labor_human_resources_registration":"#/components/schemas/DocumentProductEntity","incentives_portal_registration":"#/components/schemas/DocumentProductEntity","merchants_registration_certificate":"#/components/schemas/DocumentProductEntity","single_permit_application":"#/components/schemas/DocumentProductEntity","provisional_municipal_license_tax":"#/components/schemas/DocumentProductEntity","local_pr_bank_account":"#/components/schemas/DocumentProductEntity","manufacturers_id":"#/components/schemas/DocumentProductEntity","non_withholding_waiver":"#/components/schemas/DocumentProductEntity","municipal_decree":"#/components/schemas/DocumentProductEntity","sales_use_tax":"#/components/schemas/DocumentProductEntity","professional_services_rendered":"#/components/schemas/DocumentProductEntity","volume_of_business":"#/components/schemas/DocumentProductEntity","incentive_income_tax_return":"#/components/schemas/DocumentProductEntity","informative_returns":"#/components/schemas/DocumentProductEntity","personal_property_tax":"#/components/schemas/DocumentProductEntity","annual_report":"#/components/schemas/DocumentProductEntity","exempt_annual_report":"#/components/schemas/DocumentProductEntity","federal_income_tax_return":"#/components/schemas/DocumentProductEntity","irs_form_8898":"#/components/schemas/DocumentProductEntity","income_tax_return":"#/components/schemas/DocumentProductEntity","state_income_tax_return":"#/components/schemas/DocumentProductEntity","filing_extension":"#/components/schemas/DocumentProductEntity","tourism_tax_credit":"#/components/schemas/TourismTaxCreditProductEntity","financing":"#/components/schemas/DocumentProductEntity","federal_grant":"#/components/schemas/DocumentProductEntity","eif_grant":"#/components/schemas/DocumentProductEntity","me_grant":"#/components/schemas/DocumentProductEntity","other_grant":"#/components/schemas/DocumentProductEntity","ad_hoc_foundational_services":"#/components/schemas/DocumentProductEntity","ad_hoc_incentives":"#/components/schemas/DocumentProductEntity","ad_hoc_tax_compliance":"#/components/schemas/DocumentProductEntity","ad_hoc_tax_credits":"#/components/schemas/DocumentProductEntity","ad_hoc_financing":"#/components/schemas/DocumentProductEntity","ad_hoc_local_grants":"#/components/schemas/DocumentProductEntity","ad_hoc_federal_grants":"#/components/schemas/DocumentProductEntity","custom":"#/components/schemas/DocumentProductEntity"}}}},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"archivedAt":{"format":"date-time","type":["string","null"]},"masterFolderUrl":{"type":["string","null"]},"pendingReviewCount":{"type":"number"},"pendingDocumentsReviewCount":{"type":"number"},"unreadEmailsCount":{"type":"number"},"sourceProspectId":{"type":["string","null"]},"primaryContact":{"description":"Recipient DECA sends signable documents to: a business keeps it in the business profile's primary point of contact, an individual in the individual profile's contact information. Null until one carries an email — the Agreements tab blocks creating agreements while it is.","anyOf":[{"$ref":"#/components/schemas/OrgPrimaryContactDto"},{"type":"null"}]}},"required":["id","entityType","status","onHoldReason","name","legalName","domain","address","assignedAdminId","assignedAdmin","secondaryKam","users","nickname","products","createdAt","updatedAt","archivedAt","masterFolderUrl","pendingReviewCount","pendingDocumentsReviewCount","unreadEmailsCount","sourceProspectId","primaryContact"]},"ResponsibilityAssignmentFilterDto":{"type":"object","properties":{"role":{"allOf":[{"$ref":"#/components/schemas/OrgResponsibilityRole"}]},"userId":{"type":"string"}},"required":["role","userId"]},"GroupedOrganizationsItem":{"type":"object","properties":{"nickname":{"$ref":"#/components/schemas/NicknameEntity"},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationEntity"}}},"required":["nickname","organizations"]},"OrganizationQuickSearchItemDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"nickname":{"type":"string","description":"The nickname's name."}},"required":["id","name","nickname"]},"OrganizationQuickSearchDto":{"type":"object","properties":{"organizations":{"description":"The best 20 matches, best first: a name or nickname starting with the search, then those holding every word as typed, then the ones matched with a typo.","type":"array","items":{"$ref":"#/components/schemas/OrganizationQuickSearchItemDto"}},"hasMore":{"type":"boolean","description":"More organizations match than `organizations` holds."}},"required":["organizations","hasMore"]},"OrganizationExportSection":{"type":"string","enum":["organization","business_profile","clients","contacts"]},"OrganizationExportRowDto":{"type":"object","properties":{"id":{"type":"string"},"entityType":{"type":"string","enum":["business","individual"]},"status":{"allOf":[{"$ref":"#/components/schemas/OrganizationStatus"}]},"onHoldReason":{"type":["string","null"]},"name":{"type":"string"},"legalName":{"type":["string","null"]},"assignedAdmin":{"anyOf":[{"$ref":"#/components/schemas/AssignedUserEntity"},{"type":"null"}]},"secondaryKam":{"anyOf":[{"$ref":"#/components/schemas/AssignedUserEntity"},{"type":"null"}]},"nickname":{"$ref":"#/components/schemas/NicknameEntity"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","entityType","status","onHoldReason","name","legalName","assignedAdmin","secondaryKam","nickname","createdAt","updatedAt"]},"ProspectRegistrationLocation":{"type":"string","enum":["puerto_rico","us_mainland","international"]},"ProspectDecreeStatus":{"type":"string","enum":["issued_and_accepted","submitted_not_approved","none_filed"]},"ProspectBusinessDecreeType":{"type":"string","enum":["act_60","act_73","act_20","act_83","act_74","other"]},"OptionalAddressEntity":{"type":"object","properties":{"addressLine1":{"type":["string","null"]},"addressLine2":{"type":["string","null"]},"city":{"type":["string","null"]},"region":{"type":["string","null"]},"postalCode":{"type":["string","null"]},"country":{"type":["string","null"]}},"required":["addressLine1","addressLine2","city","region","postalCode","country"]},"ProspectIndustry":{"type":"string","enum":["technology","finance","healthcare","manufacturing","retail","real_estate","energy","transportation","agriculture","construction","entertainment","hospitality","biotechnology","film","other"]},"ProspectTaxCreditType":{"type":"string","enum":["rnd","hospitality_tourism","film"]},"ProspectAssistanceAnswer":{"type":"string","enum":["yes","no","unsure"]},"BusinessProfileContactEntity":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"type":["string","null"]},"relationship":{"type":["string","null"]},"isAuthorizedSigner":{"type":"boolean"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id","fullName","relationship","isAuthorizedSigner","email","phone"]},"OrganizationExportOwnerDto":{"type":"object","properties":{"fullName":{"type":"string"},"ssnOrEin":{"type":["string","null"]},"ownerType":{"type":["string","null"],"enum":["individual","entity",null]},"ownerEmail":{"type":["string","null"]},"ownerPhone":{"type":["string","null"]},"ownershipPercentage":{"type":"number"}},"required":["fullName","ssnOrEin","ownerType","ownerEmail","ownerPhone","ownershipPercentage"]},"OrganizationExportBusinessProfileDto":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"legalBusinessName":{"type":["string","null"]},"ein":{"type":["string","null"]},"registerNumber":{"type":["string","null"]},"dosRegistrationPending":{"type":["boolean","null"]},"isLegallyRegistered":{"type":["boolean","null"]},"registrationLocations":{"type":"array","items":{"$ref":"#/components/schemas/ProspectRegistrationLocation"}},"registrationState":{"type":["string","null"]},"registrationCountry":{"type":["string","null"]},"dosRegistrationDate":{"format":"date-time","type":["string","null"]},"incorporationCountry":{"type":["string","null"]},"incorporationState":{"type":["string","null"]},"organizationType":{"type":["string","null"],"enum":["corporation","limited_liability_company","partnership","sole_proprietor","other",null]},"otherOrganizationType":{"type":["string","null"]},"taxationMethod":{"type":["string","null"],"enum":["corporation","individual","partnership","other",null]},"otherTaxationMethod":{"type":["string","null"]},"corporateResidency":{"type":["string","null"],"enum":["domestic_pr","foreign_usa","foreign_non_usa",null]},"companyCreationDate":{"format":"date-time","type":["string","null"]},"commencementOfOperations":{"format":"date-time","type":["string","null"]},"fiscalYearEnd":{"type":["string","null"],"example":"Dec-31","description":"MMM-DD, no year"},"decreeStatus":{"anyOf":[{"$ref":"#/components/schemas/ProspectDecreeStatus"},{"type":"null"}]},"taxExemptionGrantNumber":{"type":["string","null"]},"decreeType":{"anyOf":[{"$ref":"#/components/schemas/ProspectBusinessDecreeType"},{"type":"null"}]},"decreeSubmissionDate":{"format":"date-time","type":["string","null"]},"decreeApprovalDate":{"format":"date-time","type":["string","null"]},"businessEmail":{"type":["string","null"]},"businessPhoneNumber":{"type":["string","null"]},"websiteUrl":{"type":["string","null"]},"isDba":{"type":["boolean","null"]},"dbaName":{"type":["string","null"]},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"postalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"pocFullName":{"type":["string","null"]},"pocRelationWithCompany":{"type":["string","null"]},"pocEmail":{"type":["string","null"]},"pocPhoneNumber":{"type":["string","null"]},"isSubsidiary":{"type":["boolean","null"]},"parentCompanyName":{"type":["string","null"]},"parentCompanyAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"isOperatingInPr":{"type":["boolean","null"]},"industries":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndustry"}},"otherIndustryDescription":{"type":["string","null"]},"taxCreditsReceived":{"type":"array","items":{"$ref":"#/components/schemas/ProspectTaxCreditType"}},"noTaxCreditsIssued":{"type":["boolean","null"]},"performsRnd":{"type":["boolean","null"]},"performedRnd":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"rndSpendCurrentYear":{"type":["number","null"]},"rndSpendNextYear":{"type":["number","null"]},"receivedFederalGrants":{"type":["boolean","null"]},"federalGrantFundingReceived":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"businessDescription":{"type":["string","null"]},"masterFolderUrl":{"type":["string","null"]},"clientSavedAt":{"format":"date-time","type":["string","null"],"description":"The client's last save of the form; null until then, while the form starts from the prospect's answers."},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/BusinessProfileContactEntity"}},"owners":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationExportOwnerDto"}}},"required":["id","orgId","legalBusinessName","ein","registerNumber","dosRegistrationPending","isLegallyRegistered","registrationLocations","registrationState","registrationCountry","dosRegistrationDate","incorporationCountry","incorporationState","organizationType","otherOrganizationType","taxationMethod","otherTaxationMethod","corporateResidency","companyCreationDate","commencementOfOperations","fiscalYearEnd","decreeStatus","taxExemptionGrantNumber","decreeType","decreeSubmissionDate","decreeApprovalDate","businessEmail","businessPhoneNumber","websiteUrl","isDba","dbaName","physicalAddress","postalAddress","pocFullName","pocRelationWithCompany","pocEmail","pocPhoneNumber","isSubsidiary","parentCompanyName","parentCompanyAddress","isOperatingInPr","industries","otherIndustryDescription","taxCreditsReceived","noTaxCreditsIssued","performsRnd","performedRnd","rndSpendCurrentYear","rndSpendNextYear","receivedFederalGrants","federalGrantFundingReceived","businessDescription","masterFolderUrl","clientSavedAt","createdAt","updatedAt","contacts","owners"]},"OrganizationExportClientDto":{"type":"object","properties":{"orgId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"state":{"allOf":[{"$ref":"#/components/schemas/UserState"}]},"phoneNumber":{"type":["string","null"]}},"required":["orgId","name","email","state","phoneNumber"]},"OrganizationExportContactDto":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"orgId":{"type":"string"}},"required":["id","fullName","email","phone","createdAt","updatedAt","orgId"]},"OrganizationsExportDto":{"type":"object","properties":{"organizations":{"description":"Every organization matching the list filters.","type":"array","items":{"$ref":"#/components/schemas/OrganizationExportRowDto"}},"businessProfiles":{"description":"Only for the business_profile section, and only the profiles the current user may read. Empty when the section was not requested.","type":"array","items":{"$ref":"#/components/schemas/OrganizationExportBusinessProfileDto"}},"restrictedBusinessProfileOrgIds":{"description":"Organizations whose business profile the current user may not read, so the sheet can tell withheld from not saved. Empty when the section was not requested.","type":"array","items":{"type":"string"}},"clients":{"description":"Client users of the exported organizations. Empty when the clients section was not requested.","type":"array","items":{"$ref":"#/components/schemas/OrganizationExportClientDto"}},"contacts":{"description":"Points of contact of the exported organizations. Empty when the contacts section was not requested.","type":"array","items":{"$ref":"#/components/schemas/OrganizationExportContactDto"}}},"required":["organizations","businessProfiles","restrictedBusinessProfileOrgIds","clients","contacts"]},"UpdateOrganizationDto":{"type":"object","properties":{"name":{"type":"string"},"legalName":{"type":"string"},"domain":{"type":"string"},"address":{"type":"string"},"assignedAdminId":{"type":["string","null"],"description":"Primary key account manager. Must be an active or invited admin or super admin, checked only when the value changes — an existing holder who no longer qualifies is kept."},"userIds":{"type":"array","items":{"type":"string"}},"newNickname":{"type":"string","minLength":1,"maxLength":255,"description":"Nickname to create and link, when `nicknameId` is omitted. Wins over `nicknameId` when both are sent."},"nicknameId":{"type":"string","description":"Nickname to link. Mandatory for every organization, so it can be reassigned but never cleared."}}},"ManualOrganizationStatus":{"type":"string","enum":["active","on_hold"]},"UpdateOrganizationStatusDto":{"type":"object","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/ManualOrganizationStatus"}]},"reason":{"type":"string","maxLength":1000,"description":"Mandatory when status is on_hold; ignored otherwise."}},"required":["status"]},"UpdateOrganizationLabelDto":{"type":"object","properties":{"labelId":{"type":["string","null"],"description":"The label to apply, or null to take the current one off. Required rather than optional, so clearing is an explicit act."}},"required":["labelId"]},"BaseOrgProductEntity":{"type":"object","properties":{"orgProductId":{"type":"string"},"productId":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"name":{"type":"string"},"description":{"type":["string","null"]},"requiresYear":{"type":"boolean"},"year":{"type":["number","null"]},"department":{"allOf":[{"$ref":"#/components/schemas/ProductDepartment"}]},"periodicity":{"anyOf":[{"$ref":"#/components/schemas/ProductPeriodicity"},{"type":"null"}]},"periodValue":{"type":["number","null"]},"isMultiInstance":{"type":"boolean"},"startDate":{"type":["string","null"],"format":"date","description":"When an \"every N years\" product starts running here"},"deadline":{"type":["string","null"],"format":"date","description":"The day the service is due, in Puerto Rico time"},"extendedDate":{"type":["string","null"],"format":"date","description":"The day the deadline is extended to; null when the product is not extendable, there is no deadline, or it is not after the deadline"},"isDeadlineOverridden":{"type":"boolean","description":"`deadline` was typed on the service; otherwise it follows the product's Deadline rule and moves with it"},"isExtendedDateOverridden":{"type":"boolean","description":"`extendedDate` was typed on the service; otherwise it follows the product's Extended date rule"},"productDeadline":{"type":["string","null"],"format":"date","description":"The deadline the product's Deadline rule gives the service, which `deadline` holds while it is not typed; null with no rule"},"productExtendedDate":{"type":["string","null"],"format":"date","description":"The Extended date the product's rules give the service, counted from `productDeadline`; null with no rule or when the product is not extendable"},"isExtendable":{"type":"boolean","description":"The product lets its services carry an Extended date"},"isExtensionFiled":{"type":"boolean","description":"The service has been in Extension Submitted, so its deadline reminders have stopped; it stays set after the service moves on"},"hasCustomName":{"type":"boolean"},"isTaxCreditApplication":{"type":"boolean"},"hasTimeLog":{"type":"boolean","description":"The product logs time against each service"},"hasRates":{"type":"boolean","description":"The product prices logged time at the organization's hourly rate"},"instanceName":{"type":["string","null"]},"progress":{"type":"number","minimum":0,"maximum":100},"status":{"allOf":[{"$ref":"#/components/schemas/OrgProductStatus"}]},"adminStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentAdminStatus"},{"type":"null"}]},"availableAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentAdminStatus"}},"restrictedAdminStatuses":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentAdminStatus"}},"adminStatusRestrictionReason":{"type":["string","null"]},"clientStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentClientStatus"},{"type":"null"}]},"locked":{"type":"boolean"},"hasQuestionnaireCopy":{"type":"boolean","description":"True when the product was assigned with its questionnaire switched on: the organization holds its own copy"},"isQuestionnaireSetUp":{"type":"boolean","description":"The organization's copy was saved once, or is past Backlog (or never in it); false without a copy"},"isQuestionnaireNew":{"type":"boolean","description":"The questionnaire was edited for this organization since the client last opened it"},"clientStatusFilter":{"anyOf":[{"$ref":"#/components/schemas/ClientStatusFilter"},{"type":"null"}]},"inactivityLevel":{"anyOf":[{"$ref":"#/components/schemas/ServiceInactivityLevel"},{"type":"null"}]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"lastActivityAt":{"format":"date-time","type":"string"},"pendingReviewCount":{"type":"number"},"pendingDocumentsReviewCount":{"type":"number"},"submissionId":{"type":["string","null"]},"submittedAt":{"format":"date-time","type":["string","null"]},"submittedByName":{"type":["string","null"]},"reportGeneratedAt":{"format":"date-time","type":["string","null"]},"reportGeneratedByName":{"type":["string","null"]},"notesCount":{"type":"number"},"unreadThreadCount":{"type":["number","null"]},"unreviewedActivityCount":{"type":["number","null"]},"assignedAdmins":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AssignedUserEntity"}}},"required":["orgProductId","productId","type","name","description","requiresYear","year","department","periodicity","periodValue","isMultiInstance","startDate","deadline","extendedDate","isDeadlineOverridden","isExtendedDateOverridden","productDeadline","productExtendedDate","isExtendable","isExtensionFiled","hasCustomName","isTaxCreditApplication","hasTimeLog","hasRates","instanceName","progress","status","adminStatus","availableAdminStatuses","restrictedAdminStatuses","adminStatusRestrictionReason","clientStatus","locked","hasQuestionnaireCopy","isQuestionnaireSetUp","isQuestionnaireNew","clientStatusFilter","inactivityLevel","createdAt","updatedAt","lastActivityAt","pendingReviewCount","pendingDocumentsReviewCount","submissionId","submittedAt","submittedByName","reportGeneratedAt","reportGeneratedByName","notesCount","unreadThreadCount","unreviewedActivityCount","assignedAdmins"]},"AddProductDto":{"type":"object","properties":{"productId":{"type":"string"},"year":{"type":"number"},"periodValue":{"type":"number","description":"Period selector: month (1-12) for monthly products, quarter (1-4) for quarterly products."},"name":{"type":"string","maxLength":255,"description":"Custom instance name (required for custom-named products); unique among the organization's services of the product, ignoring case."},"hourlyRate":{"type":"number","description":"Hourly rate in USD, required for a product with rates and dropped for any other (0 allowed)."}},"required":["productId"]},"AddMultipleProductsDto":{"type":"object","properties":{"products":{"description":"Array of products to add to the organization","type":"array","items":{"$ref":"#/components/schemas/AddProductDto"}}},"required":["products"]},"GroupedOrgProductsDto":{"type":"object","properties":{"key":{"allOf":[{"$ref":"#/components/schemas/ProductDepartment"}]},"products":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/RndTaxCreditProductEntity"},{"$ref":"#/components/schemas/RndTaxCreditAmendmentProductEntity"},{"$ref":"#/components/schemas/Act60ProductEntity"},{"$ref":"#/components/schemas/Act60AmendmentProductEntity"},{"$ref":"#/components/schemas/DocumentProductEntity"},{"$ref":"#/components/schemas/TourismTaxCreditProductEntity"}],"discriminator":{"propertyName":"type","mapping":{"rnd_tax_credit":"#/components/schemas/RndTaxCreditProductEntity","rnd_tax_credit_amendment":"#/components/schemas/RndTaxCreditAmendmentProductEntity","act_60":"#/components/schemas/Act60ProductEntity","act_60_amendment":"#/components/schemas/Act60AmendmentProductEntity","certificate_of_organization":"#/components/schemas/DocumentProductEntity","articles_of_incorporation":"#/components/schemas/DocumentProductEntity","ein_letter":"#/components/schemas/DocumentProductEntity","operating_agreement_bylaws":"#/components/schemas/DocumentProductEntity","department_of_state_registrations":"#/components/schemas/DocumentProductEntity","treasury_suri_registration":"#/components/schemas/DocumentProductEntity","child_support_registration":"#/components/schemas/DocumentProductEntity","crim_registration":"#/components/schemas/DocumentProductEntity","state_insurance_fund_registration":"#/components/schemas/DocumentProductEntity","labor_human_resources_registration":"#/components/schemas/DocumentProductEntity","incentives_portal_registration":"#/components/schemas/DocumentProductEntity","merchants_registration_certificate":"#/components/schemas/DocumentProductEntity","single_permit_application":"#/components/schemas/DocumentProductEntity","provisional_municipal_license_tax":"#/components/schemas/DocumentProductEntity","local_pr_bank_account":"#/components/schemas/DocumentProductEntity","manufacturers_id":"#/components/schemas/DocumentProductEntity","non_withholding_waiver":"#/components/schemas/DocumentProductEntity","municipal_decree":"#/components/schemas/DocumentProductEntity","sales_use_tax":"#/components/schemas/DocumentProductEntity","professional_services_rendered":"#/components/schemas/DocumentProductEntity","volume_of_business":"#/components/schemas/DocumentProductEntity","incentive_income_tax_return":"#/components/schemas/DocumentProductEntity","informative_returns":"#/components/schemas/DocumentProductEntity","personal_property_tax":"#/components/schemas/DocumentProductEntity","annual_report":"#/components/schemas/DocumentProductEntity","exempt_annual_report":"#/components/schemas/DocumentProductEntity","federal_income_tax_return":"#/components/schemas/DocumentProductEntity","irs_form_8898":"#/components/schemas/DocumentProductEntity","income_tax_return":"#/components/schemas/DocumentProductEntity","state_income_tax_return":"#/components/schemas/DocumentProductEntity","filing_extension":"#/components/schemas/DocumentProductEntity","tourism_tax_credit":"#/components/schemas/TourismTaxCreditProductEntity","financing":"#/components/schemas/DocumentProductEntity","federal_grant":"#/components/schemas/DocumentProductEntity","eif_grant":"#/components/schemas/DocumentProductEntity","me_grant":"#/components/schemas/DocumentProductEntity","other_grant":"#/components/schemas/DocumentProductEntity","ad_hoc_foundational_services":"#/components/schemas/DocumentProductEntity","ad_hoc_incentives":"#/components/schemas/DocumentProductEntity","ad_hoc_tax_compliance":"#/components/schemas/DocumentProductEntity","ad_hoc_tax_credits":"#/components/schemas/DocumentProductEntity","ad_hoc_financing":"#/components/schemas/DocumentProductEntity","ad_hoc_local_grants":"#/components/schemas/DocumentProductEntity","ad_hoc_federal_grants":"#/components/schemas/DocumentProductEntity","custom":"#/components/schemas/DocumentProductEntity"}}}}},"required":["key","products"]},"AssignProductAdminsDto":{"type":"object","properties":{"assignedAdminIds":{"maxItems":2,"description":"Admin users responsible for the product; pass an empty array to unassign","type":"array","items":{"type":"string"}}},"required":["assignedAdminIds"]},"RenameOrgProductDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255}},"required":["name"]},"UpdateOrgProductStartDateDto":{"type":"object","properties":{"startDate":{"type":["string","null"],"format":"date","description":"When the \"every N years\" product starts running; null clears it"}},"required":["startDate"]},"UpdateOrgProductDeadlineDto":{"type":"object","properties":{"deadline":{"type":["string","null"],"format":"date","description":"The day this service is due, in Puerto Rico time; null follows the product's Deadline rule (none without one)"},"extendedDate":{"type":["string","null"],"format":"date","description":"The day this service's deadline is extended to: after the deadline in use (this one's or the product's), and refused when the product is not extendable (`isExtendable`), whose hidden one is kept while it is after the deadline in use; null follows the product's Extended date rule"}},"required":["deadline","extendedDate"]},"UpdateAdminStatusDto":{"type":"object","properties":{"adminStatus":{"description":"Layer-3 admin status. Valid values depend on the department; the server rejects statuses outside the department’s list.","allOf":[{"$ref":"#/components/schemas/DepartmentAdminStatus"}]}},"required":["adminStatus"]},"AmendmentMetadataEntity":{"type":"object","properties":{"amendmentType":{"anyOf":[{"$ref":"#/components/schemas/Act60AmendmentType"},{"type":"null"}]},"sourceOrgProductId":{"type":["string","null"]},"rowIdMap":{"type":["object","null"],"additionalProperties":{"type":"string"}},"organizationId":{"type":"string"}},"required":["amendmentType","sourceOrgProductId","rowIdMap","organizationId"]},"SetAmendmentTypeDto":{"type":"object","properties":{"amendmentType":{"type":"string","enum":["approved_with_act60","non_approved_with_act60","approved_external","non_approved_external"]}},"required":["amendmentType"]},"SubmitAmendmentUploadDto":{"type":"object","properties":{"fileStorageKeys":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"amendmentType":{"type":"string","enum":["approved_with_act60","non_approved_with_act60","approved_external","non_approved_external"]}},"required":["fileStorageKeys"]},"AssignUsersDto":{"type":"object","properties":{"userIds":{"type":"array","items":{"type":"string"}}},"required":["userIds"]},"OrgUserEntity":{"type":"object","properties":{"userType":{"allOf":[{"$ref":"#/components/schemas/UserType"}]},"permissionTemplateId":{"type":["string","null"]},"permissionTemplate":{"description":"Permission template assigned to user","anyOf":[{"$ref":"#/components/schemas/PermissionTemplateSummaryDto"},{"type":"null"}]},"permissions":{"type":["array","null"],"description":"Custom permissions for this user (overrides template)","items":{"$ref":"#/components/schemas/Permission"}},"id":{"type":"string"},"orgId":{"type":"string"},"userId":{"type":"string"},"notificationsEnabled":{"type":"boolean"},"isAssignedAdmin":{"type":"boolean"},"isSecondaryKam":{"type":"boolean"},"name":{"type":"string"},"email":{"type":"string"},"image":{"type":["string","null"]},"state":{"allOf":[{"$ref":"#/components/schemas/UserState"}]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["userType","permissionTemplateId","permissionTemplate","permissions","id","orgId","userId","notificationsEnabled","isAssignedAdmin","isSecondaryKam","name","email","image","state","createdAt","updatedAt"]},"UpdateOrgUserDto":{"type":"object","properties":{"notificationsEnabled":{"type":"boolean"}}},"ProductWorkflowStatus":{"type":"string","enum":["client_information_approved","client_information_needs_revision","final_report_in_progress","final_report_submitted_to_ddec","final_report_approved_by_ddec","approved_by_government","client_information_in_review"]},"ProductSubmissionOrgDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"ProductSubmissionProductDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"name":{"type":"string"}},"required":["id","type","name"]},"ProductSubmissionOrgProductDto":{"type":"object","properties":{"id":{"type":"string"},"org":{"$ref":"#/components/schemas/ProductSubmissionOrgDto"},"product":{"$ref":"#/components/schemas/ProductSubmissionProductDto"}},"required":["id","org","product"]},"ProductSubmissionSubmitterDto":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"}},"required":["id","email","name"]},"ProductSubmissionEntity":{"type":"object","properties":{"id":{"type":"string"},"orgProductId":{"type":"string"},"status":{"anyOf":[{"$ref":"#/components/schemas/ProductWorkflowStatus"},{"type":"null"}]},"part":{"anyOf":[{"$ref":"#/components/schemas/ProductSubmissionPart"},{"type":"null"}]},"submittedById":{"type":["string","null"]},"submittedAt":{"format":"date-time","type":"string"},"approvedByGovernmentAt":{"format":"date-time","type":["string","null"]},"approvedByGovernmentById":{"type":["string","null"]},"orgProduct":{"$ref":"#/components/schemas/ProductSubmissionOrgProductDto"},"submittedBy":{"anyOf":[{"$ref":"#/components/schemas/ProductSubmissionSubmitterDto"},{"type":"null"}]}},"required":["id","orgProductId","status","part","submittedById","submittedAt","approvedByGovernmentAt","approvedByGovernmentById","orgProduct","submittedBy"]},"ProductSubmissionListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProductSubmissionEntity"}},"total":{"type":"number"},"page":{"type":"number"},"size":{"type":"number"},"totalPages":{"type":"number"}},"required":["data","total","page","size","totalPages"]},"UpdateSubmissionStatusDto":{"type":"object","properties":{"status":{"description":"The workflow status of the product submission","allOf":[{"$ref":"#/components/schemas/ProductWorkflowStatus"}]}},"required":["status"]},"NoteAuthorEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"image":{"type":["string","null"]},"state":{"allOf":[{"$ref":"#/components/schemas/UserState"}]}},"required":["id","name","email","image","state"]},"OrgProductNoteEntity":{"type":"object","properties":{"id":{"type":"string"},"createdById":{"type":["string","null"]},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/NoteAuthorEntity"},{"type":"null"}]},"content":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"title":{"type":["string","null"]},"source":{"type":["string","null"],"enum":["scribe",null]},"meetingDate":{"format":"date-time","type":["string","null"]},"participants":{"type":"array","items":{"type":"string"}},"replyCount":{"type":"number"},"lastReplyAt":{"format":"date-time","type":["string","null"]},"lastRepliers":{"type":"array","items":{"$ref":"#/components/schemas/NoteAuthorEntity"}},"hasUnread":{"type":"boolean"},"orgProductId":{"type":"string"}},"required":["id","createdById","createdBy","content","createdAt","updatedAt","title","source","meetingDate","participants","replyCount","lastReplyAt","lastRepliers","hasUnread","orgProductId"]},"CreateNoteWithMentionsDto":{"type":"object","properties":{"content":{"type":"string","maxLength":50000,"description":"Sanitised rich text: at most 5000 characters of visible text — markup does not count — and 50000 of HTML."}},"required":["content"]},"UpdateNoteWithMentionsDto":{"type":"object","properties":{"content":{"type":"string","maxLength":50000,"description":"Sanitised rich text: at most 5000 characters of visible text — markup does not count — and 50000 of HTML."}},"required":["content"]},"NoteReplyEntity":{"type":"object","properties":{"id":{"type":"string"},"createdById":{"type":["string","null"]},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/NoteAuthorEntity"},{"type":"null"}]},"content":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"title":{"type":["string","null"]},"source":{"type":["string","null"],"enum":["scribe",null]},"meetingDate":{"format":"date-time","type":["string","null"]},"participants":{"type":"array","items":{"type":"string"}}},"required":["id","createdById","createdBy","content","createdAt","updatedAt","title","source","meetingDate","participants"]},"MarkNoteThreadReadDto":{"type":"object","properties":{"lastReadAt":{"format":"date-time","type":"string"}},"required":["lastReadAt"]},"SystemLogActorType":{"type":"string","enum":["admin","customer","system"]},"SystemLogEntityType":{"type":"string","enum":["User","Organization","BusinessProfile","OrgProduct","Product","ProductSubmission","Report","PermissionTemplate","Act60BusinessSummary","Act60IndividualSummary","Act60Manufacturing","Act60Export","Act60Tourism","Act60HardToRecruit","Act60PrivateEquity","Act60YoungEntrepreneur","ProductDocument","IndividualProfile","Act60Amendment","Prospect","ProspectMeeting","ProspectBookingLink","GoogleWorkspaceConnection","CalendarEventLink","ProspectNote","ProspectDocumentSectionNote","ProspectNotesSummary","ProspectAiSummary","ProspectEmail","OrgEmail","EmailThread","Aup","OrganizationDocument","OrganizationTask","OrganizationAiSummary","FinanceAiSummary","FinanceArUpload","FinanceQbCustomerLink","FinanceIndividualSummary","Nickname","NicknameMeeting","NicknameMeetingNote","MeetingAgenda","OrganizationLabel","ExpensePaymentMethod","OrganizationNote","OrgProductNote","Analytics","Announcement","DdecOfficer"]},"OrgProductActivityEntryDto":{"type":"object","properties":{"id":{"type":"string"},"actorName":{"type":"string"},"actorImage":{"type":["string","null"]},"description":{"type":"string"},"timestamp":{"format":"date-time","type":"string"},"changes":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"oldValue":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]},{"type":"null"}]},"newValue":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]},{"type":"null"}]},"label":{"type":"string"}},"required":["label"]}},"actorType":{"allOf":[{"$ref":"#/components/schemas/SystemLogActorType"}]},"entityType":{"anyOf":[{"$ref":"#/components/schemas/SystemLogEntityType"},{"type":"null"}]},"isStatusChange":{"type":"boolean"},"isNew":{"type":"boolean"},"documents":{"type":["array","null"],"items":{"$ref":"#/components/schemas/DocumentInfoDto"}}},"required":["id","actorName","actorImage","description","timestamp","changes","actorType","entityType","isStatusChange","isNew","documents"]},"OrgProductActivityResponseDto":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/OrgProductActivityEntryDto"}}},"required":["meta","data"]},"OrgProductTimeLogSummaryDto":{"type":"object","properties":{"hourlyRate":{"type":["number","null"],"format":"decimal","description":"The organization's hourly rate; null without rates or before one is set"},"totalMinutes":{"type":"number"}},"required":["hourlyRate","totalMinutes"]},"UpdateOrgProductHourlyRateDto":{"type":"object","properties":{"hourlyRate":{"type":"number","minimum":0,"description":"The organization's hourly rate in USD, 0 allowed."}},"required":["hourlyRate"]},"OrgProductTimeLogDto":{"type":"object","properties":{"id":{"type":"string"},"minutes":{"type":"number"},"description":{"type":["string","null"]},"workDate":{"type":"string","format":"date","description":"The day the work was done (YYYY-MM-DD)."},"createdAt":{"format":"date-time","type":"string"},"user":{"anyOf":[{"$ref":"#/components/schemas/UserSummaryEntity"},{"type":"null"}]},"editedAt":{"format":"date-time","type":["string","null"]},"editedBy":{"anyOf":[{"$ref":"#/components/schemas/UserSummaryEntity"},{"type":"null"}]},"isLocked":{"type":"boolean","description":"The entry is on an ad hoc record already billed, which keeps the hours it was invoiced for: it can no longer be edited or deleted."}},"required":["id","minutes","description","workDate","createdAt","user","editedAt","editedBy","isLocked"]},"OrgProductTimeLogsResponseDto":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/OrgProductTimeLogDto"}}},"required":["meta","data"]},"OrgProductTimeLogEntryDto":{"type":"object","properties":{"minutes":{"type":"number","minimum":15,"maximum":1440,"description":"Time worked in minutes."},"workDate":{"type":"string","format":"date","description":"The day the work was done (YYYY-MM-DD), never in the future."},"description":{"type":"string","minLength":50,"maxLength":1000}},"required":["minutes","workDate","description"]},"UpdateOrgProductTimeLogEntryDto":{"type":"object","properties":{"minutes":{"type":"number","minimum":15,"maximum":1440,"description":"Time worked in minutes."},"workDate":{"type":"string","format":"date","description":"The day the work was done (YYYY-MM-DD), never in the future."},"description":{"type":"string","minLength":50,"maxLength":1000}}},"WorkLogServiceDto":{"type":"object","properties":{"orgProductId":{"type":"string"},"name":{"type":"string"},"department":{"allOf":[{"$ref":"#/components/schemas/ProductDepartment"}]},"organization":{"$ref":"#/components/schemas/OrganizationRefDto"}},"required":["orgProductId","name","department","organization"]},"WorkLogServiceListDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WorkLogServiceDto"}},"isTruncated":{"type":"boolean","description":"More services qualify than the list holds; the rest are left out."}},"required":["data","isTruncated"]},"WorkLogServiceFilterOptionsDto":{"type":"object","properties":{"organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationRefDto"}},"isTruncated":{"type":"boolean","description":"More rows exist than the options list; the rest are left out."},"services":{"type":"array","items":{"$ref":"#/components/schemas/WorkLogServiceDto"}}},"required":["organizations","isTruncated","services"]},"WorkLogOrganizationFilterOptionsDto":{"type":"object","properties":{"organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationRefDto"}},"isTruncated":{"type":"boolean","description":"More rows exist than the options list; the rest are left out."}},"required":["organizations","isTruncated"]},"WorkLogFilterOptionsDto":{"type":"object","properties":{"hours":{"$ref":"#/components/schemas/WorkLogServiceFilterOptionsDto"},"personalExpenses":{"$ref":"#/components/schemas/WorkLogOrganizationFilterOptionsDto"},"organizationExpenses":{"$ref":"#/components/schemas/WorkLogServiceFilterOptionsDto"}},"required":["hours","personalExpenses","organizationExpenses"]},"ProfileTimeLogDto":{"type":"object","properties":{"id":{"type":"string"},"minutes":{"type":"number"},"workDate":{"type":"string","format":"date"},"description":{"type":["string","null"]},"service":{"$ref":"#/components/schemas/WorkLogServiceDto"},"isEditable":{"type":"boolean","description":"The service is still assigned to the current admin and its organization is not archived; otherwise the entry can no longer be edited or deleted."},"isLocked":{"type":"boolean","description":"The entry is on an ad hoc record already billed, which keeps the hours it was invoiced for: it can no longer be edited or deleted."}},"required":["id","minutes","workDate","description","service","isEditable","isLocked"]},"ProfileTimeLogsResponseDto":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProfileTimeLogDto"}}},"required":["meta","data"]},"CreateProfileTimeLogDto":{"type":"object","properties":{"minutes":{"type":"number","minimum":15,"maximum":1440,"description":"Time worked in minutes."},"workDate":{"type":"string","format":"date","description":"The day the work was done (YYYY-MM-DD), never in the future."},"description":{"type":"string","minLength":50,"maxLength":1000},"orgProductId":{"type":"string","format":"uuid","description":"A service assigned to the current admin, with Time Log on, on an organization that is not archived."}},"required":["minutes","workDate","description","orgProductId"]},"RndAupSectionDescriptor":{"type":"object","properties":{"key":{"type":"string","enum":["required_documents","engagement_letter","financial_model","aup_data","sample_selection","vouching","upload_certificate"]},"name":{"type":"string"},"status":{"type":"string","enum":["not_started","in_progress","completed"]}},"required":["key","name","status"]},"RndAupFinancialModelItemEntity":{"type":"object","properties":{"step":{"type":"string","enum":["universe_imported","eligible_population_mapped","internal_review","client_model_walkthrough","client_approval"]},"label":{"type":"string"},"completed":{"type":"boolean"},"note":{"type":["string","null"]},"updatedAt":{"format":"date-time","type":["string","null"]},"updatedById":{"type":["string","null"]}},"required":["step","label","completed","note","updatedAt","updatedById"]},"RndAupRequiredDocumentStatus":{"type":"string","enum":["pending","in_review","approved","non_applicable"]},"RndAupRequiredDocumentUploadEntity":{"type":"object","properties":{"id":{"type":"string"},"storageKey":{"type":"string"},"originalFilename":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"url":{"type":["string","null"]},"uploadedAt":{"format":"date-time","type":"string"},"uploadedById":{"type":["string","null"]}},"required":["id","storageKey","originalFilename","contentType","size","url","uploadedAt","uploadedById"]},"RndAupRequiredDocumentSectionEntity":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"sectionDescription":{"type":["string","null"]},"description":{"type":["string","null"]},"adminNote":{"type":["string","null"]},"status":{"allOf":[{"$ref":"#/components/schemas/RndAupRequiredDocumentStatus"}]},"submittedAt":{"format":"date-time","type":["string","null"],"description":"When the section was last sent for approval — by the client, or by an admin answering on their behalf. Null while it holds an unsent client draft, and a section is approved only once it is set."},"reRequestedAt":{"format":"date-time","type":["string","null"],"description":"When an admin last asked the client to re-upload or clarify this section; null once it leaves Pending"},"contentUpdatedAt":{"format":"date-time","type":["string","null"],"description":"When the files or the description last changed, by anyone. A re-requested section is submitted only once this is later than `reRequestedAt`."},"uploads":{"type":"array","items":{"$ref":"#/components/schemas/RndAupRequiredDocumentUploadEntity"}},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","name","sectionDescription","description","adminNote","status","submittedAt","reRequestedAt","contentUpdatedAt","uploads","updatedAt"]},"RndAupRequiredDocumentsDto":{"type":"object","properties":{"locked":{"type":"boolean","description":"True until both ledger documents are admin-approved. While locked, the content, upload, submit and request endpoints return 403 — for admins too."},"requestedAt":{"format":"date-time","type":["string","null"],"description":"When an admin last sent the document request. Null until then, and the client cannot fill the sections yet."},"sections":{"type":"array","items":{"$ref":"#/components/schemas/RndAupRequiredDocumentSectionEntity"}}},"required":["locked","requestedAt","sections"]},"RndAupEngagementLetterEntity":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending_upload","uploaded","sent_to_client","signed"]},"fileName":{"type":["string","null"]},"fileUrl":{"type":["string","null"]},"requestedAt":{"format":"date-time","type":"string"},"requestedById":{"type":["string","null"]},"uploadedAt":{"format":"date-time","type":["string","null"]},"uploadedById":{"type":["string","null"]},"sentAt":{"format":"date-time","type":["string","null"]},"sentById":{"type":["string","null"]},"recipientEmail":{"type":["string","null"]},"senderViewCompletedAt":{"format":"date-time","type":["string","null"]},"signedAt":{"format":"date-time","type":["string","null"]},"signedPdfUrl":{"type":["string","null"]},"sentPdfFileName":{"type":["string","null"],"description":"Name the PDF is sent under; null while the document has no name."}},"required":["id","status","fileName","fileUrl","requestedAt","requestedById","uploadedAt","uploadedById","sentAt","sentById","recipientEmail","senderViewCompletedAt","signedAt","signedPdfUrl","sentPdfFileName"]},"RndAupCertificateDto":{"type":"object","properties":{"id":{"type":"string"},"documentId":{"type":"string","description":"The document behind the certificate, which a review names so it settles the file that was looked at."},"file":{"anyOf":[{"$ref":"#/components/schemas/FileUploadResultEntity"},{"type":"null"}]},"isPendingReview":{"type":"boolean","description":"The upload is still filed for review, so the product carries its review badges until a DECA employee settles it."}},"required":["id","documentId","file","isPendingReview"]},"RndAupEntity":{"type":"object","properties":{"id":{"type":"string"},"orgProductId":{"type":"string"},"orgName":{"type":"string"},"productName":{"type":"string"},"year":{"type":["number","null"]},"amendmentNumber":{"type":["number","null"],"minimum":1},"sections":{"type":"array","items":{"$ref":"#/components/schemas/RndAupSectionDescriptor"}},"financialModel":{"type":"array","items":{"$ref":"#/components/schemas/RndAupFinancialModelItemEntity"}},"requiredDocuments":{"$ref":"#/components/schemas/RndAupRequiredDocumentsDto"},"engagementLetter":{"anyOf":[{"$ref":"#/components/schemas/RndAupEngagementLetterEntity"},{"type":"null"}]},"certificate":{"anyOf":[{"$ref":"#/components/schemas/RndAupCertificateDto"},{"type":"null"}]},"updatedAt":{"format":"date-time","type":"string"},"updatedById":{"type":["string","null"]}},"required":["id","orgProductId","orgName","productName","year","amendmentNumber","sections","financialModel","requiredDocuments","engagementLetter","certificate","updatedAt","updatedById"]},"RndAupFinancialModelStep":{"type":"string","enum":["universe_imported","eligible_population_mapped","internal_review","client_model_walkthrough","client_approval"]},"UpdateRndAupFinancialModelItemDto":{"type":"object","properties":{"completed":{"type":"boolean"},"note":{"type":["string","null"],"maxLength":50000,"description":"Sanitised rich text: at most 5000 characters of visible text — markup does not count — and 50000 of HTML. Send null to clear it."}}},"CreateRndAupRequiredDocumentSectionDto":{"type":"object","properties":{"name":{"type":"string","maxLength":5000},"sectionDescription":{"type":["string","null"],"maxLength":5000,"description":"Guidance shown to the client next to the section name"}},"required":["name"]},"UpdateRndAupRequiredDocumentSectionDto":{"type":"object","properties":{"name":{"type":"string","maxLength":5000},"sectionDescription":{"type":["string","null"],"maxLength":5000,"description":"Guidance shown to the client next to the section name"}}},"RndAupRequiredDocumentSectionIdsDto":{"type":"object","properties":{"sectionIds":{"maxItems":100,"type":"array","items":{"type":"string","format":"uuid"}}},"required":["sectionIds"]},"RndAupRequiredDocumentSectionFailureDto":{"type":"object","properties":{"sectionId":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"reason":{"type":"string"}},"required":["sectionId","name","reason"]},"RndAupRequiredDocumentSectionsBulkResultDto":{"type":"object","properties":{"succeededIds":{"type":"array","items":{"type":"string","format":"uuid"}},"failed":{"type":"array","items":{"$ref":"#/components/schemas/RndAupRequiredDocumentSectionFailureDto"}}},"required":["succeededIds","failed"]},"BulkUpdateRndAupRequiredDocumentStatusDto":{"type":"object","properties":{"sectionIds":{"maxItems":100,"type":"array","items":{"type":"string","format":"uuid"}},"status":{"allOf":[{"$ref":"#/components/schemas/RndAupRequiredDocumentStatus"}]}},"required":["sectionIds","status"]},"RndAupRequiredDocumentUploadDto":{"type":"object","properties":{"storageKey":{"type":"string"}},"required":["storageKey"]},"UpdateRndAupRequiredDocumentDto":{"type":"object","properties":{"description":{"type":["string","null"],"maxLength":5000},"uploads":{"maxItems":20,"description":"Files to append to the section. Existing files are kept unless listed in `removeUploadIds`.","type":"array","items":{"$ref":"#/components/schemas/RndAupRequiredDocumentUploadDto"}},"removeUploadIds":{"maxItems":20,"description":"Uploads of this section to remove in the same write — a replacement never leaves the section with neither file.","type":"array","items":{"type":"string","format":"uuid"}},"documentIds":{"maxItems":20,"description":"Documents of the organization's library to place in the section by their own stored files, never copied; removing one later leaves it in the library. One the section already holds is skipped. DECA only; refused while the product is in Backlog or withdrawn by the client, and for a document the client cannot see (named in the error).","type":"array","items":{"type":"string","format":"uuid"}}}},"UpdateRndAupRequiredDocumentAdminNoteDto":{"type":"object","properties":{"adminNote":{"type":["string","null"],"maxLength":50000,"description":"Sanitised rich text: at most 5000 characters of visible text — markup does not count — and 50000 of HTML. Send null to clear it."}},"required":["adminNote"]},"RndAupEmailTemplateDto":{"type":"object","properties":{"subject":{"type":"string"},"body":{"type":"string"}},"required":["subject","body"]},"RndAupRequiredDocumentsRequestRecipientSource":{"type":"string","enum":["client","poc"],"description":"A client user who is not suspended and holds `edit_aup` is listed as a client; everyone else with a contact record is listed as a point of contact, and their email links to a page asking them to contact DECA."},"RndAupRequiredDocumentsRequestRecipientDto":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"},"source":{"description":"A client user who is not suspended and holds `edit_aup` is listed as a client; everyone else with a contact record is listed as a point of contact, and their email links to a page asking them to contact DECA.","allOf":[{"$ref":"#/components/schemas/RndAupRequiredDocumentsRequestRecipientSource"}]}},"required":["email","name","source"]},"RndAupCpaRecipientDto":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}},"required":["email","name"]},"RequestRndAupRequiredDocumentsDto":{"type":"object","properties":{"subject":{"type":"string","maxLength":255},"body":{"type":"string","maxLength":5000},"recipientEmails":{"maxItems":50,"description":"Must be a subset of this email's recipient list for the organization","type":"array","items":{"type":"string"}},"attachmentFileIds":{"maxItems":10,"description":"The `fileId` of each file uploaded through `POST /files/upload` or copied by `POST /email-attachments/:fileId/watermark`, together at most 7 MB. Files in the `email-attachments` folder are deleted once the email reaches a recipient, or a day after upload when no email takes them. Every recipient’s copy carries them.","type":"array","items":{"type":"string"}},"sectionIds":{"maxItems":100,"description":"Sections to request again — reopened for the client whatever their status. Omit to request every pending section.","type":"array","items":{"type":"string","format":"uuid"}}},"required":["subject","body","recipientEmails"]},"RndAupRequiredDocumentsRequestResultDto":{"type":"object","properties":{"sentTo":{"description":"Recipients the email reached","type":"array","items":{"type":"string"}},"failedTo":{"description":"Recipients the email could not be sent to. What the email announced happened either way.","type":"array","items":{"type":"string"}},"skippedSectionIds":{"description":"Re-requested sections deleted before the request went out; the rest were requested.","type":"array","items":{"type":"string","format":"uuid"}}},"required":["sentTo","failedTo","skippedSectionIds"]},"AupSampleSelectionEntity":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"rowCount":{"type":"number"},"totalAmount":{"type":"number","format":"decimal"},"uploadedAt":{"format":"date-time","type":"string"},"uploadedById":{"type":["string","null"]}},"required":["id","fileName","rowCount","totalAmount","uploadedAt","uploadedById"]},"AupFilesManifestEntity":{"type":"object","properties":{"generalLedger":{"anyOf":[{"$ref":"#/components/schemas/FileUploadResultEntity"},{"type":"null"}]},"payrollLedger":{"anyOf":[{"$ref":"#/components/schemas/FileUploadResultEntity"},{"type":"null"}]},"sampleSelection":{"anyOf":[{"$ref":"#/components/schemas/AupSampleSelectionEntity"},{"type":"null"}]},"sampleSelectionFile":{"description":"The latest accepted CPA workbook, as uploaded; null for client-portal users, since it holds the CPA's working papers.","anyOf":[{"$ref":"#/components/schemas/FileUploadResultEntity"},{"type":"null"}]},"hasFinancialLedger":{"type":"boolean","description":"Whether a financial ledger exists; the Expenses export reads it."}},"required":["generalLedger","payrollLedger","sampleSelection","sampleSelectionFile","hasFinancialLedger"]},"UploadSampleSelectionDto":{"type":"object","properties":{"storageKey":{"type":"string","description":"Storage key returned by the generic file upload endpoint after uploading the filled CPA template","maxLength":1024}},"required":["storageKey"]},"AupWorkbookKind":{"type":"string","enum":["template","populated","external"],"description":"A DECA template, a DECA download populated with AUP Data and Vouching, or a workbook DECA did not produce."},"AupWorkbookInfoDto":{"type":"object","properties":{"kind":{"description":"A DECA template, a DECA download populated with AUP Data and Vouching, or a workbook DECA did not produce.","allOf":[{"$ref":"#/components/schemas/AupWorkbookKind"}]},"generatedAt":{"type":["string","null"],"format":"date-time"},"organizationName":{"type":["string","null"]},"fiscalYear":{"type":["number","null"]}},"required":["kind","generatedAt","organizationName","fiscalYear"]},"AupWorkbookCheckSummaryDto":{"type":"object","properties":{"newSampleCount":{"type":"number"},"updatedSampleCount":{"type":"number"},"unchangedSampleCount":{"type":"number"},"releasedApprovalCount":{"type":"number","description":"Approved or hand-set samples whose amount or category changes, which puts them back to pending; a vouched sample keeps its approval, and Document issue, Exception noted and Vouched without exception stay."},"updatedCategoryCount":{"type":"number"}},"required":["newSampleCount","updatedSampleCount","unchangedSampleCount","releasedApprovalCount","updatedCategoryCount"]},"AupWorkbookIssueSeverity":{"type":"string","enum":["error","warning","info"],"description":"An error blocks the import; a warning is imported once acknowledged; an info only reports."},"AupWorkbookIssueCode":{"type":"string","enum":["file_unreadable","file_encrypted","file_too_large","legacy_template","sheet_missing","sheet_ambiguous","sheet_ignored","header_missing","header_assumed","column_missing","meta_invalid","identity_mismatch","identity_unverified","headings_changed","category_unknown","category_mismatch","category_missing","category_duplicate","invalid_value","value_rounded","value_stringified","date_label_kept","amount_required","too_many_samples","no_samples","formula_error","formula_not_calculated","external_reference","derived_overridden","derived_mismatch","subtotal_mismatch","book_value_mismatch","sampled_amount_mismatch","schedule2_mismatch","materiality_zero","reference_ignored","reference_unknown","reference_duplicate","reference_mismatch","sample_conflict","sample_ambiguous","sample_renumbered","sample_number_assigned","sample_duplicate","possible_duplicate","samples_not_in_file","system_changed_since_export","approval_released"]},"RndAupExpenseCategory":{"type":"string","enum":["salaries_and_wages","marginal_benefits_and_payroll_taxes","professional_services","insurance","property_tax","operating_taxes","rent","repair_and_maintenance","utilities","materials_and_supplies","others"]},"AupWorkbookIssueDto":{"type":"object","properties":{"severity":{"description":"An error blocks the import; a warning is imported once acknowledged; an info only reports.","allOf":[{"$ref":"#/components/schemas/AupWorkbookIssueSeverity"}]},"code":{"allOf":[{"$ref":"#/components/schemas/AupWorkbookIssueCode"}]},"message":{"type":"string"},"sheet":{"type":["string","null"]},"row":{"type":["number","null"]},"column":{"type":["string","null"],"description":"Column letter."},"category":{"anyOf":[{"$ref":"#/components/schemas/RndAupExpenseCategory"},{"type":"null"}]}},"required":["severity","code","message","sheet","row","column","category"]},"AupWorkbookCheckDto":{"type":"object","properties":{"canImport":{"type":"boolean","description":"False while any error remains."},"checksum":{"type":["string","null"],"description":"Identifies this check; the import sends it back and applies only while the file and the current data still give the same result. Null when an error blocks the import."},"workbook":{"$ref":"#/components/schemas/AupWorkbookInfoDto"},"summary":{"$ref":"#/components/schemas/AupWorkbookCheckSummaryDto"},"issues":{"description":"Errors first, then warnings and infos; capped, see `issueCount`.","type":"array","items":{"$ref":"#/components/schemas/AupWorkbookIssueDto"}},"issueCount":{"type":"number","description":"Every issue found, including any past the cap."}},"required":["canImport","checksum","workbook","summary","issues","issueCount"]},"ImportSampleSelectionDto":{"type":"object","properties":{"storageKey":{"type":"string","description":"Storage key returned by the generic file upload endpoint after uploading the filled CPA template","maxLength":1024},"checksum":{"type":"string","minLength":64,"maxLength":64,"description":"The `checksum` of the check the user reviewed for this file. The import checks again and writes only when the result is unchanged."}},"required":["storageKey","checksum"]},"AupWorkbookImportOutcome":{"type":"string","enum":["imported","unchanged","needs_review"],"description":"`imported` wrote the workbook; `unchanged` found nothing to write; `needs_review` wrote nothing because the check no longer matches the reviewed one — show `check` again."},"AupWorkbookImportResultDto":{"type":"object","properties":{"outcome":{"description":"`imported` wrote the workbook; `unchanged` found nothing to write; `needs_review` wrote nothing because the check no longer matches the reviewed one — show `check` again.","allOf":[{"$ref":"#/components/schemas/AupWorkbookImportOutcome"}]},"check":{"$ref":"#/components/schemas/AupWorkbookCheckDto"}},"required":["outcome","check"]},"AupSampleSelectionRowEntity":{"type":"object","properties":{"id":{"type":"string"},"rowIndex":{"type":"number"},"rndCategory":{"allOf":[{"$ref":"#/components/schemas/RndAupExpenseCategory"}]},"date":{"format":"date-time","type":["string","null"]},"dateLabel":{"type":["string","null"],"description":"The period the CPA workbook recorded instead of a date, e.g. \"FY 2025\"; shown while `date` is null."},"supplier":{"type":["string","null"]},"description":{"type":["string","null"]},"num":{"type":["string","null"]},"split":{"type":["string","null"]},"amount":{"type":"number","format":"decimal"}},"required":["id","rowIndex","rndCategory","date","dateLabel","supplier","description","num","split","amount"]},"AupSampleSelectionRowsPageEntity":{"type":"object","properties":{"meta":{"description":"Pagination metadata","allOf":[{"$ref":"#/components/schemas/PaginationMetaDto"}]},"data":{"description":"List of items","type":"array","items":{"$ref":"#/components/schemas/AupSampleSelectionRowEntity"}}},"required":["meta","data"]},"AupSampleSelectionCategoryTotalDto":{"type":"object","properties":{"rndCategory":{"allOf":[{"$ref":"#/components/schemas/RndAupExpenseCategory"}]},"rowCount":{"type":"number"},"totalAmount":{"type":"number","format":"decimal"}},"required":["rndCategory","rowCount","totalAmount"]},"AupSampleSelectionAggregatesDto":{"type":"object","properties":{"totalRowCount":{"type":"number","description":"Total row count across the entire sample selection"},"totalAmount":{"type":"number","format":"decimal","description":"Sum of amounts across the entire sample selection"},"perCategory":{"type":"array","items":{"$ref":"#/components/schemas/AupSampleSelectionCategoryTotalDto"}}},"required":["totalRowCount","totalAmount","perCategory"]},"AupSampleSelectionDocumentSampleDto":{"type":"object","properties":{"sampleNumber":{"type":["number","null"]},"date":{"format":"date-time","type":["string","null"]},"dateLabel":{"type":["string","null"],"description":"The period the workbook records instead of a date, e.g. \"FY 2025\"; shown while `date` is null."},"supplier":{"type":["string","null"]},"description":{"type":["string","null"]},"amount":{"type":["number","null"],"format":"decimal"}},"required":["sampleNumber","date","dateLabel","supplier","description","amount"]},"AupSampleSelectionDocumentCategoryDto":{"type":"object","properties":{"rndCategory":{"allOf":[{"$ref":"#/components/schemas/RndAupExpenseCategory"}]},"rowCount":{"type":"number"},"totalAmount":{"type":"number","format":"decimal"},"samples":{"type":"array","items":{"$ref":"#/components/schemas/AupSampleSelectionDocumentSampleDto"}}},"required":["rndCategory","rowCount","totalAmount","samples"]},"AupSampleSelectionDocumentDto":{"type":"object","properties":{"isLegacyTemplate":{"type":"boolean","description":"The accepted file is the previous one-sheet template, which cannot be read here: `categories` is empty, and `/sample-selection/rows` lists the samples."},"categories":{"type":"array","items":{"$ref":"#/components/schemas/AupSampleSelectionDocumentCategoryDto"}}},"required":["isLegacyTemplate","categories"]},"AupAddendumACategoryDto":{"type":"object","properties":{"bookValue":{"type":["number","null"],"format":"decimal","description":"Book Value of Strata from Schedule 1"},"sampledAmount":{"type":["number","null"],"format":"decimal","description":"Sampled items amount"},"misstatement":{"type":["number","null"],"format":"decimal","description":"Misstatement from Vouching"},"projectedMisstatement":{"type":["number","null"],"format":"decimal","description":"Projected Misstatement"},"eligibleAmount":{"type":["number","null"],"format":"decimal","description":"Eligible Amount"},"percentageOfTotalExpenses":{"type":["number","null"],"format":"decimal","description":"% of Total Expenses, as a percent: 5 is 5%. Unrounded."},"category":{"allOf":[{"$ref":"#/components/schemas/RndAupExpenseCategory"}]}},"required":["bookValue","sampledAmount","misstatement","projectedMisstatement","eligibleAmount","percentageOfTotalExpenses","category"]},"AupAddendumAFiguresDto":{"type":"object","properties":{"bookValue":{"type":["number","null"],"format":"decimal","description":"Book Value of Strata from Schedule 1"},"sampledAmount":{"type":["number","null"],"format":"decimal","description":"Sampled items amount"},"misstatement":{"type":["number","null"],"format":"decimal","description":"Misstatement from Vouching"},"projectedMisstatement":{"type":["number","null"],"format":"decimal","description":"Projected Misstatement"},"eligibleAmount":{"type":["number","null"],"format":"decimal","description":"Eligible Amount"},"percentageOfTotalExpenses":{"type":["number","null"],"format":"decimal","description":"% of Total Expenses, as a percent: 5 is 5%. Unrounded."}},"required":["bookValue","sampledAmount","misstatement","projectedMisstatement","eligibleAmount","percentageOfTotalExpenses"]},"AupAddendumADto":{"type":"object","properties":{"categories":{"description":"Every AUP category, in the fixed order.","type":"array","items":{"$ref":"#/components/schemas/AupAddendumACategoryDto"}},"totals":{"description":"Each figure sums the saved category values; the percentage is the total projected misstatement over the total book value.","allOf":[{"$ref":"#/components/schemas/AupAddendumAFiguresDto"}]}},"required":["categories","totals"]},"UpdateAupAddendumACategoryDto":{"type":"object","properties":{"bookValue":{"type":["number","null"],"minimum":0,"description":"Book Value of Strata from Schedule 1"},"sampledAmount":{"type":["number","null"],"minimum":0,"description":"Sampled items amount"},"misstatement":{"type":["number","null"],"minimum":0,"description":"Misstatement from Vouching"},"projectedMisstatement":{"type":["number","null"],"minimum":0,"description":"Projected Misstatement"},"eligibleAmount":{"type":["number","null"],"minimum":0,"description":"Eligible Amount"},"percentageOfTotalExpenses":{"type":["number","null"],"minimum":0,"maximum":100,"description":"% of Total Expenses, as a percent with at most two decimals: 5 is 5%."}}},"RndPayrollEmployeeEntity":{"type":"object","properties":{"id":{"type":"string"},"employeeName":{"type":"string"},"totalExpenses":{"type":"number","format":"decimal"},"code":{"type":["string","null"]},"wagesPaid":{"type":["number","null"],"format":"decimal"},"employeesBenefits":{"type":["number","null"],"format":"decimal"},"payrollTaxesDeductions":{"type":["number","null"],"format":"decimal"}},"required":["id","employeeName","totalExpenses","code","wagesPaid","employeesBenefits","payrollTaxesDeductions"]},"RndGeneralLedgerAccountEntity":{"type":"object","properties":{"id":{"type":"string"},"primaryAccount":{"type":"string"},"totalAmount":{"type":"number","format":"decimal"},"transactionCount":{"type":"number"}},"required":["id","primaryAccount","totalAmount","transactionCount"]},"RndExpenseCategory":{"type":"string","enum":["salaries_and_wages","marginal_benefits_and_payroll_taxes","professional_services","insurance","property_tax","operating_taxes","rent","repair_and_maintenance","utilities","materials_and_supplies","rnd_training","rnd_travel","rnd_equipment","rnd_infrastructure","rnd_intellectual_property","rnd_software_tools_and_digital_cloud_infrastructure","rnd_financing","non_rnd_related"]},"CategoryItemEntity":{"type":"object","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/RndExpenseCategory"}]},"totalRndExpenses":{"type":"number","format":"decimal"},"eligibleExpenses":{"type":"number","format":"decimal"},"isNew":{"type":"boolean","description":"Category contains an account added in the latest upload"}},"required":["category","totalRndExpenses","eligibleExpenses","isNew"]},"RndSummaryEntity":{"type":"object","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/CategoryItemEntity"}},"totalRndExpenses":{"type":"number","format":"decimal","description":"Total R&D Expenses"},"totalEligibleRndExpenses":{"type":"number","format":"decimal","description":"Total Eligible R&D Expenses"},"laborRndAllocationPercent":{"type":"number","description":"Labor R&D Allocation %"},"expectedRndTaxCredits":{"type":"number","format":"decimal","description":"Expected R&D Tax Credits"},"vendorRndAllocationPercent":{"type":"number","description":"Vendor Allocation %"}},"required":["categories","totalRndExpenses","totalEligibleRndExpenses","laborRndAllocationPercent","expectedRndTaxCredits","vendorRndAllocationPercent"]},"EmployeeSummaryEntity":{"type":"object","properties":{"id":{"type":"string"},"employeeName":{"type":"string","description":"Employee name"},"performedRnd":{"type":["boolean","null"],"description":"Whether employee performed R&D activities; null until the client classifies them"},"hiredThisYear":{"type":["boolean","null"],"description":"Whether employee was hired this year"},"totalExpenses":{"type":"number","format":"decimal","description":"EF-01: Total employee expenses (Wages + Benefits + Payroll Taxes)"},"wagesPaid":{"type":"number","format":"decimal","description":"Wages paid to employee"},"benefits":{"type":"number","format":"decimal","description":"Employee benefits"},"payrollTaxes":{"type":"number","format":"decimal","description":"Payroll taxes and deductions"},"eaAllocation":{"type":"number","minimum":0,"maximum":100,"description":"Experimental Activities allocation % (editable)"},"iaAllocation":{"type":"number","minimum":0,"maximum":100,"description":"Incidental Activities allocation % (editable)"},"naAllocation":{"type":"number","minimum":0,"maximum":100,"description":"Non-Applicable allocation % (calculated: 100 - EA - IA)"},"prsAllocation":{"type":"number","minimum":0,"maximum":100,"description":"Puerto Rico Services allocation % (editable)"},"oprAllocation":{"type":"number","minimum":0,"maximum":100,"description":"Outside Puerto Rico allocation % (calculated: 100 - PRS)"},"totalEaAndPrs":{"type":"number","format":"decimal","description":"AF-01: EA% * PRS%"},"totalIaAndPrs":{"type":"number","format":"decimal","description":"AF-02: IA% * PRS%"},"totalEaAndOpr":{"type":"number","format":"decimal","description":"AF-03: EA% * OPR%"},"eaAndPrs":{"type":"number","format":"decimal","description":"EF-05: Total expenses * (EA% * PRS%) / 100"},"iaAndPrs":{"type":"number","format":"decimal","description":"EF-06: Total expenses * (IA% * PRS%) / 100"},"eaAndOpr":{"type":"number","format":"decimal","description":"EF-07: Total expenses * (EA% * OPR%) / 100"},"appliedTo20Rule":{"type":"number","format":"decimal","description":"EF-17: Amount from IA&PRS + EA&OPR applied to 20% rule"},"includedIn20Rule":{"type":"number","format":"decimal","description":"EF-18: Amount included in 20% rule calculation (IA&PRS)"},"possibleIncidentals":{"type":"number","format":"decimal","description":"Possible incidentals: appliedTo20Rule minus includedIn20Rule"},"isNew":{"type":"boolean","description":"Row added in the latest additional-expenses upload"}},"required":["id","employeeName","performedRnd","hiredThisYear","totalExpenses","wagesPaid","benefits","payrollTaxes","eaAllocation","iaAllocation","naAllocation","prsAllocation","oprAllocation","totalEaAndPrs","totalIaAndPrs","totalEaAndOpr","eaAndPrs","iaAndPrs","eaAndOpr","appliedTo20Rule","includedIn20Rule","possibleIncidentals","isNew"]},"EmployeeSummaryTotalsDto":{"type":"object","properties":{"totalLaborExpenses":{"type":"number","format":"decimal","description":"Total for all expenses for labor (wages + benefits + payroll taxes)"},"totalEligibleLabor":{"type":"number","format":"decimal","description":"EA&PRS for employee tab + Total for what was claimed in 20%"},"laborRndAllocationPercent":{"type":"number","description":"% for R&D expenses tab"},"totalWagesPaid":{"type":"number","format":"decimal","description":"Sum of all employees wages paid"},"totalBenefits":{"type":"number","format":"decimal","description":"Sum of all employees benefits"},"totalPayrollTaxes":{"type":"number","format":"decimal","description":"Sum of all employees payroll taxes"},"totalEaAndPrs":{"type":"number","format":"decimal","description":"Sum of all employees EA & PRS dollar amounts"},"totalIaAndPrs":{"type":"number","format":"decimal","description":"Sum of all employees IA & PRS dollar amounts"},"totalEaAndOpr":{"type":"number","format":"decimal","description":"Sum of all employees EA & OPR dollar amounts"},"totalPossibleIncidentals":{"type":"number","format":"decimal","description":"Sum of all employees possible incidentals (appliedTo20Rule - includedIn20Rule)"},"totalAppliedTo20Rule":{"type":"number","format":"decimal","description":"Sum of all employees applied to 20% rule"},"totalIncludedIn20Rule":{"type":"number","format":"decimal","description":"Sum of all employees included in 20% rule"},"twentyPercentRuleMaxValue":{"type":"number","format":"decimal","description":"Max value for 20% rule: (employees EA&PRS + vendors EA&PRS) * 0.25"}},"required":["totalLaborExpenses","totalEligibleLabor","laborRndAllocationPercent","totalWagesPaid","totalBenefits","totalPayrollTaxes","totalEaAndPrs","totalIaAndPrs","totalEaAndOpr","totalPossibleIncidentals","totalAppliedTo20Rule","totalIncludedIn20Rule","twentyPercentRuleMaxValue"]},"EmployeeSummaryResponseDto":{"type":"object","properties":{"employees":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeSummaryEntity"}},"totals":{"$ref":"#/components/schemas/EmployeeSummaryTotalsDto"}},"required":["employees","totals"]},"EmployeeAllocationItemDto":{"type":"object","properties":{"eaAllocation":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Experimental Activities allocation %","example":80},"iaAllocation":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Incidental Activities allocation %","example":15},"prsAllocation":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Puerto Rico allocation %","example":100},"id":{"type":"string","format":"uuid"}},"required":["id"]},"BatchUpdateEmployeeAllocationDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeAllocationItemDto"}}},"required":["items"]},"VendorSummaryEntity":{"type":"object","properties":{"id":{"type":"string"},"vendorName":{"type":"string","description":"Vendor name / primary account"},"description":{"type":["string","null"],"description":"Vendor description of services"},"performedRnd":{"type":["boolean","null"],"description":"Whether vendor performed R&D activities; null until the client classifies them"},"parentAccountName":{"type":["string","null"],"description":"Parent account name (for vendor context)"},"transactionCount":{"type":"number","description":"Transaction count (for vendors)"},"totalExpenses":{"type":"number","format":"decimal","description":"Total vendor expenses"},"eaAllocation":{"type":"number","minimum":0,"maximum":100,"description":"Experimental Activities allocation % (editable)"},"iaAllocation":{"type":"number","minimum":0,"maximum":100,"description":"Incidental Activities allocation % (editable)"},"naAllocation":{"type":"number","minimum":0,"maximum":100,"description":"Non-Applicable allocation % (calculated: 100 - EA - IA)"},"prsAllocation":{"type":"number","minimum":0,"maximum":100,"description":"Puerto Rico Services allocation % (editable)"},"oprAllocation":{"type":"number","minimum":0,"maximum":100,"description":"Outside Puerto Rico allocation % (calculated: 100 - PRS)"},"totalEaAndPrs":{"type":"number","format":"decimal","description":"AF-01: EA% * PRS%"},"totalIaAndPrs":{"type":"number","format":"decimal","description":"AF-02: IA% * PRS%"},"totalEaAndOpr":{"type":"number","format":"decimal","description":"AF-03: EA% * OPR%"},"eaAndPrs":{"type":"number","format":"decimal","description":"VF-01: Total expenses * (EA% * PRS%) / 100"},"iaAndPrs":{"type":"number","format":"decimal","description":"VF-02: Total expenses * (IA% * PRS%) / 100"},"eaAndOpr":{"type":"number","format":"decimal","description":"VF-03: Total expenses * (EA% * OPR%) / 100"},"appliedTo20Rule":{"type":"number","format":"decimal","description":"VF-08: Amount from IA&PRS + EA&OPR applied to 20% rule"},"includedIn20Rule":{"type":"number","format":"decimal","description":"VF-09: Amount included in 20% rule calculation (IA&PRS)"},"possibleIncidentals":{"type":"number","format":"decimal","description":"Possible incidentals: appliedTo20Rule minus includedIn20Rule"},"isNew":{"type":"boolean","description":"Row added in the latest additional-expenses upload"}},"required":["id","vendorName","description","performedRnd","parentAccountName","transactionCount","totalExpenses","eaAllocation","iaAllocation","naAllocation","prsAllocation","oprAllocation","totalEaAndPrs","totalIaAndPrs","totalEaAndOpr","eaAndPrs","iaAndPrs","eaAndOpr","appliedTo20Rule","includedIn20Rule","possibleIncidentals","isNew"]},"VendorSummaryTotalsDto":{"type":"object","properties":{"totalExpenses":{"type":"number","format":"decimal","description":"Sum of all vendors total expenses"},"totalEaAndPrs":{"type":"number","format":"decimal","description":"Sum of all vendors EA & PRS dollar amounts"},"totalIaAndPrs":{"type":"number","format":"decimal","description":"Sum of all vendors IA & PRS dollar amounts"},"totalEaAndOpr":{"type":"number","format":"decimal","description":"Sum of all vendors EA & OPR dollar amounts"},"totalPossibleIncidentals":{"type":"number","format":"decimal","description":"Sum of all vendors possible incidentals (appliedTo20Rule - includedIn20Rule)"},"totalAppliedTo20Rule":{"type":"number","format":"decimal","description":"Sum of all vendors applied to 20% rule"},"totalIncludedIn20Rule":{"type":"number","format":"decimal","description":"Sum of all vendors included in 20% rule"},"twentyPercentRuleMaxValue":{"type":"number","format":"decimal","description":"Max value for 20% rule: (employees EA&PRS + vendors EA&PRS) * 0.25"}},"required":["totalExpenses","totalEaAndPrs","totalIaAndPrs","totalEaAndOpr","totalPossibleIncidentals","totalAppliedTo20Rule","totalIncludedIn20Rule","twentyPercentRuleMaxValue"]},"VendorSummaryResponseDto":{"type":"object","properties":{"vendors":{"type":"array","items":{"$ref":"#/components/schemas/VendorSummaryEntity"}},"totals":{"$ref":"#/components/schemas/VendorSummaryTotalsDto"}},"required":["vendors","totals"]},"VendorAllocationItemDto":{"type":"object","properties":{"eaAllocation":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Experimental Activities allocation %","example":80},"iaAllocation":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Incidental Activities allocation %","example":15},"prsAllocation":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Puerto Rico allocation %","example":100},"id":{"type":"string","format":"uuid"}},"required":["id"]},"BatchUpdateVendorAllocationDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/VendorAllocationItemDto"}}},"required":["items"]},"PrimaryAccountEntity":{"type":"object","properties":{"id":{"type":"string"},"primaryAccount":{"type":"string","description":"Primary account name/number"},"totalExpenses":{"type":"number","format":"decimal","description":"Total expenses for this account"},"allocation":{"type":"number","minimum":0,"maximum":100,"description":"Allocation percentage (100% if exclusively R&D, else R&D Allocation %)"},"eligibleExpenses":{"type":"number","format":"decimal","description":"RF-02: Total * Allocation %"},"rndCategory":{"description":"R&D category for this account","allOf":[{"$ref":"#/components/schemas/RndExpenseCategory"}]},"isNew":{"type":"boolean","description":"Row added in the latest additional-expenses upload"}},"required":["id","primaryAccount","totalExpenses","allocation","eligibleExpenses","rndCategory","isNew"]},"ExpenseCategorySummaryEntity":{"type":"object","properties":{"category":{"description":"Category name","allOf":[{"$ref":"#/components/schemas/RndExpenseCategory"}]},"totalExpenses":{"type":"number","format":"decimal","description":"RF-01: Sum of all accounts in this category"},"averageAllocation":{"type":"number","description":"Average allocation % of accounts in this category"},"eligibleExpenses":{"type":"number","format":"decimal","description":"RF-03: Sum of eligible expenses of all accounts"},"percentOfTotal":{"type":"number","description":"RF-04: % of total across all categories"},"accounts":{"description":"Primary accounts in this category","type":"array","items":{"$ref":"#/components/schemas/PrimaryAccountEntity"}},"isNew":{"type":"boolean","description":"Category contains an account added in the latest upload"}},"required":["category","totalExpenses","averageAllocation","eligibleExpenses","percentOfTotal","accounts","isNew"]},"ExpensesSummaryTotalsDto":{"type":"object","properties":{"totalExpenses":{"type":"number","format":"decimal","description":"Sum of all categories total expenses"},"totalEligibleExpenses":{"type":"number","format":"decimal","description":"Sum of all categories eligible expenses (excluding non-R&D related)"}},"required":["totalExpenses","totalEligibleExpenses"]},"ExpensesSummaryResponseDto":{"type":"object","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/ExpenseCategorySummaryEntity"}},"totals":{"$ref":"#/components/schemas/ExpensesSummaryTotalsDto"}},"required":["categories","totals"]},"ExpenseAllocationItemDto":{"type":"object","properties":{"allocation":{"type":"number","minimum":0,"maximum":100,"description":"Allocation percentage for this expense account (max 2 decimal places)","example":75.5},"rndCategory":{"description":"R&D expense category","example":"materials_and_supplies","allOf":[{"$ref":"#/components/schemas/RndExpenseCategory"}]},"id":{"type":"string","format":"uuid"}},"required":["id"]},"BatchUpdateExpenseAllocationDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ExpenseAllocationItemDto"}}},"required":["items"]},"ProjectCategoryEntity":{"type":"object","properties":{"category":{"description":"Category name","allOf":[{"$ref":"#/components/schemas/RndExpenseCategory"}]},"eligibleExpenses":{"type":"number","format":"decimal","description":"PF-01: Total R&D * Mgmt Allocation"},"expensesPercentage":{"type":"number","description":"PF-03: Category / Project Total * 100"}},"required":["category","eligibleExpenses","expensesPercentage"]},"ProjectSummaryEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"Project name"},"mgmtAllocation":{"type":"number","minimum":0,"maximum":100,"description":"Management allocation % (editable)"},"eligibleExpenses":{"type":"number","format":"decimal","description":"PF-02: Sum of all category expenses"},"categories":{"description":"Category breakdown for this project","type":"array","items":{"$ref":"#/components/schemas/ProjectCategoryEntity"}}},"required":["id","name","mgmtAllocation","eligibleExpenses","categories"]},"ProjectAllocationItemDto":{"type":"object","properties":{"allocation":{"type":"number","minimum":0,"maximum":100,"description":"Management allocation percentage for this project","example":50},"id":{"type":"string","format":"uuid"}},"required":["allocation","id"]},"BatchUpdateProjectAllocationDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ProjectAllocationItemDto"}}},"required":["items"]},"TransactionEntity":{"type":"object","properties":{"id":{"type":"string"},"primaryAccount":{"type":"string","description":"Primary account name"},"vendorId":{"type":["string","null"],"description":"Assigned vendor ID"},"date":{"format":"date-time","type":["string","null"],"description":"Transaction date"},"name":{"type":["string","null"],"description":"Transaction name (payee/vendor from XLSX)"},"memo":{"type":["string","null"],"description":"Transaction memo"},"amount":{"type":"number","format":"decimal","description":"Transaction amount"},"reference":{"type":["string","null"],"description":"Reference number"}},"required":["id","primaryAccount","vendorId","date","name","memo","amount","reference"]},"AssignTransactionsDto":{"type":"object","properties":{"transactionIds":{"description":"Transaction IDs to assign","type":"array","items":{"type":"string"}},"vendorId":{"type":"string","format":"uuid","description":"Vendor ID to assign transactions to"}},"required":["transactionIds","vendorId"]},"UnassignTransactionsDto":{"type":"object","properties":{"transactionIds":{"description":"Transaction IDs to unassign from their vendor","type":"array","items":{"type":"string"}}},"required":["transactionIds"]},"VendorWithTotalsEntity":{"type":"object","properties":{"id":{"type":"string"},"vendorName":{"type":"string","description":"Vendor name"},"totalAmount":{"type":"number","format":"decimal","description":"Total amount from assigned transactions"},"transactionCount":{"type":"number","description":"Number of assigned transactions"}},"required":["id","vendorName","totalAmount","transactionCount"]},"CreateVendorDto":{"type":"object","properties":{"vendorName":{"type":"string","description":"Vendor name","example":"Acme Corp"}},"required":["vendorName"]},"UpdateVendorDto":{"type":"object","properties":{"vendorName":{"type":"string","description":"New vendor name","example":"Acme Corp Updated"}},"required":["vendorName"]},"InitUploadFileDto":{"type":"object","properties":{"name":{"type":"string","description":"File name only, never a path."},"size":{"type":"number"},"contentType":{"type":"string"},"path":{"type":["string","null"],"description":"Folder path this file came from, e.g. `Bank/2024/`. Null for a loose file."}},"required":["name","size","contentType","path"]},"InitBulkUploadDto":{"type":"object","properties":{"files":{"description":"Declared files. Any `.zip` in the selection is expanded server-side; anything else is treated as a loose file.","type":"array","items":{"$ref":"#/components/schemas/InitUploadFileDto"}},"contextType":{"type":"string"},"contextId":{"type":"string"}},"required":["files","contextType","contextId"]},"BulkUploadInitUploadEntity":{"type":"object","properties":{"name":{"type":"string"},"storageKey":{"type":"string"},"uploadType":{"type":"string","enum":["single","resumable"],"description":"'single': PUT the whole file to the signed URL. 'resumable': POST to open a GCS resumable session, then upload in chunks (survives network drops)."},"signedUrl":{"type":"string","description":"v4 signed URL the client uploads to (PUT for 'single', resumable-session POST for 'resumable'), direct to GCS"}},"required":["name","storageKey","uploadType","signedUrl"]},"BulkUploadInitEntity":{"type":"object","properties":{"batchId":{"type":"string"},"uploads":{"type":"array","items":{"$ref":"#/components/schemas/BulkUploadInitUploadEntity"}}},"required":["batchId","uploads"]},"BulkUploadBatchSource":{"type":"string","enum":["zip_archive","multi_file"]},"BulkUploadBatchStatus":{"type":"string","enum":["pending","processing","completed","completed_with_errors","failed"]},"BulkUploadBatchPhase":{"type":"string","enum":["uploading","expanding","analyzing","done"],"description":"Stage within `processing`: `totalFiles` is only meaningful once the phase reaches `analyzing`"},"BulkUploadBatchEntity":{"type":"object","properties":{"id":{"type":"string"},"contextType":{"type":"string"},"contextId":{"type":"string"},"source":{"allOf":[{"$ref":"#/components/schemas/BulkUploadBatchSource"}]},"status":{"allOf":[{"$ref":"#/components/schemas/BulkUploadBatchStatus"}]},"phase":{"description":"Stage within `processing`: `totalFiles` is only meaningful once the phase reaches `analyzing`","allOf":[{"$ref":"#/components/schemas/BulkUploadBatchPhase"}]},"totalFiles":{"type":"number"},"processedFiles":{"type":"number"},"assignedCount":{"type":"number"},"needsReviewCount":{"type":"number"},"unassignedCount":{"type":"number"},"failedCount":{"type":"number"},"skippedDuplicateNames":{"description":"Names of the files this batch skipped because a document with identical bytes was already uploaded. Only contexts that never keep a second copy skip files.","type":"array","items":{"type":"string"}},"skippedUnsupportedNames":{"description":"Paths of the archive entries this batch left out, never stored, because the context does not take their format. Only contexts that declare the formats they accept skip entries.","type":"array","items":{"type":"string"}},"errorMessage":{"type":["string","null"]},"createdById":{"type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"confirmedAt":{"format":"date-time","type":["string","null"],"description":"When the consuming flow committed this batch, when a superseded or cancelled batch was retired uncommitted, or when a run, or a removal, left no document to keep; null on a settled batch means its review is still pending."},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","contextType","contextId","source","status","phase","totalFiles","processedFiles","assignedCount","needsReviewCount","unassignedCount","failedCount","skippedDuplicateNames","skippedUnsupportedNames","errorMessage","createdById","startedAt","completedAt","confirmedAt","createdAt","updatedAt"]},"BulkUploadStatusBreakdownEntity":{"type":"object","properties":{"pending":{"type":"number"},"unassigned":{"type":"number"},"needsConfirmation":{"type":"number"},"assigned":{"type":"number"},"failed":{"type":"number"}},"required":["pending","unassigned","needsConfirmation","assigned","failed"]},"BulkUploadBatchSummaryEntity":{"type":"object","properties":{"id":{"type":"string"},"contextType":{"type":"string"},"contextId":{"type":"string"},"source":{"allOf":[{"$ref":"#/components/schemas/BulkUploadBatchSource"}]},"status":{"allOf":[{"$ref":"#/components/schemas/BulkUploadBatchStatus"}]},"phase":{"description":"Stage within `processing`: `totalFiles` is only meaningful once the phase reaches `analyzing`","allOf":[{"$ref":"#/components/schemas/BulkUploadBatchPhase"}]},"totalFiles":{"type":"number"},"processedFiles":{"type":"number"},"assignedCount":{"type":"number"},"needsReviewCount":{"type":"number"},"unassignedCount":{"type":"number"},"failedCount":{"type":"number"},"skippedDuplicateNames":{"description":"Names of the files this batch skipped because a document with identical bytes was already uploaded. Only contexts that never keep a second copy skip files.","type":"array","items":{"type":"string"}},"skippedUnsupportedNames":{"description":"Paths of the archive entries this batch left out, never stored, because the context does not take their format. Only contexts that declare the formats they accept skip entries.","type":"array","items":{"type":"string"}},"errorMessage":{"type":["string","null"]},"createdById":{"type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"confirmedAt":{"format":"date-time","type":["string","null"],"description":"When the consuming flow committed this batch, when a superseded or cancelled batch was retired uncommitted, or when a run, or a removal, left no document to keep; null on a settled batch means its review is still pending."},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"statusBreakdown":{"$ref":"#/components/schemas/BulkUploadStatusBreakdownEntity"}},"required":["id","contextType","contextId","source","status","phase","totalFiles","processedFiles","assignedCount","needsReviewCount","unassignedCount","failedCount","skippedDuplicateNames","skippedUnsupportedNames","errorMessage","createdById","startedAt","completedAt","confirmedAt","createdAt","updatedAt","statusBreakdown"]},"IngestedDocumentProcessingStatus":{"type":"string","enum":["pending","unassigned","needs_confirmation","assigned","failed"]},"CursorPaginationMetaDto":{"type":"object","properties":{"size":{"type":"number","example":100},"nextCursor":{"type":["string","null"],"description":"Cursor for the next page; null when there are no more items"}},"required":["size","nextCursor"]},"IngestedDocumentExtractionStatus":{"type":"string","enum":["pending","native_sent","extracted","no_text","unsupported","failed"]},"IngestedDocumentIssue":{"type":"string","enum":["unsupported_type","too_large","corrupted","password_protected","duplicate","classification_failed","missing_object"],"description":"Why this file needs attention, as a bucket the client renders its own copy for. Where the pipeline has something more specific to say, that is in `detail`. Null when it was processed normally, even if nothing matched — that case is \"not identified\", not a defect."},"DocumentAssignmentStatus":{"type":"string","enum":["assigned","needs_confirmation","rejected"]},"DocumentAssignmentSource":{"type":"string","enum":["llm_auto","exact_ref","manual"]},"DocumentAssignmentEntity":{"type":"object","properties":{"id":{"type":"string"},"documentId":{"type":"string"},"contextType":{"type":"string"},"contextId":{"type":"string"},"targetType":{"type":"string"},"targetId":{"type":"string"},"confidence":{"type":"number"},"status":{"allOf":[{"$ref":"#/components/schemas/DocumentAssignmentStatus"}]},"source":{"allOf":[{"$ref":"#/components/schemas/DocumentAssignmentSource"}]},"reasoning":{"type":["string","null"]},"confirmedById":{"type":["string","null"]},"confirmedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","documentId","contextType","contextId","targetType","targetId","confidence","status","source","reasoning","confirmedById","confirmedAt","createdAt","updatedAt"]},"DocumentWithAssignmentsEntity":{"type":"object","properties":{"id":{"type":"string"},"batchId":{"type":"string"},"contextType":{"type":"string"},"contextId":{"type":"string"},"originalName":{"type":"string"},"archivePath":{"type":["string","null"]},"contentType":{"type":["string","null"]},"fileSize":{"type":["number","null"]},"extractionStatus":{"allOf":[{"$ref":"#/components/schemas/IngestedDocumentExtractionStatus"}]},"processingStatus":{"allOf":[{"$ref":"#/components/schemas/IngestedDocumentProcessingStatus"}]},"errorMessage":{"type":["string","null"]},"issue":{"description":"Why this file needs attention, as a bucket the client renders its own copy for. Where the pipeline has something more specific to say, that is in `detail`. Null when it was processed normally, even if nothing matched — that case is \"not identified\", not a defect.","anyOf":[{"$ref":"#/components/schemas/IngestedDocumentIssue"},{"type":"null"}]},"detail":{"type":["string","null"],"description":"What the pipeline can say about this file beyond its `issue`, written for the client. Prefer it over the issue's own copy when present; null when there is nothing to add."},"isAttachable":{"type":"boolean","description":"Whether this file may be attached to a target. False means the only action left is to delete it."},"previewUrl":{"type":["string","null"],"description":"Access-controlled preview endpoint (redirects to a signed URL), null until the leaf is stored"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"assignments":{"type":"array","items":{"$ref":"#/components/schemas/DocumentAssignmentEntity"}}},"required":["id","batchId","contextType","contextId","originalName","archivePath","contentType","fileSize","extractionStatus","processingStatus","errorMessage","issue","detail","isAttachable","previewUrl","createdAt","updatedAt","assignments"]},"DocumentsPageEntity":{"type":"object","properties":{"meta":{"description":"Cursor pagination metadata","allOf":[{"$ref":"#/components/schemas/CursorPaginationMetaDto"}]},"data":{"description":"List of items","type":"array","items":{"$ref":"#/components/schemas/DocumentWithAssignmentsEntity"}}},"required":["meta","data"]},"IngestedDocumentEntity":{"type":"object","properties":{"id":{"type":"string"},"batchId":{"type":"string"},"contextType":{"type":"string"},"contextId":{"type":"string"},"originalName":{"type":"string"},"archivePath":{"type":["string","null"]},"contentType":{"type":["string","null"]},"fileSize":{"type":["number","null"]},"extractionStatus":{"allOf":[{"$ref":"#/components/schemas/IngestedDocumentExtractionStatus"}]},"processingStatus":{"allOf":[{"$ref":"#/components/schemas/IngestedDocumentProcessingStatus"}]},"errorMessage":{"type":["string","null"]},"issue":{"description":"Why this file needs attention, as a bucket the client renders its own copy for. Where the pipeline has something more specific to say, that is in `detail`. Null when it was processed normally, even if nothing matched — that case is \"not identified\", not a defect.","anyOf":[{"$ref":"#/components/schemas/IngestedDocumentIssue"},{"type":"null"}]},"detail":{"type":["string","null"],"description":"What the pipeline can say about this file beyond its `issue`, written for the client. Prefer it over the issue's own copy when present; null when there is nothing to add."},"isAttachable":{"type":"boolean","description":"Whether this file may be attached to a target. False means the only action left is to delete it."},"previewUrl":{"type":["string","null"],"description":"Access-controlled preview endpoint (redirects to a signed URL), null until the leaf is stored"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","batchId","contextType","contextId","originalName","archivePath","contentType","fileSize","extractionStatus","processingStatus","errorMessage","issue","detail","isAttachable","previewUrl","createdAt","updatedAt"]},"UnassignedDocumentsPageEntity":{"type":"object","properties":{"meta":{"description":"Cursor pagination metadata","allOf":[{"$ref":"#/components/schemas/CursorPaginationMetaDto"}]},"data":{"description":"List of items","type":"array","items":{"$ref":"#/components/schemas/IngestedDocumentEntity"}}},"required":["meta","data"]},"CoverageTargetEntity":{"type":"object","properties":{"targetRef":{"type":"string"},"label":{"type":"string"},"hasDocument":{"type":"boolean"},"assignedCount":{"type":"number"}},"required":["targetRef","label","hasDocument","assignedCount"]},"CoverageEntity":{"type":"object","properties":{"targets":{"type":"array","items":{"$ref":"#/components/schemas/CoverageTargetEntity"}},"totalTargets":{"type":"number"},"coveredTargets":{"type":"number"},"missingTargets":{"type":"number"}},"required":["targets","totalTargets","coveredTargets","missingTargets"]},"ManualAssignDto":{"type":"object","properties":{"targetRef":{"type":"string"}},"required":["targetRef"]},"ConfirmAssignmentDto":{"type":"object","properties":{"accept":{"type":"boolean","description":"true confirms the suggested assignment; false rejects it"}},"required":["accept"]},"EngagementLetterRecipientEntity":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["userId","name","email"]},"SendRndAupEmailDto":{"type":"object","properties":{"subject":{"type":"string","maxLength":255},"body":{"type":"string","maxLength":5000},"recipientEmails":{"maxItems":50,"description":"Must be a subset of this email's recipient list for the organization","type":"array","items":{"type":"string"}},"attachmentFileIds":{"maxItems":10,"description":"The `fileId` of each file uploaded through `POST /files/upload` or copied by `POST /email-attachments/:fileId/watermark`, together at most 7 MB. Files in the `email-attachments` folder are deleted once the email reaches a recipient, or a day after upload when no email takes them. Every recipient’s copy carries them.","type":"array","items":{"type":"string"}}},"required":["subject","body","recipientEmails"]},"RndAupEmailDeliveryDto":{"type":"object","properties":{"sentTo":{"description":"Recipients the email reached","type":"array","items":{"type":"string"}},"failedTo":{"description":"Recipients the email could not be sent to. What the email announced happened either way.","type":"array","items":{"type":"string"}}},"required":["sentTo","failedTo"]},"UploadEngagementLetterDto":{"type":"object","properties":{"storageKey":{"type":"string"},"fileName":{"type":"string"}},"required":["storageKey","fileName"]},"CreateEngagementLetterSenderViewDto":{"type":"object","properties":{"returnUrl":{"type":"string","description":"URL to redirect to after the user finishes in DocuSign."}},"required":["returnUrl"]},"EngagementLetterSenderViewResponseDto":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]},"SendEngagementLetterDto":{"type":"object","properties":{"recipientEmail":{"type":["string","null"]}}},"OrganizationLabelEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","name","createdAt"]},"CreateOrganizationLabelDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255}},"required":["name"]},"ProductQuestionnaireTabKind":{"type":"string","enum":["questions","documents"]},"ProductQuestionnaireTabIcon":{"type":"string","enum":["file_text","list_checks","clipboard_list","building","briefcase","users","user","banknote","landmark","receipt","calculator","chart","scale","globe","factory","package","shield","calendar","map_pin","lightbulb"]},"ProductQuestionnaireFieldType":{"type":"string","enum":["text","long_text","yes_no","email","phone","number","money","date","single_select","multi_select","checkbox","radio"]},"ProductQuestionnaireQuestionDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"fieldType":{"allOf":[{"$ref":"#/components/schemas/ProductQuestionnaireFieldType"}]},"options":{"type":"array","items":{"type":"string"}},"isRequired":{"type":"boolean"},"isFullWidth":{"type":"boolean"}},"required":["id","title","description","fieldType","options","isRequired","isFullWidth"]},"ProductQuestionnaireSectionDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"isRequired":{"type":"boolean"}},"required":["id","name","description","isRequired"]},"ProductQuestionnaireTabDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"allOf":[{"$ref":"#/components/schemas/ProductQuestionnaireTabKind"}]},"icon":{"anyOf":[{"$ref":"#/components/schemas/ProductQuestionnaireTabIcon"},{"type":"null"}]},"name":{"type":"string"},"description":{"type":["string","null"]},"isLocked":{"type":"boolean"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/ProductQuestionnaireQuestionDto"}},"sections":{"type":"array","items":{"$ref":"#/components/schemas/ProductQuestionnaireSectionDto"}}},"required":["id","kind","icon","name","description","isLocked","questions","sections"]},"OrgProductQuestionnaireSaveEffect":{"type":"string","enum":["setup","marks_new","reopens","saves_only"]},"OrgProductQuestionnaireDto":{"type":"object","properties":{"tabs":{"type":"array","items":{"$ref":"#/components/schemas/ProductQuestionnaireTabDto"}},"version":{"type":"string","format":"date-time","description":"Send it back on save to guard against overwriting a newer version"},"isSetUp":{"type":"boolean","description":"The copy was saved once, or is past Backlog (or never in it); until then it is the template as assigned"},"hasClientStarted":{"type":"boolean","description":"The client has a saved draft of the form, or has submitted it"},"saveEffect":{"allOf":[{"$ref":"#/components/schemas/OrgProductQuestionnaireSaveEffect"}]}},"required":["tabs","version","isSetUp","hasClientStarted","saveEffect"]},"ProductQuestionnaireQuestionInputDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of an item the questionnaire already has, to keep it (and its answers). Omit or send an unknown id for a new item: the server assigns one."},"title":{"type":"string","maxLength":255},"description":{"type":["string","null"],"maxLength":1000},"fieldType":{"allOf":[{"$ref":"#/components/schemas/ProductQuestionnaireFieldType"}]},"options":{"maxItems":50,"description":"Choices of a select, multi select, checkbox or radio question (at least 1); empty for every other type","type":"array","items":{"type":"string"}},"isRequired":{"type":"boolean"},"isFullWidth":{"type":"boolean","description":"Spans the whole row instead of half of it"}},"required":["title","description","fieldType","options","isRequired","isFullWidth"]},"ProductQuestionnaireSectionInputDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of an item the questionnaire already has, to keep it (and its answers). Omit or send an unknown id for a new item: the server assigns one."},"name":{"type":"string","maxLength":255},"description":{"type":["string","null"],"maxLength":1000},"isRequired":{"type":"boolean","description":"A required section needs a document or a written description"}},"required":["name","description","isRequired"]},"ProductQuestionnaireTabInputDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of an item the questionnaire already has, to keep it (and its answers). Omit or send an unknown id for a new item: the server assigns one."},"kind":{"allOf":[{"$ref":"#/components/schemas/ProductQuestionnaireTabKind"}]},"icon":{"description":"Null shows the kind's default icon","anyOf":[{"$ref":"#/components/schemas/ProductQuestionnaireTabIcon"},{"type":"null"}]},"name":{"type":"string","maxLength":255},"description":{"type":["string","null"],"maxLength":1000},"isLocked":{"type":"boolean","description":"Set on the product template only: organizations cannot change a locked tab"},"questions":{"maxItems":100,"description":"A questions tab only; empty for the documents tab","type":"array","items":{"$ref":"#/components/schemas/ProductQuestionnaireQuestionInputDto"}},"sections":{"maxItems":50,"description":"The documents tab only; empty for a questions tab","type":"array","items":{"$ref":"#/components/schemas/ProductQuestionnaireSectionInputDto"}}},"required":["kind","icon","name","description","isLocked","questions","sections"]},"UpdateOrgProductQuestionnaireDto":{"type":"object","properties":{"version":{"type":"string","format":"date-time","description":"The `version` the editor loaded. A save over a newer version is refused (409), so one editor cannot drop what another added."},"saveEffect":{"description":"The `saveEffect` the editor loaded and showed. Refused (409) when the product has moved since and the save would do something else.","allOf":[{"$ref":"#/components/schemas/OrgProductQuestionnaireSaveEffect"}]},"tabs":{"maxItems":20,"description":"Every tab, in order. Exactly one documents tab, with at least one section.","type":"array","items":{"$ref":"#/components/schemas/ProductQuestionnaireTabInputDto"}}},"required":["version","saveEffect","tabs"]},"SubmitDocumentFileDto":{"type":"object","properties":{"storageKey":{"type":"string"}},"required":["storageKey"]},"AddOrgProductSectionDocumentsDto":{"type":"object","properties":{"files":{"maxItems":5,"type":"array","items":{"$ref":"#/components/schemas/SubmitDocumentFileDto"}}},"required":["files"]},"AddOrgProductSectionLibraryDocumentsDto":{"type":"object","properties":{"documentIds":{"maxItems":5,"description":"Documents of the organization's library to place.","type":"array","items":{"type":"string","format":"uuid"}}},"required":["documentIds"]},"ReplaceOrgProductSectionDocumentDto":{"type":"object","properties":{"storageKey":{"type":"string"}},"required":["storageKey"]},"DocumentFormSectionDocumentEntity":{"type":"object","properties":{"id":{"type":"string","description":"The library document id"},"file":{"$ref":"#/components/schemas/FileUploadResultEntity"},"canReplace":{"type":"boolean","description":"Whether an admin may re-upload it here, by the library's rule: false for an executed agreement or a generated report, or where a flow holding the file refuses (Backlog, an Act 60 filing sent to DDEC, an R&D ledger). Always false for a client, who has no Re-Upload here."}},"required":["id","file","canReplace"]},"DocumentFormSectionEntity":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":["string","null"]},"files":{"type":"array","items":{"$ref":"#/components/schemas/FileUploadResultEntity"}},"documents":{"description":"`files` with the document behind each, for the admin replace and remove calls.","type":"array","items":{"$ref":"#/components/schemas/DocumentFormSectionDocumentEntity"}},"storageKeys":{"description":"Storage keys of every file placed in the section, `files` or not (a file whose object is gone has no entry there). Send them back as the submit's `loadedStorageKeys`.","type":"array","items":{"type":"string"}}},"required":["id","description","files","documents","storageKeys"]},"DocumentFormEntity":{"type":"object","properties":{"orgProductId":{"type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/OrgProductStatus"}]},"locked":{"type":"boolean","description":"True when the form is read-only (submitted or approved)."},"sections":{"type":"array","items":{"$ref":"#/components/schemas/DocumentFormSectionEntity"}},"tabs":{"description":"The organization's questionnaire. The documents tab's sections share their ids with `sections`.","type":"array","items":{"$ref":"#/components/schemas/ProductQuestionnaireTabDto"}},"answers":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]},"description":"The submitted answers, keyed by question id, in the shapes the submit takes"},"questionnaireVersion":{"type":["string","null"],"format":"date-time","description":"The questionnaire's version, sent back on submit; null without a questionnaire"},"questionnaireChangedAt":{"type":["string","null"],"format":"date-time","description":"The last organization-level edit shown to the client as New, sent back when the client opens the form"}},"required":["orgProductId","status","locked","sections","tabs","answers","questionnaireVersion","questionnaireChangedAt"]},"MarkQuestionnaireSeenDto":{"type":"object","properties":{"changedAt":{"type":"string","format":"date-time","description":"The form's `questionnaireChangedAt` as loaded: only the edits the client was shown are marked seen."}},"required":["changedAt"]},"SubmitDocumentSectionDto":{"type":"object","properties":{"sectionId":{"type":"string"},"description":{"type":["string","null"]},"files":{"maxItems":5,"type":"array","items":{"$ref":"#/components/schemas/SubmitDocumentFileDto"}},"loadedStorageKeys":{"description":"The section's `storageKeys` as the form loaded them. A file the section gained since (an admin's upload) refuses the submit, so it is not dropped unseen.","type":"array","items":{"type":"string"}}},"required":["sectionId","files"]},"ProductQuestionnaireAnswerInputDto":{"type":"object","properties":{"questionId":{"type":"string","format":"uuid"},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}],"description":"Text, email, phone, date (ISO) and single choices are strings; number and money are numbers; yes/no is a boolean; multi select and checkbox are string arrays. Validated server-side against the question's fieldType."}},"required":["questionId","value"]},"SubmitDocumentFormDto":{"type":"object","properties":{"sections":{"maxItems":50,"description":"Every document section, each once. A required one needs a file or a written description.","type":"array","items":{"$ref":"#/components/schemas/SubmitDocumentSectionDto"}},"questionnaireVersion":{"type":"string","format":"date-time","description":"The form's `questionnaireVersion` as loaded. A submit against a questionnaire an admin has changed since is refused, so the client reloads it."},"answers":{"maxItems":2000,"description":"Answers to the questionnaire questions, one each; a required question needs one.","type":"array","items":{"$ref":"#/components/schemas/ProductQuestionnaireAnswerInputDto"}}},"required":["sections","answers"]},"ProductFormPart":{"type":"string","enum":["general","financial"],"description":"Which form flow the client is editing, so working one flow does not mark the other as active: general or financial, never the AUP, which has no form. Omitted, the save records activity on the service but on neither flow."},"RndDraftProgressDto":{"type":"object","properties":{"generalProgress":{"type":"number","minimum":0,"maximum":100},"financialProgress":{"type":"number","minimum":0,"maximum":100},"activePart":{"description":"Which form flow the client is editing, so working one flow does not mark the other as active: general or financial, never the AUP, which has no form. Omitted, the save records activity on the service but on neither flow.","allOf":[{"$ref":"#/components/schemas/ProductFormPart"}]}}},"CreateDraftDto":{"type":"object","properties":{"data":{"type":"object","additionalProperties":true},"progress":{"type":"number","minimum":0,"maximum":100},"rnd":{"$ref":"#/components/schemas/RndDraftProgressDto"}},"required":["data"]},"DraftEntity":{"type":"object","properties":{"id":{"type":"string"},"orgProductId":{"type":"string"},"data":{"type":"object","additionalProperties":true},"progress":{"type":"number","minimum":0,"maximum":100},"createdAt":{"format":"date-time","type":"string"}},"required":["id","orgProductId","data","progress","createdAt"]},"UpdateAssignedAdminsDto":{"type":"object","properties":{"generalAssignedAdminIds":{"maxItems":2,"description":"Admins assigned to the General Information flow. An empty array unassigns.","type":"array","items":{"type":"string"}},"financialAssignedAdminIds":{"maxItems":2,"description":"Admins assigned to the Financial Information flow. An empty array unassigns.","type":"array","items":{"type":"string"}},"aupAssignedAdminIds":{"maxItems":2,"description":"Admins assigned to the AUP part, which only an R&D Tax Credit has. An empty array unassigns.","type":"array","items":{"type":"string"}}}},"UpdatePartStatusDto":{"type":"object","properties":{"part":{"type":"string","enum":["general","financial","aup"]},"adminStatus":{"type":"string","enum":["not_started_yet","data_collection","blocked_client","internal_drafting","internal_review","ready","blocked_internal","on_hold","submitted_to_government","not_approved","approved","monetized","data_received","financial_modeling","financial_model_approved","cpa_sample_selection","internal_vouching","cpa_vouching","cpa_certified","certified"],"description":"Layer-3 admin status. Valid values depend on part: TaxCreditGeneralAdminStatus for general, TaxCreditFinancialAdminStatus for financial (an R&D Tax Credit without the four AUP stages), TaxCreditAupAdminStatus for aup, which only an R&D Tax Credit has."}},"required":["part","adminStatus"]},"TaxCreditGovernmentSubmissionDto":{"type":"object","properties":{"feeAmount":{"type":"number","description":"Fee paid to the government with the application; 0 is allowed."},"feeDescription":{"type":["string","null"],"description":"Omitted or null leaves the fee without a description."},"feePaidOn":{"type":"string","example":"2026-09-14"},"submittedOn":{"type":"string","example":"2026-09-14","description":"The day the application was sent to the government, which the amendment letter cites as its filing date. On a move to Submitted, omitted means today, and the day already recorded keeps its submitter; picking Submitted again corrects the recorded day, or leaves it when omitted."}},"required":["feeAmount","feePaidOn"]},"TaxCreditGovernmentCertificationDto":{"type":"object","properties":{"certifiedOn":{"type":"string","example":"2026-11-20"},"certifiedAmount":{"type":"number","description":"The eligible investment the government certified."}},"required":["certifiedOn","certifiedAmount"]},"TaxCreditGovernmentApprovalDto":{"type":"object","properties":{"approvedOn":{"type":"string","example":"2027-01-30"},"approvedAmount":{"type":"number"},"finalDocumentStorageKeys":{"description":"The Final Document set as the form leaves it. Against `openedFinalDocumentStorageKeys` it says which files this save adds and removes; the rest of the stored set is left as it is.","type":"array","items":{"type":"string"}},"openedFinalDocumentStorageKeys":{"description":"The Final Document set the form was opened with, so a file another admin added meanwhile is kept and one they removed is not filed again. A merged set outside 1–5 files is refused with 409 `application_changed`.","type":"array","items":{"type":"string"}}},"required":["approvedOn","approvedAmount","finalDocumentStorageKeys","openedFinalDocumentStorageKeys"]},"UpdateApplicationStatusDto":{"type":"object","properties":{"applicationStatus":{"type":"string","enum":["not_started_yet","application_in_progress","blocked_internal","application_ready_to_submit","application_submitted","application_certified","application_approved","application_not_approved","partially_monetized","monetized"],"description":"Layer-4 overall application status. Stored as given and settable regardless of the qualitative and quantitative part statuses."},"expectedApplicationStatus":{"description":"The status the admin picked from (the current one when correcting figures). A request is refused with 409 `application_changed` once the stored status differs.","allOf":[{"$ref":"#/components/schemas/ProductApplicationStatus"}]},"governmentSubmission":{"description":"Required when the status is `application_submitted`; dropped for any other status.","allOf":[{"$ref":"#/components/schemas/TaxCreditGovernmentSubmissionDto"}]},"governmentCertification":{"description":"Required when the status is `application_certified`; dropped for any other status.","allOf":[{"$ref":"#/components/schemas/TaxCreditGovernmentCertificationDto"}]},"governmentApproval":{"description":"Required when the status is `application_approved`; dropped for any other status.","allOf":[{"$ref":"#/components/schemas/TaxCreditGovernmentApprovalDto"}]}},"required":["applicationStatus","expectedApplicationStatus"]},"TaxCreditApplicationDetailsDto":{"type":"object","properties":{"governmentFeeAmount":{"type":["number","null"]},"governmentFeeDescription":{"type":["string","null"]},"governmentFeePaidOn":{"type":["string","null"],"example":"2026-09-14"},"submittedToGovernmentAt":{"format":"date-time","type":["string","null"]},"submittedToGovernmentByName":{"type":["string","null"]},"governmentCertifiedOn":{"type":["string","null"],"example":"2026-11-20"},"certifiedEligibleAmount":{"type":["number","null"]},"governmentApprovedOn":{"type":["string","null"],"example":"2027-01-30"},"approvedCreditAmount":{"type":["number","null"]},"monetizedCreditAmount":{"type":["number","null"]},"remainingCreditAmount":{"type":["number","null"],"description":"Approved minus monetized; null until an approved amount is recorded."},"internalVouchingProgress":{"type":["number","null"],"description":"Percent of the AUP sample transactions Vouched without exception on the Vouching page; null when the product has no AUP sample."}},"required":["governmentFeeAmount","governmentFeeDescription","governmentFeePaidOn","submittedToGovernmentAt","submittedToGovernmentByName","governmentCertifiedOn","certifiedEligibleAmount","governmentApprovedOn","approvedCreditAmount","monetizedCreditAmount","remainingCreditAmount","internalVouchingProgress"]},"UpdateTaxCreditApplicationDetailsDto":{"type":"object","properties":{"submittedToGovernmentOn":{"type":"string","example":"2026-09-14","description":"The day the application was sent to the government, which the amendment letter cites as its filing date. The government fee is left as it is."},"governmentCertification":{"$ref":"#/components/schemas/TaxCreditGovernmentCertificationDto"},"governmentApproval":{"$ref":"#/components/schemas/TaxCreditGovernmentApprovalDto"},"monetizedAmount":{"type":"number","description":"Tax credits monetized so far, from 0 up to the approved amount."}}},"ProductDocumentStatus":{"type":"string","enum":["doc_needed","ready_for_review","approved"]},"ProductDocumentFileDto":{"type":"object","properties":{"id":{"type":"string"},"storageKey":{"type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/ProductDocumentStatus"}]},"uploadedAt":{"format":"date-time","type":"string"},"originalName":{"type":["string","null"],"description":"The name it was uploaded under, which a rename keeps."},"file":{"anyOf":[{"$ref":"#/components/schemas/FileUploadResultEntity"},{"type":"null"}]}},"required":["id","storageKey","status","uploadedAt","originalName","file"]},"UpdateTaxCreditFinalDocumentsDto":{"type":"object","properties":{"finalDocumentStorageKeys":{"description":"The Final Document set as the card leaves it. Against `openedFinalDocumentStorageKeys` it says which files this save adds and removes; the rest of the stored set is left as it is.","type":"array","items":{"type":"string"}},"openedFinalDocumentStorageKeys":{"description":"The Final Document set the card showed, so a file another admin added meanwhile is kept and one they removed is not filed again.","type":"array","items":{"type":"string"}}},"required":["finalDocumentStorageKeys","openedFinalDocumentStorageKeys"]},"ExpenseAttachmentDto":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"originalName":{"type":"string"},"contentType":{"type":"string"},"fileSize":{"type":"number","description":"Size in bytes."}},"required":["id","url","originalName","contentType","fileSize"]},"ExpensePaymentMethodEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"PersonalExpenseStatus":{"type":"string","enum":["for_review","missing_attachment","pending_accounting","completed","cancelled"],"description":"Approval and payment in one. Kept in step with the files while Missing attachment or For Review; finance sets the rest. Completed and Cancelled lock the claim and its files; until then its author edits and deletes it."},"PersonalExpenseDto":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number","description":"Amount in USD."},"expenseDate":{"type":"string","format":"date"},"description":{"type":"string"},"attachments":{"description":"Receipts, invoices, expense reports or mileage records, oldest first; at most 5. None reads as a missing attachment.","type":"array","items":{"$ref":"#/components/schemas/ExpenseAttachmentDto"}},"paymentMethod":{"description":"How it was paid, when its author picked a payment method. On a personal claim finance can change it, and it is always set once the claim is Completed.","anyOf":[{"$ref":"#/components/schemas/ExpensePaymentMethodEntity"},{"type":"null"}]},"organizationName":{"type":["string","null"],"description":"The organization’s name; the one it had when linked once it is removed. Null for a claim on no organization."},"submittedBy":{"anyOf":[{"$ref":"#/components/schemas/UserSummaryEntity"},{"type":"null"}]},"status":{"description":"Approval and payment in one. Kept in step with the files while Missing attachment or For Review; finance sets the rest. Completed and Cancelled lock the claim and its files; until then its author edits and deletes it.","allOf":[{"$ref":"#/components/schemas/PersonalExpenseStatus"}]}},"required":["id","amount","expenseDate","description","attachments","paymentMethod","organizationName","submittedBy","status"]},"PersonalExpensesResponseDto":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PersonalExpenseDto"}}},"required":["meta","data"]},"CreatePersonalExpenseDto":{"type":"object","properties":{"amount":{"type":"number","minimum":0.01,"description":"Amount in USD, up to two decimals."},"expenseDate":{"type":"string","format":"date","description":"The day the expense was paid (YYYY-MM-DD), never in the future."},"description":{"type":"string","minLength":1,"maxLength":1000},"paymentMethodId":{"type":["string","null"],"format":"uuid","description":"How the expense was paid, from `GET /expense-payment-methods`; null for none."},"storageKeys":{"description":"Up to 5 files the current admin uploaded through `POST /files/upload` and nothing holds yet: receipts, invoices, expense reports or mileage records.","type":"array","items":{"type":"string"}},"organizationId":{"type":["string","null"],"format":"uuid","description":"One of the current admin’s organizations that is not archived, when the expense was for it (403 otherwise); it cannot change once submitted."}},"required":["amount","expenseDate","description"]},"UpdateExpenseDto":{"type":"object","properties":{"amount":{"type":"number","minimum":0.01,"description":"Amount in USD, up to two decimals."},"expenseDate":{"type":"string","format":"date","description":"The day the expense was paid (YYYY-MM-DD), never in the future."},"description":{"type":"string","minLength":1,"maxLength":1000},"paymentMethodId":{"type":["string","null"],"format":"uuid","description":"How the expense was paid, from `GET /expense-payment-methods`; null for none."}}},"ExpenseOrganizationOptionsDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationRefDto"}},"isTruncated":{"type":"boolean","description":"More organizations qualify than the list holds; the rest are left out."}},"required":["data","isTruncated"]},"OrgProductExpenseDto":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number","description":"Amount in USD."},"expenseDate":{"type":"string","format":"date"},"description":{"type":"string"},"attachments":{"description":"Receipts, invoices, expense reports or mileage records, oldest first; at most 5. None reads as a missing attachment.","type":"array","items":{"$ref":"#/components/schemas/ExpenseAttachmentDto"}},"paymentMethod":{"description":"How it was paid, when its author picked a payment method. On a personal claim finance can change it, and it is always set once the claim is Completed.","anyOf":[{"$ref":"#/components/schemas/ExpensePaymentMethodEntity"},{"type":"null"}]},"serviceName":{"type":"string","description":"The service’s name; the one it had when logged once the service is removed."},"organizationId":{"type":["string","null"],"description":"Null once the organization is removed."},"organizationName":{"type":"string","description":"The organization’s name; the one it had when logged once the organization is removed."},"isEditable":{"type":"boolean","description":"The current admin still has access: its organization is not archived, and they can read it (every organization for a super admin or with Preview all organizations, the ones they belong to otherwise) or the service is assigned to them. Never once the organization is removed."},"isLocked":{"type":"boolean","description":"Its reimbursement is Billed or Paid: the expense keeps what was invoiced and can no longer be edited or deleted. Unlike a time entry, whose record stays billed once it was, the lock lifts when finance moves the reimbursement back."}},"required":["id","amount","expenseDate","description","attachments","paymentMethod","serviceName","organizationId","organizationName","isEditable","isLocked"]},"OrgProductExpensesResponseDto":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/OrgProductExpenseDto"}}},"required":["meta","data"]},"CreateOrgProductExpenseDto":{"type":"object","properties":{"amount":{"type":"number","minimum":0.01,"description":"Amount in USD, up to two decimals."},"expenseDate":{"type":"string","format":"date","description":"The day the expense was paid (YYYY-MM-DD), never in the future."},"description":{"type":"string","minLength":1,"maxLength":1000},"paymentMethodId":{"type":["string","null"],"format":"uuid","description":"How the expense was paid, from `GET /expense-payment-methods`; null for none."},"storageKeys":{"description":"Up to 5 files the current admin uploaded through `POST /files/upload` and nothing holds yet: receipts, invoices, expense reports or mileage records.","type":"array","items":{"type":"string"}},"orgProductId":{"type":"string","format":"uuid","description":"A service with Time Log that is assigned to the current admin, on an organization that is not archived."}},"required":["amount","expenseDate","description","orgProductId"]},"UpdatePersonalExpenseReimbursementDto":{"type":"object","properties":{"status":{"description":"Any status; Completed needs a payment method, set before or in the same request. Approving (Pending Accounting) never marks the claim paid.","allOf":[{"$ref":"#/components/schemas/PersonalExpenseStatus"}]},"paymentMethodId":{"type":["string","null"],"format":"uuid","description":"From `GET /expense-payment-methods`."}}},"AddExpenseAttachmentsDto":{"type":"object","properties":{"storageKeys":{"description":"Up to 5 files the current admin uploaded through `POST /files/upload` and nothing holds yet: receipts, invoices, expense reports or mileage records.","type":"array","items":{"type":"string"}}},"required":["storageKeys"]},"CreateExpenseCatalogueItemDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255}},"required":["name"]},"UpdateDdecResponsibleDto":{"type":"object","properties":{"ddecOfficerIds":{"maxItems":2,"description":"The DDEC officers handling the application, 2 at most, in the order they were picked. An empty array leaves it unassigned.","type":"array","items":{"type":"string"}}},"required":["ddecOfficerIds"]},"AddDdecOfficerDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"description":"An officer with this name already, ignoring case, is returned as it is instead of a new one."},"addressedAs":{"type":["string","null"],"maxLength":255,"description":"How an amendment letter greets the officer, e.g. \"Mr. Castro-Segarra\" for \"Dear Mr. Castro-Segarra,\". Left out, blank or null greets by name, flagged for review."}},"required":["name"]},"UpdateDdecOfficerDto":{"type":"object","properties":{"addressedAs":{"type":["string","null"],"maxLength":255,"description":"How an amendment letter greets the officer, e.g. \"Mr. Castro-Segarra\" for \"Dear Mr. Castro-Segarra,\". Blank or null greets by name, flagged for review; left out, it stays as it is."}}},"EntityProfileCompletionDto":{"type":"object","properties":{"isComplete":{"type":"boolean","description":"True when every required field for the entity profile is filled; false when the profile does not exist yet or is missing required fields."},"missingFields":{"description":"Dot-paths of the required fields the saved profile is still missing, e.g. \"legalName\", \"physicalAddress.city\", \"shareholders.0.fullName\". Each path matches the form field of the same name, so the client can highlight them. A profile that does not exist yet reports its baseline required fields. Empty only when the profile is complete.","type":"array","items":{"type":"string"}}},"required":["isComplete","missingFields"]},"OwnerType":{"type":"string","enum":["individual","entity"]},"BusinessProfileUltimateOwnerEntity":{"type":"object","properties":{"id":{"type":"string"},"ownerType":{"anyOf":[{"$ref":"#/components/schemas/OwnerType"},{"type":"null"}]},"fullName":{"type":["string","null"]},"ssnOrEin":{"type":["string","null"]},"ownerEmail":{"type":["string","null"]},"ownerPhone":{"type":["string","null"]},"ownershipPercentage":{"type":["number","null"]},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"}},"required":["id","ownerType","fullName","ssnOrEin","ownerEmail","ownerPhone","ownershipPercentage","physicalAddress"]},"BusinessProfileShareholderEntity":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"type":"string"},"ssnOrEin":{"type":["string","null"]},"ownerType":{"type":["string","null"],"enum":["individual","entity",null]},"ownerEmail":{"type":["string","null"]},"ownerPhone":{"type":["string","null"]},"placeOfBirth":{"type":["string","null"]},"dateOfBirth":{"format":"date-time","type":["string","null"]},"dateOfOrganization":{"format":"date-time","type":["string","null"]},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"postalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"ownershipPercentage":{"type":"number"},"isParentCompany":{"type":["boolean","null"]},"ultimateOwners":{"type":"array","items":{"$ref":"#/components/schemas/BusinessProfileUltimateOwnerEntity"}}},"required":["id","fullName","ssnOrEin","ownerType","ownerEmail","ownerPhone","placeOfBirth","dateOfBirth","dateOfOrganization","physicalAddress","postalAddress","ownershipPercentage","isParentCompany","ultimateOwners"]},"BusinessProfileEntity":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"legalBusinessName":{"type":["string","null"]},"ein":{"type":["string","null"]},"registerNumber":{"type":["string","null"]},"dosRegistrationPending":{"type":["boolean","null"]},"isLegallyRegistered":{"type":["boolean","null"]},"registrationLocations":{"type":"array","items":{"$ref":"#/components/schemas/ProspectRegistrationLocation"}},"registrationState":{"type":["string","null"]},"registrationCountry":{"type":["string","null"]},"dosRegistrationDate":{"format":"date-time","type":["string","null"]},"incorporationCountry":{"type":["string","null"]},"incorporationState":{"type":["string","null"]},"organizationType":{"type":["string","null"],"enum":["corporation","limited_liability_company","partnership","sole_proprietor","other",null]},"otherOrganizationType":{"type":["string","null"]},"taxationMethod":{"type":["string","null"],"enum":["corporation","individual","partnership","other",null]},"otherTaxationMethod":{"type":["string","null"]},"corporateResidency":{"type":["string","null"],"enum":["domestic_pr","foreign_usa","foreign_non_usa",null]},"companyCreationDate":{"format":"date-time","type":["string","null"]},"commencementOfOperations":{"format":"date-time","type":["string","null"]},"fiscalYearEnd":{"type":["string","null"],"example":"Dec-31","description":"MMM-DD, no year"},"decreeStatus":{"anyOf":[{"$ref":"#/components/schemas/ProspectDecreeStatus"},{"type":"null"}]},"taxExemptionGrantNumber":{"type":["string","null"]},"decreeType":{"anyOf":[{"$ref":"#/components/schemas/ProspectBusinessDecreeType"},{"type":"null"}]},"decreeSubmissionDate":{"format":"date-time","type":["string","null"]},"decreeApprovalDate":{"format":"date-time","type":["string","null"]},"businessEmail":{"type":["string","null"]},"businessPhoneNumber":{"type":["string","null"]},"websiteUrl":{"type":["string","null"]},"isDba":{"type":["boolean","null"]},"dbaName":{"type":["string","null"]},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"postalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"pocFullName":{"type":["string","null"]},"pocRelationWithCompany":{"type":["string","null"]},"pocEmail":{"type":["string","null"]},"pocPhoneNumber":{"type":["string","null"]},"isSubsidiary":{"type":["boolean","null"]},"parentCompanyName":{"type":["string","null"]},"parentCompanyAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"isOperatingInPr":{"type":["boolean","null"]},"industries":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndustry"}},"otherIndustryDescription":{"type":["string","null"]},"taxCreditsReceived":{"type":"array","items":{"$ref":"#/components/schemas/ProspectTaxCreditType"}},"noTaxCreditsIssued":{"type":["boolean","null"]},"performsRnd":{"type":["boolean","null"]},"performedRnd":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"rndSpendCurrentYear":{"type":["number","null"]},"rndSpendNextYear":{"type":["number","null"]},"receivedFederalGrants":{"type":["boolean","null"]},"federalGrantFundingReceived":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"businessDescription":{"type":["string","null"]},"masterFolderUrl":{"type":["string","null"]},"companyLogoStorageKey":{"type":["string","null"]},"clientSavedAt":{"format":"date-time","type":["string","null"],"description":"The client's last save of the form; null until then, while the form starts from the prospect's answers."},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"shareholders":{"type":"array","items":{"$ref":"#/components/schemas/BusinessProfileShareholderEntity"}},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/BusinessProfileContactEntity"}}},"required":["id","orgId","legalBusinessName","ein","registerNumber","dosRegistrationPending","isLegallyRegistered","registrationLocations","registrationState","registrationCountry","dosRegistrationDate","incorporationCountry","incorporationState","organizationType","otherOrganizationType","taxationMethod","otherTaxationMethod","corporateResidency","companyCreationDate","commencementOfOperations","fiscalYearEnd","decreeStatus","taxExemptionGrantNumber","decreeType","decreeSubmissionDate","decreeApprovalDate","businessEmail","businessPhoneNumber","websiteUrl","isDba","dbaName","physicalAddress","postalAddress","pocFullName","pocRelationWithCompany","pocEmail","pocPhoneNumber","isSubsidiary","parentCompanyName","parentCompanyAddress","isOperatingInPr","industries","otherIndustryDescription","taxCreditsReceived","noTaxCreditsIssued","performsRnd","performedRnd","rndSpendCurrentYear","rndSpendNextYear","receivedFederalGrants","federalGrantFundingReceived","businessDescription","masterFolderUrl","companyLogoStorageKey","clientSavedAt","createdAt","updatedAt","shareholders","contacts"]},"BusinessProfileAnswersPrefillContactDto":{"type":"object","properties":{"fullName":{"type":"string"},"relationship":{"type":["string","null"]},"isAuthorizedSigner":{"type":"boolean"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["fullName","relationship","isAuthorizedSigner","email","phone"]},"BusinessProfileAnswersPrefillDto":{"type":"object","properties":{"legalBusinessName":{"type":["string","null"]},"isLegallyRegistered":{"type":["boolean","null"]},"registrationLocations":{"type":"array","items":{"$ref":"#/components/schemas/ProspectRegistrationLocation"}},"registrationState":{"type":["string","null"]},"registrationCountry":{"type":["string","null"]},"decreeStatus":{"anyOf":[{"$ref":"#/components/schemas/ProspectDecreeStatus"},{"type":"null"}]},"taxExemptionGrantNumber":{"type":["string","null"]},"decreeType":{"anyOf":[{"$ref":"#/components/schemas/ProspectBusinessDecreeType"},{"type":"null"}]},"websiteUrl":{"type":["string","null"]},"dbaName":{"type":["string","null"]},"isOperatingInPr":{"type":["boolean","null"]},"industries":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndustry"}},"taxCreditsReceived":{"type":"array","items":{"$ref":"#/components/schemas/ProspectTaxCreditType"}},"noTaxCreditsIssued":{"type":["boolean","null"]},"performedRnd":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"rndSpendCurrentYear":{"type":["number","null"]},"rndSpendNextYear":{"type":["number","null"]},"federalGrantFundingReceived":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"businessDescription":{"type":["string","null"]},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/BusinessProfileAnswersPrefillContactDto"}}},"required":["legalBusinessName","isLegallyRegistered","registrationLocations","registrationState","registrationCountry","decreeStatus","taxExemptionGrantNumber","decreeType","websiteUrl","dbaName","isOperatingInPr","industries","taxCreditsReceived","noTaxCreditsIssued","performedRnd","rndSpendCurrentYear","rndSpendNextYear","federalGrantFundingReceived","businessDescription","contacts"]},"CountryCode":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","MK","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"ISO 3166-1 alpha-2 country code. \"PR\" is its own entry."},"UsStateCode":{"type":"string","enum":["AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY"],"description":"USPS state code. Required when incorporationCountry is \"US\"; ignored otherwise."},"OptionalAddressDto":{"type":"object","properties":{"addressLine1":{"type":["string","null"],"example":"123 Industrial Ave"},"addressLine2":{"type":["string","null"],"example":"Building 4"},"city":{"type":["string","null"],"example":"San Juan"},"region":{"type":["string","null"],"example":"PR"},"postalCode":{"type":["string","null"],"example":"00901"},"country":{"example":"US","description":"ISO 3166-1 alpha-2 country code. \"PR\" is its own entry.","anyOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]}}},"BusinessProfileUltimateOwnerDto":{"type":"object","properties":{"id":{"type":"string","description":"Existing row id. Omit to create new."},"ssn":{"type":["string","null"],"example":"123-45-6789","description":"Individual owners only. Stored encrypted; omit to keep the stored one, null to clear it."},"ein":{"type":["string","null"],"example":"66-1234567","description":"Entity owners only. Stored encrypted; omit to keep the stored one, null to clear it."},"ownerEmail":{"type":"string","example":"john.smith@acmecorp.com"},"ownerPhone":{"type":"string","example":"+17871234567"},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressDto"},"ownerType":{"example":"individual","allOf":[{"$ref":"#/components/schemas/OwnerType"}]},"fullName":{"type":"string","example":"Jane Smith"},"ownershipPercentage":{"type":"number","minimum":0.01,"maximum":100,"example":50.5}}},"BusinessProfileOwnerDto":{"type":"object","properties":{"id":{"type":"string","description":"Existing row id. Omit to create new."},"ssn":{"type":["string","null"],"example":"123-45-6789","description":"Individual owners only. Stored encrypted; omit to keep the stored one, null to clear it."},"ein":{"type":["string","null"],"example":"66-1234567","description":"Entity owners only. Stored encrypted; omit to keep the stored one, null to clear it."},"ownerEmail":{"type":"string","example":"john.smith@acmecorp.com"},"ownerPhone":{"type":"string","example":"+17871234567"},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressDto"},"ownerType":{"type":"string","enum":["individual","entity"],"example":"individual"},"fullName":{"type":"string","example":"John Smith"},"ownershipPercentage":{"type":"number","minimum":0.01,"maximum":100,"example":50.5},"isParentCompany":{"type":"boolean","description":"Entity owners only: the business is its subsidiary."},"ultimateOwners":{"description":"Entity owners only: who ultimately owns the entity, one level deep, up to 20. Sending replaces the stored list.","type":"array","items":{"$ref":"#/components/schemas/BusinessProfileUltimateOwnerDto"}}},"required":["ownerType","fullName","ownershipPercentage"]},"BusinessProfileContactDto":{"type":"object","properties":{"id":{"type":"string","description":"Existing contact id. Omit to create new."},"fullName":{"type":"string","example":"Lucas Bennett"},"relationship":{"type":"string","example":"Managing Member"},"isAuthorizedSigner":{"type":"boolean","example":true},"email":{"type":"string","example":"lucas@acmecorp.com"},"phone":{"type":"string","example":"+14155550142"}}},"CreateBusinessProfileDto":{"type":"object","properties":{"legalBusinessName":{"type":"string","example":"Acme Corporation Inc."},"ein":{"type":"string","example":"66-1234567"},"registerNumber":{"type":"string","example":"123456789"},"dosRegistrationPending":{"type":"boolean","example":false,"description":"True when the entity is not yet registered and DECA will complete the DoS registration number later."},"isLegallyRegistered":{"type":"boolean","example":true},"registrationLocations":{"type":"array","example":["puerto_rico"],"description":"Kept only when isLegallyRegistered is true","items":{"$ref":"#/components/schemas/ProspectRegistrationLocation"}},"registrationState":{"type":"string","example":"Delaware","description":"Kept only when registrationLocations has us_mainland"},"registrationCountry":{"type":"string","example":"Spain","description":"Kept only when registrationLocations has international"},"dosRegistrationDate":{"type":"string","example":"2019-03-14","description":"Kept only when registrationLocations has puerto_rico"},"incorporationCountry":{"example":"US","description":"ISO 3166-1 alpha-2 country code. \"PR\" is its own entry.","allOf":[{"$ref":"#/components/schemas/CountryCode"}]},"incorporationState":{"example":"DE","description":"USPS state code. Required when incorporationCountry is \"US\"; ignored otherwise.","allOf":[{"$ref":"#/components/schemas/UsStateCode"}]},"organizationType":{"type":"string","enum":["corporation","limited_liability_company","partnership","sole_proprietor","other"],"example":"corporation"},"otherOrganizationType":{"type":"string","example":"Non-profit organization","description":"Required when organizationType is \"other\""},"taxationMethod":{"type":"string","enum":["corporation","individual","partnership","other"],"example":"corporation"},"otherTaxationMethod":{"type":"string","example":"Exempt organization","description":"Required when taxationMethod is \"other\""},"corporateResidency":{"type":"string","enum":["domestic_pr","foreign_usa","foreign_non_usa"],"example":"domestic_pr"},"companyCreationDate":{"type":"string","example":"2020-01-15"},"commencementOfOperations":{"type":"string","example":"2020-03-01"},"fiscalYearEnd":{"type":"string","example":"Dec-31","description":"MMM-DD with no year; February ends at 28."},"decreeStatus":{"example":"none_filed","allOf":[{"$ref":"#/components/schemas/ProspectDecreeStatus"}]},"taxExemptionGrantNumber":{"type":"string","example":"TAX-2024-001"},"decreeType":{"example":"act_60","allOf":[{"$ref":"#/components/schemas/ProspectBusinessDecreeType"}]},"decreeSubmissionDate":{"type":"string","example":"2024-01-15"},"decreeApprovalDate":{"type":"string","example":"2024-03-01"},"businessEmail":{"type":"string","example":"info@acmecorp.com"},"businessPhoneNumber":{"type":"string","example":"+17871234567"},"websiteUrl":{"type":"string","example":"https://www.acmecorp.com"},"isDba":{"type":"boolean","example":false},"dbaName":{"type":"string","example":"Acme Trading Co.","description":"DBA (Doing Business As) name - required when isDba is true"},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressDto"},"postalAddress":{"$ref":"#/components/schemas/OptionalAddressDto"},"pocFullName":{"type":"string","example":"Jane Doe","description":"POC (Point of Contact) full name"},"pocRelationWithCompany":{"type":"string","example":"Chief Financial Officer"},"pocEmail":{"type":"string","example":"jane.doe@acmecorp.com"},"pocPhoneNumber":{"type":"string","example":"+17873456789"},"isSubsidiary":{"type":"boolean","example":false},"parentCompanyName":{"type":"string","example":"Parent Corp International","description":"Kept only when isSubsidiary is true; an entity owner marked as the parent company names it instead."},"parentCompanyAddress":{"description":"Kept only when isSubsidiary is true; an entity owner marked as the parent company gives it instead.","allOf":[{"$ref":"#/components/schemas/OptionalAddressDto"}]},"isOperatingInPr":{"type":"boolean","example":true},"industries":{"type":"array","example":["technology"],"items":{"$ref":"#/components/schemas/ProspectIndustry"}},"otherIndustryDescription":{"type":"string","example":"Marine logistics","description":"Free-text detail when industries includes \"other\""},"taxCreditsReceived":{"type":"array","example":["rnd"],"items":{"$ref":"#/components/schemas/ProspectTaxCreditType"}},"noTaxCreditsIssued":{"type":["boolean","null"],"example":true},"performsRnd":{"type":"boolean","example":true,"description":"Yes / no form of performedRnd; send one of the two."},"performedRnd":{"example":"yes","allOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"}]},"rndSpendCurrentYear":{"type":"number","example":150000},"rndSpendNextYear":{"type":"number","example":200000},"receivedFederalGrants":{"type":"boolean","example":false,"description":"Yes / no form of federalGrantFundingReceived; send one of the two."},"federalGrantFundingReceived":{"example":"no","allOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"}]},"businessDescription":{"type":"string","maxLength":5000},"masterFolderUrl":{"type":"string","example":"https://drive.google.com/drive/folders/xxxxx"},"shareholders":{"description":"Full ownership stack for the organization. Sending replaces existing owners; omit to leave unchanged, or send an empty array to clear all owners. Must sum to 100% and contain up to 20 owners when non-empty.","type":"array","items":{"$ref":"#/components/schemas/BusinessProfileOwnerDto"}},"contacts":{"description":"Points of contact, up to 20. Sending replaces the stored list; omit to leave it unchanged.","type":"array","items":{"$ref":"#/components/schemas/BusinessProfileContactDto"}}}},"UpdateBusinessProfileDto":{"type":"object","properties":{"legalBusinessName":{"type":"string","example":"Acme Corporation Inc."},"ein":{"type":"string","example":"66-1234567"},"registerNumber":{"type":"string","example":"123456789"},"dosRegistrationPending":{"type":"boolean","example":false,"description":"True when the entity is not yet registered and DECA will complete the DoS registration number later."},"isLegallyRegistered":{"type":"boolean","example":true},"registrationLocations":{"type":"array","example":["puerto_rico"],"description":"Kept only when isLegallyRegistered is true","items":{"$ref":"#/components/schemas/ProspectRegistrationLocation"}},"registrationState":{"type":"string","example":"Delaware","description":"Kept only when registrationLocations has us_mainland"},"registrationCountry":{"type":"string","example":"Spain","description":"Kept only when registrationLocations has international"},"dosRegistrationDate":{"type":"string","example":"2019-03-14","description":"Kept only when registrationLocations has puerto_rico"},"incorporationCountry":{"example":"US","description":"ISO 3166-1 alpha-2 country code. \"PR\" is its own entry.","allOf":[{"$ref":"#/components/schemas/CountryCode"}]},"incorporationState":{"example":"DE","description":"USPS state code. Required when incorporationCountry is \"US\"; ignored otherwise.","allOf":[{"$ref":"#/components/schemas/UsStateCode"}]},"organizationType":{"type":"string","enum":["corporation","limited_liability_company","partnership","sole_proprietor","other"],"example":"corporation"},"otherOrganizationType":{"type":"string","example":"Non-profit organization","description":"Required when organizationType is \"other\""},"taxationMethod":{"type":"string","enum":["corporation","individual","partnership","other"],"example":"corporation"},"otherTaxationMethod":{"type":"string","example":"Exempt organization","description":"Required when taxationMethod is \"other\""},"corporateResidency":{"type":"string","enum":["domestic_pr","foreign_usa","foreign_non_usa"],"example":"domestic_pr"},"companyCreationDate":{"type":"string","example":"2020-01-15"},"commencementOfOperations":{"type":"string","example":"2020-03-01"},"fiscalYearEnd":{"type":"string","example":"Dec-31","description":"MMM-DD with no year; February ends at 28."},"decreeStatus":{"example":"none_filed","allOf":[{"$ref":"#/components/schemas/ProspectDecreeStatus"}]},"taxExemptionGrantNumber":{"type":"string","example":"TAX-2024-001"},"decreeType":{"example":"act_60","allOf":[{"$ref":"#/components/schemas/ProspectBusinessDecreeType"}]},"decreeSubmissionDate":{"type":"string","example":"2024-01-15"},"decreeApprovalDate":{"type":"string","example":"2024-03-01"},"businessEmail":{"type":"string","example":"info@acmecorp.com"},"businessPhoneNumber":{"type":"string","example":"+17871234567"},"websiteUrl":{"type":"string","example":"https://www.acmecorp.com"},"isDba":{"type":"boolean","example":false},"dbaName":{"type":"string","example":"Acme Trading Co.","description":"DBA (Doing Business As) name - required when isDba is true"},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressDto"},"postalAddress":{"$ref":"#/components/schemas/OptionalAddressDto"},"pocFullName":{"type":"string","example":"Jane Doe","description":"POC (Point of Contact) full name"},"pocRelationWithCompany":{"type":"string","example":"Chief Financial Officer"},"pocEmail":{"type":"string","example":"jane.doe@acmecorp.com"},"pocPhoneNumber":{"type":"string","example":"+17873456789"},"isSubsidiary":{"type":"boolean","example":false},"parentCompanyName":{"type":"string","example":"Parent Corp International","description":"Kept only when isSubsidiary is true; an entity owner marked as the parent company names it instead."},"parentCompanyAddress":{"description":"Kept only when isSubsidiary is true; an entity owner marked as the parent company gives it instead.","allOf":[{"$ref":"#/components/schemas/OptionalAddressDto"}]},"isOperatingInPr":{"type":"boolean","example":true},"industries":{"type":"array","example":["technology"],"items":{"$ref":"#/components/schemas/ProspectIndustry"}},"otherIndustryDescription":{"type":"string","example":"Marine logistics","description":"Free-text detail when industries includes \"other\""},"taxCreditsReceived":{"type":"array","example":["rnd"],"items":{"$ref":"#/components/schemas/ProspectTaxCreditType"}},"noTaxCreditsIssued":{"type":["boolean","null"],"example":true},"performsRnd":{"type":"boolean","example":true,"description":"Yes / no form of performedRnd; send one of the two."},"performedRnd":{"example":"yes","allOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"}]},"rndSpendCurrentYear":{"type":"number","example":150000},"rndSpendNextYear":{"type":"number","example":200000},"receivedFederalGrants":{"type":"boolean","example":false,"description":"Yes / no form of federalGrantFundingReceived; send one of the two."},"federalGrantFundingReceived":{"example":"no","allOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"}]},"businessDescription":{"type":"string","maxLength":5000},"masterFolderUrl":{"type":"string","example":"https://drive.google.com/drive/folders/xxxxx"},"shareholders":{"description":"Full ownership stack for the organization. Sending replaces existing owners; omit to leave unchanged, or send an empty array to clear all owners. Must sum to 100% and contain up to 20 owners when non-empty.","type":"array","items":{"$ref":"#/components/schemas/BusinessProfileOwnerDto"}},"contacts":{"description":"Points of contact, up to 20. Sending replaces the stored list; omit to leave it unchanged.","type":"array","items":{"$ref":"#/components/schemas/BusinessProfileContactDto"}}}},"CreateIndividualProfileDto":{"type":"object","properties":{"legalName":{"type":"string","example":"John Doe"},"birthdate":{"type":"string","example":"1990-01-15"},"birthplaceOrCity":{"type":"string","example":"San Juan"},"gender":{"type":"string","enum":["male","female","other"]},"maritalStatus":{"type":"string","enum":["single","married","divorced","widowed","separated"]},"hasChildren":{"type":"boolean","example":true},"numberOfChildren":{"type":"number","example":2,"description":"Required when hasChildren is true"},"citizenship":{"example":"US","description":"ISO 3166-1 alpha-2 country code. \"PR\" is its own entry.","allOf":[{"$ref":"#/components/schemas/CountryCode"}]},"prResidency":{"type":"string","enum":["resident","planning_relocation","exploring_relocation"]},"idType":{"type":"string","enum":["social_security_number","national_id"]},"socialSecurityNumber":{"type":"string","example":"123-45-6789","description":"Required when idType is social_security_number"},"nationalIdNumber":{"type":"string","description":"Required when idType is national_id"},"licenseNumber":{"type":"string"},"merchantRegistrationNumber":{"type":"string"},"email":{"type":"string","example":"john.doe@example.com"},"phone":{"type":"string","example":"+17871234567"},"mobileNumber":{"type":"string","example":"+17871234568"},"fax":{"type":"string","example":"+17871234569"},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressDto"},"postalAddress":{"$ref":"#/components/schemas/OptionalAddressDto"},"decreeStatus":{"type":"string","enum":["issued_and_accepted","submitted_not_approved","none_filed"],"example":"none_filed"},"taxExemptionGrantNumber":{"type":"string","example":"TAX-2024-001"},"decreeType":{"type":"string","enum":["act_60","act_22","act_20","other"],"example":"act_60"},"decreeSubmissionDate":{"type":"string","example":"2024-01-15"},"decreeApprovalDate":{"type":"string","example":"2024-03-01"},"emancipationReason":{"type":"string","enum":["public_deed","marriage","court_order","minor_under_18"]},"emancipationDocumentStorageKey":{"type":"string","description":"Storage key returned by POST /files for the uploaded PDF"},"masterFolderUrl":{"type":"string","example":"https://drive.google.com/drive/folders/xxxxx"}}},"IndividualProfileEntity":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"legalName":{"type":["string","null"]},"birthdate":{"format":"date-time","type":["string","null"]},"birthplaceOrCity":{"type":["string","null"]},"gender":{"type":["string","null"],"enum":["male","female","other",null]},"maritalStatus":{"type":["string","null"],"enum":["single","married","divorced","widowed","separated",null]},"hasChildren":{"type":["boolean","null"]},"numberOfChildren":{"type":["number","null"]},"citizenship":{"type":["string","null"]},"prResidency":{"type":["string","null"],"enum":["resident","planning_relocation","exploring_relocation",null]},"idType":{"type":["string","null"],"enum":["social_security_number","national_id",null]},"socialSecurityNumber":{"type":["string","null"]},"nationalIdNumber":{"type":["string","null"]},"licenseNumber":{"type":["string","null"]},"merchantRegistrationNumber":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"mobileNumber":{"type":["string","null"]},"fax":{"type":["string","null"]},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"postalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"decreeStatus":{"type":["string","null"],"enum":["issued_and_accepted","submitted_not_approved","none_filed",null]},"taxExemptionGrantNumber":{"type":["string","null"]},"decreeType":{"type":["string","null"],"enum":["act_60","act_22","act_20","other",null]},"decreeSubmissionDate":{"format":"date-time","type":["string","null"]},"decreeApprovalDate":{"format":"date-time","type":["string","null"]},"emancipationReason":{"type":["string","null"],"enum":["public_deed","marriage","court_order","minor_under_18",null]},"emancipationDocumentStorageKey":{"type":["string","null"]},"emancipationDocument":{"anyOf":[{"$ref":"#/components/schemas/FileUploadResultEntity"},{"type":"null"}]},"masterFolderUrl":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","orgId","legalName","birthdate","birthplaceOrCity","gender","maritalStatus","hasChildren","numberOfChildren","citizenship","prResidency","idType","socialSecurityNumber","nationalIdNumber","licenseNumber","merchantRegistrationNumber","email","phone","mobileNumber","fax","physicalAddress","postalAddress","decreeStatus","taxExemptionGrantNumber","decreeType","decreeSubmissionDate","decreeApprovalDate","emancipationReason","emancipationDocumentStorageKey","emancipationDocument","masterFolderUrl","createdAt","updatedAt"]},"UpdateIndividualProfileDto":{"type":"object","properties":{"legalName":{"type":"string","example":"John Doe"},"birthdate":{"type":"string","example":"1990-01-15"},"birthplaceOrCity":{"type":"string","example":"San Juan"},"gender":{"type":"string","enum":["male","female","other"]},"maritalStatus":{"type":"string","enum":["single","married","divorced","widowed","separated"]},"hasChildren":{"type":"boolean","example":true},"numberOfChildren":{"type":"number","example":2,"description":"Required when hasChildren is true"},"citizenship":{"example":"US","description":"ISO 3166-1 alpha-2 country code. \"PR\" is its own entry.","allOf":[{"$ref":"#/components/schemas/CountryCode"}]},"prResidency":{"type":"string","enum":["resident","planning_relocation","exploring_relocation"]},"idType":{"type":"string","enum":["social_security_number","national_id"]},"socialSecurityNumber":{"type":"string","example":"123-45-6789","description":"Required when idType is social_security_number"},"nationalIdNumber":{"type":"string","description":"Required when idType is national_id"},"licenseNumber":{"type":"string"},"merchantRegistrationNumber":{"type":"string"},"email":{"type":"string","example":"john.doe@example.com"},"phone":{"type":"string","example":"+17871234567"},"mobileNumber":{"type":"string","example":"+17871234568"},"fax":{"type":"string","example":"+17871234569"},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressDto"},"postalAddress":{"$ref":"#/components/schemas/OptionalAddressDto"},"decreeStatus":{"type":"string","enum":["issued_and_accepted","submitted_not_approved","none_filed"],"example":"none_filed"},"taxExemptionGrantNumber":{"type":"string","example":"TAX-2024-001"},"decreeType":{"type":"string","enum":["act_60","act_22","act_20","other"],"example":"act_60"},"decreeSubmissionDate":{"type":"string","example":"2024-01-15"},"decreeApprovalDate":{"type":"string","example":"2024-03-01"},"emancipationReason":{"type":"string","enum":["public_deed","marriage","court_order","minor_under_18"]},"emancipationDocumentStorageKey":{"type":"string","description":"Storage key returned by POST /files for the uploaded PDF"},"masterFolderUrl":{"type":"string","example":"https://drive.google.com/drive/folders/xxxxx"}}},"EmailThreadReadStatus":{"type":"string","enum":["read","unread"]},"EmailThreadType":{"type":"string","enum":["private","team","automated","untagged"]},"EmailDirection":{"type":"string","enum":["outbound","inbound"]},"LatestThreadMessageDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"bodyText":{"type":["string","null"]},"direction":{"allOf":[{"$ref":"#/components/schemas/EmailDirection"}]},"fromEmail":{"type":"string"},"fromName":{"type":["string","null"]},"recipients":{"type":"array","items":{"type":"string"}}},"required":["id","bodyText","direction","fromEmail","fromName","recipients"]},"EmailThreadSummaryParticipantDto":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":["string","null"]},"isViewer":{"type":"boolean"}},"required":["email","name","isViewer"]},"EmailSourceProspectEntity":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"type":"string"}},"required":["id","fullName"]},"EmailThreadSummaryDto":{"type":"object","properties":{"isPrivate":{"type":"boolean"},"visibleTo":{"type":"array","items":{"$ref":"#/components/schemas/UserSummaryEntity"}},"threadKey":{"type":"string"},"subject":{"type":"string"},"latestMessage":{"$ref":"#/components/schemas/LatestThreadMessageDto"},"messageCount":{"type":"number"},"isUnread":{"type":"boolean"},"type":{"allOf":[{"$ref":"#/components/schemas/EmailThreadType"}]},"lastMessageAt":{"format":"date-time","type":"string"},"participants":{"type":"array","items":{"$ref":"#/components/schemas/EmailThreadSummaryParticipantDto"}},"sourceProspect":{"anyOf":[{"$ref":"#/components/schemas/EmailSourceProspectEntity"},{"type":"null"}]}},"required":["isPrivate","visibleTo","threadKey","subject","latestMessage","messageCount","isUnread","type","lastMessageAt","participants","sourceProspect"]},"EmailThreadSummariesDto":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailThreadSummaryDto"}},"unreadCount":{"type":"number","description":"Of the threads the search and filters leave, on all pages, how many read as unread for the caller"},"asOf":{"format":"date-time","type":"string","description":"The time the list was read; send it back as `asOf` with `latestEmailIds` to mark threads read"}},"required":["meta","data","unreadCount","asOf"]},"EmailThreadsFilterDto":{"type":"object","properties":{"search":{"type":"string","maxLength":255,"description":"Case-insensitive. Matches a thread when any of its shown messages matches by sender name or address (or the name of the admin who sent it), To / CC address, subject or text, or when one of its active participants matches by name or address (a teammate nobody emails aside)."},"readStatus":{"description":"Both when omitted","allOf":[{"$ref":"#/components/schemas/EmailThreadReadStatus"}]},"types":{"type":"array","description":"Threads of any of these types; `untagged` is a client's or an outside sender's","items":{"$ref":"#/components/schemas/EmailThreadType"}},"lastMessageFrom":{"type":"string","format":"date-time","description":"Last message at or after this instant"},"lastMessageTo":{"type":"string","format":"date-time","description":"Last message at or before this instant"}}},"EmailThreadsMarkReadDto":{"type":"object","properties":{"latestEmailIds":{"maxItems":500,"description":"Exactly one of `latestEmailIds` and `filter`; sent with `asOf`. Each picked thread's `latestMessage.id` as the list showed it: the thread reads as read up to that message, so one stored after `asOf` or dated after it stays unread. At most 500; select more by the search and filters","type":"array","items":{"type":"string","format":"uuid"}},"asOf":{"format":"date-time","type":"string","description":"Required with `latestEmailIds` and refused without them: the list's `asOf`, the time it was read. A message stored after it stays unread"},"filter":{"description":"Exactly one of `latestEmailIds` and `filter`. Every thread the search and filters leave, on all pages, read up to its newest message; `{}` for all of the owner's","allOf":[{"$ref":"#/components/schemas/EmailThreadsFilterDto"}]}}},"EmailThreadsReadResultDto":{"type":"object","properties":{"count":{"type":"number","description":"How many threads it marked: those of the selected the caller still sees, or every thread the `filter` leaves; 0 when none are left to mark"}},"required":["count"]},"EmailThreadsSelectionDto":{"type":"object","properties":{"threadKeys":{"maxItems":500,"description":"Exactly one of `threadKeys` and `filter`. At most 500; select more by the search and filters","type":"array","items":{"type":"string"}},"filter":{"description":"Exactly one of `threadKeys` and `filter`. Every thread the search and filters leave, on all pages; `{}` for all of the owner's","allOf":[{"$ref":"#/components/schemas/EmailThreadsFilterDto"}]}}},"EmailThreadsDeleteResultDto":{"type":"object","properties":{"count":{"type":"number","description":"How many threads it deleted"},"failedCount":{"type":"number","description":"How many it could not delete; the others were deleted"},"failedThreadKeys":{"description":"The keys of the threads it could not delete, `failedCount` of them","type":"array","items":{"type":"string"}},"remainingCount":{"type":"number","description":"How many threads the `filter` leaves that this request didn't reach: a bulk delete takes at most 100 at a time, so delete again for them. Always 0 for `threadKeys`"}},"required":["count","failedCount","failedThreadKeys","remainingCount"]},"EmailType":{"type":"string","enum":["manual","automated","reply"]},"EmailStatus":{"type":"string","enum":["sent","delivered","bounced","spam","received"]},"EmailSource":{"type":"string","enum":["portal","postmark","gmail"]},"EmailSentByEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"image":{"type":["string","null"]}},"required":["id","name","email","image"]},"EmailAttachmentEntity":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"originalName":{"type":"string"},"contentType":{"type":"string"},"fileSize":{"type":"number"},"uploadedAt":{"format":"date-time","type":"string"}},"required":["id","url","originalName","contentType","fileSize","uploadedAt"]},"EmailEntity":{"type":"object","properties":{"id":{"type":"string"},"direction":{"allOf":[{"$ref":"#/components/schemas/EmailDirection"}]},"type":{"allOf":[{"$ref":"#/components/schemas/EmailType"}]},"status":{"allOf":[{"$ref":"#/components/schemas/EmailStatus"}]},"source":{"allOf":[{"$ref":"#/components/schemas/EmailSource"}]},"threadKey":{"type":"string"},"messageId":{"type":["string","null"]},"inReplyToMessageId":{"type":["string","null"]},"fromEmail":{"type":"string"},"fromName":{"type":["string","null"]},"toEmails":{"type":"array","items":{"type":"string"}},"ccEmails":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"bodyText":{"type":["string","null"]},"bodyHtml":{"type":["string","null"],"description":"Null for received mail (inbound, or read from Gmail): it shows as `bodyText`, and the whole document it arrived as stays stored."},"sentBy":{"anyOf":[{"$ref":"#/components/schemas/EmailSentByEntity"},{"type":"null"}]},"isFromTeammate":{"type":"boolean","description":"An inbound message an admin wrote; still set once that admin is deleted and `sentBy` is null."},"sentAt":{"format":"date-time","type":["string","null"]},"receivedAt":{"format":"date-time","type":["string","null"]},"deliveredAt":{"format":"date-time","type":["string","null"]},"bouncedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/EmailAttachmentEntity"}}},"required":["id","direction","type","status","source","threadKey","messageId","inReplyToMessageId","fromEmail","fromName","toEmails","ccEmails","subject","bodyText","bodyHtml","sentBy","isFromTeammate","sentAt","receivedAt","deliveredAt","bouncedAt","createdAt","updatedAt","attachments"]},"EmailParticipantAddressing":{"type":"string","enum":["to","cc","none"]},"EmailParticipantStatus":{"type":"string","enum":["active","removed"]},"EmailThreadParticipantEntity":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":["string","null"]},"kind":{"allOf":[{"$ref":"#/components/schemas/EmailParticipantKind"}]},"addressing":{"allOf":[{"$ref":"#/components/schemas/EmailParticipantAddressing"}]},"status":{"allOf":[{"$ref":"#/components/schemas/EmailParticipantStatus"}]},"userId":{"type":["string","null"],"description":"The admin of a `team` participant; null for a client or external one, and for a `team` one whose admin was deleted."},"addedBy":{"anyOf":[{"$ref":"#/components/schemas/UserSummaryEntity"},{"type":"null"}]},"addedByEmail":{"type":["string","null"]},"addedAt":{"format":"date-time","type":"string"},"isHistoryShared":{"type":"boolean"},"isReAdded":{"type":"boolean","description":"Put back by an admin's Re-add after a removal"},"removedBy":{"anyOf":[{"$ref":"#/components/schemas/UserSummaryEntity"},{"type":"null"}]},"removedAt":{"format":"date-time","type":["string","null"]}},"required":["id","email","name","kind","addressing","status","userId","addedBy","addedByEmail","addedAt","isHistoryShared","isReAdded","removedBy","removedAt"]},"EmailThreadDetailDto":{"type":"object","properties":{"isPrivate":{"type":"boolean"},"visibleTo":{"type":"array","items":{"$ref":"#/components/schemas/UserSummaryEntity"}},"messages":{"type":"array","items":{"$ref":"#/components/schemas/EmailEntity"}},"latestEmailId":{"type":"string","format":"uuid","description":"The newest of `messages` by when it was received or sent, else created, then by id: the `latestEmailId` a delete of the thread compares with what it holds when it's refused for new messages."},"participants":{"description":"Every row, removed ones included, in the order they joined: a removed address that was added back has a later row, so its latest row is its last.","type":"array","items":{"$ref":"#/components/schemas/EmailThreadParticipantEntity"}},"sharedBy":{"anyOf":[{"$ref":"#/components/schemas/UserSummaryEntity"},{"type":"null"}]},"sharedAt":{"format":"date-time","type":["string","null"]},"sourceProspect":{"anyOf":[{"$ref":"#/components/schemas/EmailSourceProspectEntity"},{"type":"null"}]}},"required":["isPrivate","visibleTo","messages","latestEmailId","participants","sharedBy","sharedAt","sourceProspect"]},"EmailThreadShownParticipantDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"addressing":{"allOf":[{"$ref":"#/components/schemas/EmailParticipantAddressing"}]}},"required":["id","addressing"]},"SendEmailDto":{"type":"object","properties":{"threadKey":{"type":"string"},"toEmails":{"maxItems":50,"description":"New thread: the recipients, at least one. Reply: people added to the thread’s recipients.","type":"array","items":{"type":"string","format":"email"}},"ccEmails":{"maxItems":50,"description":"New thread: CC. Reply: people added to the thread’s CC. Up to 50 recipients (To and CC combined)","type":"array","items":{"type":"string","format":"email"}},"subject":{"type":"string","maxLength":255},"bodyHtml":{"type":"string","maxLength":50000,"description":"Editor HTML, sanitized to paragraphs, line breaks and mention links; 1-5000 characters of visible text."},"attachmentFileIds":{"maxItems":10,"description":"The `fileId` of each file uploaded through `POST /files/upload` or copied by `POST /email-attachments/:fileId/watermark`, together at most 7 MB. Files in the `email-attachments` folder are deleted once the email reaches a recipient, or a day after upload when no email takes them.","type":"array","items":{"type":"string"}},"isHistoryShareConfirmed":{"type":"boolean","description":"Required on a reply that adds someone: they receive the conversation so far."},"shownParticipants":{"description":"Required on a reply: the thread's active participants as the composer showed them, up to 500. A reply sent after they changed is refused (409).","type":"array","items":{"$ref":"#/components/schemas/EmailThreadShownParticipantDto"}}},"required":["bodyHtml"]},"OrgLatestEmailEntity":{"type":"object","properties":{"fromName":{"type":["string","null"]},"fromEmail":{"type":"string"},"subject":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"receivedAt":{"format":"date-time","type":["string","null"]},"threadKey":{"type":"string"}},"required":["fromName","fromEmail","subject","createdAt","receivedAt","threadKey"]},"OrgLatestNoteDto":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"department":{"allOf":[{"$ref":"#/components/schemas/ProductDepartment"}]},"productName":{"type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","content","department","productName","updatedAt"]},"OrgAupRequiredDocumentsDto":{"type":"object","properties":{"filed":{"type":"number"},"total":{"type":"number"}},"required":["filed","total"]},"OrgMissingDocumentsDto":{"type":"object","properties":{"missing":{"type":"number"},"total":{"type":"number"}},"required":["missing","total"]},"OrgLatestUpdateDto":{"type":"object","properties":{"email":{"anyOf":[{"$ref":"#/components/schemas/OrgLatestEmailEntity"},{"type":"null"}]},"notes":{"type":"array","items":{"$ref":"#/components/schemas/OrgLatestNoteDto"}},"aupRequiredDocuments":{"anyOf":[{"$ref":"#/components/schemas/OrgAupRequiredDocumentsDto"},{"type":"null"}]},"missingDocuments":{"anyOf":[{"$ref":"#/components/schemas/OrgMissingDocumentsDto"},{"type":"null"}]}},"required":["email","notes","aupRequiredDocuments","missingDocuments"]},"OrgOpenTaskEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"dueDate":{"type":"string","example":"2026-08-03"},"taskLead":{"anyOf":[{"$ref":"#/components/schemas/UserSummaryEntity"},{"type":"null"}]}},"required":["id","name","dueDate","taskLead"]},"OrgActionItemSource":{"type":"string","enum":["email","note"]},"OrgActionItemDto":{"type":"object","properties":{"text":{"type":"string"},"source":{"allOf":[{"$ref":"#/components/schemas/OrgActionItemSource"}]},"sourceDate":{"format":"date-time","type":"string"},"department":{"anyOf":[{"$ref":"#/components/schemas/ProductDepartment"},{"type":"null"}]},"productName":{"type":["string","null"]}},"required":["text","source","sourceDate","department","productName"]},"OrgWeeklySummaryDto":{"type":"object","properties":{"weekStart":{"format":"date-time","type":"string"},"weekEnd":{"format":"date-time","type":"string"},"paragraph":{"type":"string"}},"required":["weekStart","weekEnd","paragraph"]},"OrgAiSummaryResponseDto":{"type":"object","properties":{"latestUpdate":{"anyOf":[{"$ref":"#/components/schemas/OrgLatestUpdateDto"},{"type":"null"}]},"openTasks":{"type":"array","items":{"$ref":"#/components/schemas/OrgOpenTaskEntity"}},"actionItems":{"type":["array","null"],"items":{"$ref":"#/components/schemas/OrgActionItemDto"}},"weeklySummary":{"anyOf":[{"$ref":"#/components/schemas/OrgWeeklySummaryDto"},{"type":"null"}]},"hasRestrictedContent":{"type":"boolean"},"generatedAt":{"format":"date-time","type":["string","null"]},"generatedBy":{"anyOf":[{"$ref":"#/components/schemas/UserSummaryEntity"},{"type":"null"}]},"isStale":{"type":"boolean"}},"required":["latestUpdate","openTasks","actionItems","weeklySummary","hasRestrictedContent","generatedAt","generatedBy","isStale"]},"OrgContactEntity":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"orgId":{"type":"string"},"image":{"type":["string","null"]}},"required":["id","fullName","email","phone","createdAt","updatedAt","orgId","image"]},"CreateOrgContactDto":{"type":"object","properties":{"fullName":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["fullName"]},"UpdateOrgContactDto":{"type":"object","properties":{"fullName":{"type":"string","minLength":1},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}}},"OrgAgreementListFilter":{"type":"string","enum":["all","active","expired","client_signed"]},"OrgAgreementKind":{"type":"string","enum":["hard_to_recruit","tourism","general"]},"OrgAgreementDisplayStatus":{"type":"string","enum":["draft","parsing","parsing_failed","pending_signature","active","expired","declined","revoked"],"description":"Derived from the revocation, the document status, the parsing status and the expiration date."},"SignableDocumentStatus":{"type":"string","enum":["pending","drafted","pending_deca_signature","sent_to_client","viewed","signed","declined","voided"]},"OrgAgreementSignedBy":{"type":"string","enum":["client","deca","outside_platform"],"description":"Which party signed most recently, from the signing times DocuSign reported; a completed document with none recorded falls back to whoever signs last in its signing order. `outside_platform` for an agreement recorded as signed outside the platform. Null while nobody has signed."},"OrgAgreementParsingStatus":{"type":"string","enum":["not_applicable","pending","processing","parsed","parsed_with_warnings","failed"]},"SignableDocumentSource":{"type":"string","enum":["generated","uploaded"]},"OrgAgreementBriefRowDto":{"type":"object","properties":{"amount":{"type":["number","null"],"description":"Null when the agreement gives no amount (\"—\")."},"productIds":{"description":"The catalog products the row covers; empty when it covers none.","type":"array","items":{"type":"string"}}},"required":["amount","productIds"]},"OrgAgreementBriefAtSigningDto":{"type":"object","properties":{"foundationalServices":{"$ref":"#/components/schemas/OrgAgreementBriefRowDto"},"incentivesDecree":{"$ref":"#/components/schemas/OrgAgreementBriefRowDto"},"municipalDecree":{"$ref":"#/components/schemas/OrgAgreementBriefRowDto"}},"required":["foundationalServices","incentivesDecree","municipalDecree"]},"OrgAgreementBriefMilestoneRowDto":{"type":"object","properties":{"amount":{"type":["number","null"],"description":"Null when the agreement gives no amount (\"—\")."},"productIds":{"maxItems":1,"description":"The catalog product the row covers: one at most, empty when it covers none.","type":"array","items":{"type":"string"}}},"required":["amount","productIds"]},"OrgAgreementBriefMilestonesDto":{"type":"object","properties":{"incentivesDecreeSubmission":{"$ref":"#/components/schemas/OrgAgreementBriefMilestoneRowDto"},"incentivesDecreeApproval":{"$ref":"#/components/schemas/OrgAgreementBriefMilestoneRowDto"},"municipalDecreeSubmission":{"$ref":"#/components/schemas/OrgAgreementBriefMilestoneRowDto"},"municipalDecreeApproval":{"$ref":"#/components/schemas/OrgAgreementBriefMilestoneRowDto"},"incentivesDecreeAmendmentSubmission":{"$ref":"#/components/schemas/OrgAgreementBriefMilestoneRowDto"},"incentivesDecreeAmendmentApproval":{"$ref":"#/components/schemas/OrgAgreementBriefMilestoneRowDto"},"municipalDecreeAmendmentSubmission":{"$ref":"#/components/schemas/OrgAgreementBriefMilestoneRowDto"},"municipalDecreeAmendmentApproval":{"$ref":"#/components/schemas/OrgAgreementBriefMilestoneRowDto"}},"required":["incentivesDecreeSubmission","incentivesDecreeApproval","municipalDecreeSubmission","municipalDecreeApproval","incentivesDecreeAmendmentSubmission","incentivesDecreeAmendmentApproval","municipalDecreeAmendmentSubmission","municipalDecreeAmendmentApproval"]},"ProspectFilingOccurrence":{"type":"string","enum":["annual","monthly","quarterly","at_client_request"]},"OrgAgreementBriefTaxRowDto":{"type":"object","properties":{"name":{"type":"string"},"occurrence":{"anyOf":[{"$ref":"#/components/schemas/ProspectFilingOccurrence"},{"type":"null"}]},"pricePerOccurrence":{"type":["number","null"]},"annualCost":{"type":["number","null"],"description":"The price per occurrence times the occurrences a year; null without a price or for a filing at the client’s request."},"isExcluded":{"type":"boolean","description":"The agreement marks the filing Excluded: no price, nothing billed."},"productIds":{"maxItems":1,"description":"The catalog product the row covers: one at most, empty when it covers none.","type":"array","items":{"type":"string"}}},"required":["name","occurrence","pricePerOccurrence","annualCost","isExcluded","productIds"]},"OrgAgreementBriefTaxComplianceDto":{"type":"object","properties":{"corporate":{"type":"array","items":{"$ref":"#/components/schemas/OrgAgreementBriefTaxRowDto"}},"individual":{"description":"Priced per individual.","type":"array","items":{"$ref":"#/components/schemas/OrgAgreementBriefTaxRowDto"}}},"required":["corporate","individual"]},"OrgAgreementBriefAdHocDto":{"type":"object","properties":{"rate":{"type":["number","null"],"description":"Rate per hour in USD, for every ad hoc service the row links."},"productIds":{"description":"The catalog products the row covers; empty when it covers none.","type":"array","items":{"type":"string"}}},"required":["rate","productIds"]},"OrgAgreementBriefRateRowDto":{"type":"object","properties":{"rate":{"type":["number","null"],"description":"Success fee percentage, e.g. 3.5 for 3.5%."}},"required":["rate"]},"OrgAgreementBriefAupDto":{"type":"object","properties":{"feePerTransaction":{"type":["number","null"],"description":"In USD."},"minimumAmount":{"type":["number","null"],"description":"The minimum total the AUP is billed at, in USD."}},"required":["feePerTransaction","minimumAmount"]},"AgreementRndPricingType":{"type":"string","enum":["brackets","multinational"],"description":"Null when the agreement prices no R&D success fee."},"OrgAgreementBriefRndBracketDto":{"type":"object","properties":{"bottom":{"type":["number","null"],"description":"In USD."},"top":{"type":["number","null"],"description":"In USD; null on the open-ended last bracket."},"rate":{"type":"number","description":"Success fee percentage."}},"required":["bottom","top","rate"]},"OrgAgreementBriefRndDto":{"type":"object","properties":{"pricingType":{"description":"Null when the agreement prices no R&D success fee.","anyOf":[{"$ref":"#/components/schemas/AgreementRndPricingType"},{"type":"null"}]},"brackets":{"type":"array","items":{"$ref":"#/components/schemas/OrgAgreementBriefRndBracketDto"}},"incrementalRate":{"type":["number","null"],"description":"Multinational: previously certified filings (incremental expenses)."},"newFilingsRate":{"type":["number","null"],"description":"Multinational: new filings, not previously submitted."}},"required":["pricingType","brackets","incrementalRate","newFilingsRate"]},"OrgAgreementBriefAccessToCapitalDto":{"type":"object","properties":{"nonSecuritiesFinancing":{"$ref":"#/components/schemas/OrgAgreementBriefRateRowDto"},"aup":{"$ref":"#/components/schemas/OrgAgreementBriefAupDto"},"greenEnergy":{"$ref":"#/components/schemas/OrgAgreementBriefRateRowDto"},"wioa":{"$ref":"#/components/schemas/OrgAgreementBriefRateRowDto"},"rnd":{"$ref":"#/components/schemas/OrgAgreementBriefRndDto"}},"required":["nonSecuritiesFinancing","aup","greenEnergy","wioa","rnd"]},"OrgAgreementBriefDto":{"type":"object","properties":{"atSigning":{"$ref":"#/components/schemas/OrgAgreementBriefAtSigningDto"},"milestones":{"$ref":"#/components/schemas/OrgAgreementBriefMilestonesDto"},"taxCompliance":{"$ref":"#/components/schemas/OrgAgreementBriefTaxComplianceDto"},"adHoc":{"$ref":"#/components/schemas/OrgAgreementBriefAdHocDto"},"accessToCapital":{"$ref":"#/components/schemas/OrgAgreementBriefAccessToCapitalDto"}},"required":["atSigning","milestones","taxCompliance","adHoc","accessToCapital"]},"OrgAgreementDto":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"kind":{"anyOf":[{"$ref":"#/components/schemas/OrgAgreementKind"},{"type":"null"}]},"displayStatus":{"description":"Derived from the revocation, the document status, the parsing status and the expiration date.","allOf":[{"$ref":"#/components/schemas/OrgAgreementDisplayStatus"}]},"documentStatus":{"allOf":[{"$ref":"#/components/schemas/SignableDocumentStatus"}]},"lastSignedBy":{"description":"Which party signed most recently, from the signing times DocuSign reported; a completed document with none recorded falls back to whoever signs last in its signing order. `outside_platform` for an agreement recorded as signed outside the platform. Null while nobody has signed.","anyOf":[{"$ref":"#/components/schemas/OrgAgreementSignedBy"},{"type":"null"}]},"lastSignedAt":{"format":"date-time","type":["string","null"],"description":"When the most recent signature was recorded from DocuSign, or when the agreement was recorded as signed outside the platform. Null while nobody has signed, or when no signing time was recorded."},"isAwaitingClientSignature":{"type":"boolean","description":"Whether the envelope waits on the client’s signature — what a follow-up email can nudge. False while only DECA is left, and on a DECA-first envelope until DECA has signed."},"parsingStatus":{"allOf":[{"$ref":"#/components/schemas/OrgAgreementParsingStatus"}]},"parsingError":{"type":["string","null"]},"parsingWarnings":{"description":"Discrepancies and ambiguities the extraction flagged, including totals that do not reconcile against the source document. Drives the \"parsed with items requiring review\" state.","type":"array","items":{"type":"string"}},"source":{"allOf":[{"$ref":"#/components/schemas/SignableDocumentSource"}]},"effectiveDate":{"format":"date-time","type":["string","null"]},"expirationDate":{"format":"date-time","type":["string","null"]},"transferredFromProspectId":{"type":["string","null"],"description":"Set when this agreement was carried over from a converted prospect."},"reviewConfirmedAt":{"format":"date-time","type":["string","null"]},"brief":{"description":"The agreement’s Appendix A in five sections. Null until the agreement has been read or entered in this shape.","anyOf":[{"$ref":"#/components/schemas/OrgAgreementBriefDto"},{"type":"null"}]},"needsReanalysis":{"type":"boolean","description":"The agreement was analyzed before the brief existed, and no new analysis has been confirmed since: it cannot be sent or marked as signed. `brief` is null until a new analysis lands, then holds it, unconfirmed."},"recipientEmail":{"type":["string","null"]},"ccEmails":{"type":"array","items":{"type":"string"}},"uploadedOriginalName":{"type":["string","null"]},"unsignedPdfUrl":{"type":["string","null"],"format":"uri"},"editableSourceUrl":{"type":["string","null"],"format":"uri","description":"Rendered DOCX for generated agreements, or the original uploaded file for uploaded ones."},"signedPdfUrl":{"type":["string","null"],"format":"uri"},"sentPdfFileName":{"type":["string","null"],"description":"Name the PDF is sent under; null while the document has no name."},"senderViewCompletedAt":{"format":"date-time","type":["string","null"]},"sentAt":{"format":"date-time","type":["string","null"]},"viewedAt":{"format":"date-time","type":["string","null"]},"signedAt":{"format":"date-time","type":["string","null"]},"declinedAt":{"format":"date-time","type":["string","null"]},"revokedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","orgId","name","kind","displayStatus","documentStatus","lastSignedBy","lastSignedAt","isAwaitingClientSignature","parsingStatus","parsingError","parsingWarnings","source","effectiveDate","expirationDate","transferredFromProspectId","reviewConfirmedAt","brief","needsReanalysis","recipientEmail","ccEmails","uploadedOriginalName","unsignedPdfUrl","editableSourceUrl","signedPdfUrl","sentPdfFileName","senderViewCompletedAt","sentAt","viewedAt","signedAt","declinedAt","revokedAt","createdAt","updatedAt"]},"OrgAgreementMismatchProductDto":{"type":"object","properties":{"productId":{"type":"string"},"productName":{"type":"string"}},"required":["productId","productName"]},"OrgAgreementProductMismatchDto":{"type":"object","properties":{"hasMismatch":{"type":"boolean"},"missingProducts":{"description":"Promised by a signed agreement but not assigned to the organization.","type":"array","items":{"$ref":"#/components/schemas/OrgAgreementMismatchProductDto"}},"uncoveredProducts":{"description":"Assigned to the organization but not covered by any signed agreement.","type":"array","items":{"$ref":"#/components/schemas/OrgAgreementMismatchProductDto"}}},"required":["hasMismatch","missingProducts","uncoveredProducts"]},"ReviewOrgAgreementBriefRowDto":{"type":"object","properties":{"amount":{"type":["number","null"],"description":"Null when the agreement gives no amount (\"—\")."},"productIds":{"maxItems":50,"description":"The catalog products the row covers; empty when it covers none.","type":"array","items":{"type":"string"}}},"required":["amount","productIds"]},"ReviewOrgAgreementBriefAtSigningDto":{"type":"object","properties":{"foundationalServices":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefRowDto"},"incentivesDecree":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefRowDto"},"municipalDecree":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefRowDto"}},"required":["foundationalServices","incentivesDecree","municipalDecree"]},"ReviewOrgAgreementBriefMilestoneRowDto":{"type":"object","properties":{"amount":{"type":["number","null"],"description":"Null when the agreement gives no amount (\"—\")."},"productIds":{"maxItems":1,"description":"The catalog product the row covers: one at most, empty when it covers none.","type":"array","items":{"type":"string"}}},"required":["amount","productIds"]},"ReviewOrgAgreementBriefMilestonesDto":{"type":"object","properties":{"incentivesDecreeSubmission":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefMilestoneRowDto"},"incentivesDecreeApproval":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefMilestoneRowDto"},"municipalDecreeSubmission":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefMilestoneRowDto"},"municipalDecreeApproval":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefMilestoneRowDto"},"incentivesDecreeAmendmentSubmission":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefMilestoneRowDto"},"incentivesDecreeAmendmentApproval":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefMilestoneRowDto"},"municipalDecreeAmendmentSubmission":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefMilestoneRowDto"},"municipalDecreeAmendmentApproval":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefMilestoneRowDto"}},"required":["incentivesDecreeSubmission","incentivesDecreeApproval","municipalDecreeSubmission","municipalDecreeApproval","incentivesDecreeAmendmentSubmission","incentivesDecreeAmendmentApproval","municipalDecreeAmendmentSubmission","municipalDecreeAmendmentApproval"]},"ReviewOrgAgreementBriefTaxRowDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255},"occurrence":{"anyOf":[{"$ref":"#/components/schemas/ProspectFilingOccurrence"},{"type":"null"}]},"pricePerOccurrence":{"type":["number","null"]},"isExcluded":{"type":"boolean","description":"The agreement marks the filing Excluded; its price is ignored."},"productIds":{"maxItems":1,"description":"The catalog product the row covers: one at most, empty when it covers none.","type":"array","items":{"type":"string"}}},"required":["name","occurrence","pricePerOccurrence","isExcluded","productIds"]},"ReviewOrgAgreementBriefTaxComplianceDto":{"type":"object","properties":{"corporate":{"description":"Up to 50 filings.","type":"array","items":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefTaxRowDto"}},"individual":{"description":"Up to 50 filings.","type":"array","items":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefTaxRowDto"}}},"required":["corporate","individual"]},"ReviewOrgAgreementBriefAdHocDto":{"type":"object","properties":{"rate":{"type":["number","null"],"description":"Rate per hour in USD, for every ad hoc service the row links."},"productIds":{"maxItems":50,"uniqueItems":true,"description":"The catalog products the row covers; empty when it covers none.","type":"array","items":{"type":"string"}}},"required":["rate","productIds"]},"ReviewOrgAgreementBriefRateRowDto":{"type":"object","properties":{"rate":{"type":["number","null"],"minimum":0,"maximum":100}},"required":["rate"]},"ReviewOrgAgreementBriefAupDto":{"type":"object","properties":{"feePerTransaction":{"type":["number","null"]},"minimumAmount":{"type":["number","null"]}},"required":["feePerTransaction","minimumAmount"]},"ReviewOrgAgreementBriefRndBracketDto":{"type":"object","properties":{"bottom":{"type":["number","null"]},"top":{"type":["number","null"]},"rate":{"type":"number","minimum":0,"maximum":100}},"required":["bottom","top","rate"]},"ReviewOrgAgreementBriefRndDto":{"type":"object","properties":{"pricingType":{"anyOf":[{"$ref":"#/components/schemas/AgreementRndPricingType"},{"type":"null"}]},"brackets":{"description":"Up to 50 brackets, in order.","type":"array","items":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefRndBracketDto"}},"incrementalRate":{"type":["number","null"],"minimum":0,"maximum":100},"newFilingsRate":{"type":["number","null"],"minimum":0,"maximum":100}},"required":["pricingType","brackets","incrementalRate","newFilingsRate"]},"ReviewOrgAgreementBriefAccessToCapitalDto":{"type":"object","properties":{"nonSecuritiesFinancing":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefRateRowDto"},"aup":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefAupDto"},"greenEnergy":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefRateRowDto"},"wioa":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefRateRowDto"},"rnd":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefRndDto"}},"required":["nonSecuritiesFinancing","aup","greenEnergy","wioa","rnd"]},"ReviewOrgAgreementBriefDto":{"type":"object","properties":{"atSigning":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefAtSigningDto"},"milestones":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefMilestonesDto"},"taxCompliance":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefTaxComplianceDto"},"adHoc":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefAdHocDto"},"accessToCapital":{"$ref":"#/components/schemas/ReviewOrgAgreementBriefAccessToCapitalDto"}},"required":["atSigning","milestones","taxCompliance","adHoc","accessToCapital"]},"ReviewOrgAgreementDto":{"type":"object","properties":{"reviewConfirmedAt":{"type":["string","null"],"format":"date-time","description":"The agreement's `reviewConfirmedAt` when this review was opened, echoed back. The confirm is refused if it has moved since — someone else confirmed meanwhile, and this review was decided against details they replaced. Send null for an agreement that had never been confirmed."},"effectiveDate":{"type":"string","format":"date"},"expirationDate":{"type":"string","format":"date"},"brief":{"description":"Replaces the whole brief. Rows are fixed, Tax & Compliance filings aside.","allOf":[{"$ref":"#/components/schemas/ReviewOrgAgreementBriefDto"}]}},"required":["brief"]},"CreateOrgAgreementSenderViewDto":{"type":"object","properties":{"returnUrl":{"type":"string","description":"URL to redirect to after the user finishes in DocuSign."}},"required":["returnUrl"]},"OrgAgreementSenderViewResponseDto":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]},"SendOrgAgreementDto":{"type":"object","properties":{"subject":{"type":"string","maxLength":255},"bodyHtml":{"type":"string","maxLength":50000,"description":"Editor HTML, sanitized to paragraphs, line breaks and mention links; 1-5000 characters of visible text."},"recipientEmail":{"type":"string","format":"email","maxLength":255},"ccEmails":{"maxItems":50,"description":"Envelope carbon copies: missing ones are added and ones DECA last recorded that are not listed are removed before sending; one added in the sender view since then stays. Up to 50 recipients (To and CC combined)","type":"array","items":{"type":"string","format":"email"}}},"required":["subject","bodyHtml","recipientEmail","ccEmails"]},"SendOrgAgreementFollowUpDto":{"type":"object","properties":{"subject":{"type":"string","maxLength":255},"bodyHtml":{"type":"string","maxLength":50000,"description":"Editor HTML, sanitized to paragraphs, line breaks and mention links; 1-5000 characters of visible text."},"toEmails":{"maxItems":50,"minItems":1,"type":"array","items":{"type":"string","format":"email"}},"ccEmails":{"maxItems":50,"description":"Up to 50 recipients (To and CC combined)","type":"array","items":{"type":"string","format":"email"}},"attachmentFileIds":{"maxItems":10,"description":"The `fileId` of each file uploaded through `POST /files/upload` or copied by `POST /email-attachments/:fileId/watermark`, together at most 7 MB. Files in the `email-attachments` folder are deleted once the email reaches a recipient, or a day after upload when no email takes them.","type":"array","items":{"type":"string"}}},"required":["subject","bodyHtml","toEmails","ccEmails"]},"OrganizationNoteDto":{"type":"object","properties":{"id":{"type":"string"},"createdById":{"type":["string","null"]},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/NoteAuthorEntity"},{"type":"null"}]},"content":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"title":{"type":["string","null"]},"source":{"type":["string","null"],"enum":["scribe",null]},"meetingDate":{"format":"date-time","type":["string","null"]},"participants":{"type":"array","items":{"type":"string"}},"replyCount":{"type":"number"},"lastReplyAt":{"format":"date-time","type":["string","null"]},"lastRepliers":{"type":"array","items":{"$ref":"#/components/schemas/NoteAuthorEntity"}},"hasUnread":{"type":"boolean"},"orgId":{"type":"string"}},"required":["id","createdById","createdBy","content","createdAt","updatedAt","title","source","meetingDate","participants","replyCount","lastReplyAt","lastRepliers","hasUnread","orgId"]},"NicknameMeetingListState":{"type":"string","enum":["scheduled","awaiting_transcript","transcript_missing","processing","ready","failed"]},"NicknameMeetingHistoryItemDto":{"type":"object","properties":{"id":{"type":"string"},"noteId":{"type":["string","null"]},"title":{"type":"string"},"meetingDate":{"format":"date-time","type":"string"},"state":{"allOf":[{"$ref":"#/components/schemas/NicknameMeetingListState"}]}},"required":["id","noteId","title","meetingDate","state"]},"NicknameMeetingNoteStatus":{"type":"string","enum":["queued","processing","ready","failed"]},"NicknameMeetingNoteParticipantEntity":{"type":"object","properties":{"email":{"type":"string"},"displayName":{"type":["string","null"]},"isOrganizer":{"type":"boolean"}},"required":["email","displayName","isOrganizer"]},"NicknameMeetingTranscriptSegmentEntity":{"type":"object","properties":{"id":{"type":"string"},"speaker":{"type":["string","null"]},"offsetSeconds":{"type":["number","null"]},"text":{"type":"string"}},"required":["id","speaker","offsetSeconds","text"]},"NicknameMeetingNoteSummarySectionDto":{"type":"object","properties":{"heading":{"type":"string"},"body":{"type":"string"}},"required":["heading","body"]},"NicknameMeetingNoteSummaryDto":{"type":"object","properties":{"overview":{"type":"string"},"sections":{"type":"array","items":{"$ref":"#/components/schemas/NicknameMeetingNoteSummarySectionDto"}},"details":{"type":"string"}},"required":["overview","sections","details"]},"NicknameMeetingSuggestedTaskOrganizationDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"NicknameMeetingSuggestedTaskLinkDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"NicknameMeetingSuggestedTaskStatus":{"type":"string","enum":["open","creating","created","dismissed"]},"NicknameMeetingSuggestedTaskDto":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"priority":{"allOf":[{"$ref":"#/components/schemas/OrganizationTaskPriority"}]},"dueDate":{"type":["string","null"],"example":"2026-09-30"},"suggestedLead":{"anyOf":[{"$ref":"#/components/schemas/UserSummaryEntity"},{"type":"null"}]},"suggestedOrg":{"anyOf":[{"$ref":"#/components/schemas/NicknameMeetingSuggestedTaskOrganizationDto"},{"type":"null"}]},"transcriptQuote":{"type":["string","null"]},"similarTask":{"anyOf":[{"$ref":"#/components/schemas/NicknameMeetingSuggestedTaskLinkDto"},{"type":"null"}]},"status":{"allOf":[{"$ref":"#/components/schemas/NicknameMeetingSuggestedTaskStatus"}]},"createdTask":{"anyOf":[{"$ref":"#/components/schemas/NicknameMeetingSuggestedTaskLinkDto"},{"type":"null"}]}},"required":["id","title","description","priority","dueDate","suggestedLead","suggestedOrg","transcriptQuote","similarTask","status","createdTask"]},"NicknameMeetingNoteDetailDto":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"meetingDate":{"format":"date-time","type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/NicknameMeetingNoteStatus"}]},"failureReason":{"type":["string","null"]},"processedAt":{"format":"date-time","type":["string","null"]},"organizerEmail":{"type":["string","null"]},"participants":{"type":"array","items":{"$ref":"#/components/schemas/NicknameMeetingNoteParticipantEntity"}},"transcript":{"type":"array","items":{"$ref":"#/components/schemas/NicknameMeetingTranscriptSegmentEntity"}},"summary":{"anyOf":[{"$ref":"#/components/schemas/NicknameMeetingNoteSummaryDto"},{"type":"null"}]},"suggestedTasks":{"type":"array","items":{"$ref":"#/components/schemas/NicknameMeetingSuggestedTaskDto"}}},"required":["id","title","meetingDate","status","failureReason","processedAt","organizerEmail","participants","transcript","summary","suggestedTasks"]},"UpdateNicknameMeetingSuggestedTaskDto":{"type":"object","properties":{"isDismissed":{"type":"boolean"}},"required":["isDismissed"]},"NicknameLinkDto":{"type":"object","properties":{"name":{"type":"string"},"isArchived":{"type":"boolean"}},"required":["name","isArchived"]},"NicknameUsageDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"organizations":{"maxItems":20,"description":"First 20 linked organizations; see `organizationsCount` for the total.","type":"array","items":{"$ref":"#/components/schemas/NicknameLinkDto"}},"organizationsCount":{"type":"number"},"prospects":{"maxItems":20,"description":"First 20 linked prospects; see `prospectsCount` for the total.","type":"array","items":{"$ref":"#/components/schemas/NicknameLinkDto"}},"prospectsCount":{"type":"number"},"meetingsCount":{"type":"number"},"meetingNotesCount":{"type":"number"}},"required":["id","name","organizations","organizationsCount","prospects","prospectsCount","meetingsCount","meetingNotesCount"]},"CreateNicknameDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255}},"required":["name"]},"UpdateNicknameDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255}},"required":["name"]},"GenerateMeetingAgendaDto":{"type":"object","properties":{"id":{"type":"string","description":"The new agenda's id, picked by the caller so a request cut short still leaves it the agenda to follow. An id an agenda already holds is a 409, and that agenda is not returned."},"organizationIds":{"description":"1-20 organizations of one nickname, in the order the agenda lists them.","type":"array","items":{"type":"string"}},"meetingId":{"type":"string","description":"A scheduled meeting of the same nickname, without an agenda, to attach the agenda to once it is generated."}},"required":["organizationIds"]},"MeetingAgendaStatus":{"type":"string","enum":["generating","ready","failed"],"description":"A generation that has run longer than the timeout reads as `failed`."},"NicknameMeetingStatus":{"type":"string","enum":["scheduled","completed","cancelled"]},"MeetingAgendaMeetingAttendeeDto":{"type":"object","properties":{"email":{"type":"string"},"displayName":{"type":["string","null"]},"isOrganizer":{"type":"boolean"}},"required":["email","displayName","isOrganizer"]},"MeetingAgendaMeetingDto":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"startAt":{"format":"date-time","type":"string"},"endAt":{"format":"date-time","type":"string"},"timeZone":{"type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/NicknameMeetingStatus"}]},"isCancelledOnDelete":{"type":"boolean","description":"Deleting the agenda cancels this meeting and notifies its guests: a one-off scheduled meeting that has not ended. Any other meeting is only detached."},"googleMeetLink":{"type":["string","null"]},"googleEventId":{"type":["string","null"],"description":"The Google event id the calendar routes take."},"googleCalendarId":{"type":["string","null"]},"organizerEmail":{"type":["string","null"]},"attendees":{"description":"The guests, the notetaker left out.","type":"array","items":{"$ref":"#/components/schemas/MeetingAgendaMeetingAttendeeDto"}}},"required":["id","title","startAt","endAt","timeZone","status","isCancelledOnDelete","googleMeetLink","googleEventId","googleCalendarId","organizerEmail","attendees"]},"MeetingAgendaDetailsDto":{"type":"object","properties":{"dateTime":{"type":["string","null"]},"attendees":{"type":["string","null"]},"objective":{"type":["string","null"]}},"required":["dateTime","attendees","objective"]},"MeetingAgendaLastMeetingDto":{"type":"object","properties":{"title":{"type":"string"},"date":{"format":"date-time","type":"string"}},"required":["title","date"]},"MeetingAgendaSection":{"type":"string","enum":["foundational_setup","incentives_decrees","tax_compliance","tax_credits","grant_applications","financing_applications"]},"MeetingAgendaSourceKind":{"type":"string","enum":["email","note","transcript"]},"MeetingAgendaUpdateSourceDto":{"type":"object","properties":{"kind":{"allOf":[{"$ref":"#/components/schemas/MeetingAgendaSourceKind"}]},"date":{"format":"date-time","type":"string"},"label":{"type":["string","null"],"description":"The email's sender and subject, the note's author or the meeting's title."}},"required":["kind","date","label"]},"MeetingAgendaUpdateDto":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"source":{"$ref":"#/components/schemas/MeetingAgendaUpdateSourceDto"}},"required":["id","text","source"]},"MeetingAgendaProductDto":{"type":"object","properties":{"orgProductId":{"type":"string"},"name":{"type":"string"},"adminStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentAdminStatus"},{"type":"null"}]},"applicationStatus":{"description":"A tax credit application’s own status, which it shows instead of the department status (`adminStatus` is then null); null for any other product and for an R&D Supplemental Amendment, which shows `financialAdminStatus`.","anyOf":[{"$ref":"#/components/schemas/ProductApplicationStatus"},{"type":"null"}]},"financialAdminStatus":{"description":"An R&D Supplemental Amendment’s Financial status — its one status, shown instead of the others; null for any other product.","anyOf":[{"$ref":"#/components/schemas/TaxCreditFinancialAdminStatus"},{"type":"null"}]},"updates":{"description":"Empty when the product is shown only for an open action item.","type":"array","items":{"$ref":"#/components/schemas/MeetingAgendaUpdateDto"}}},"required":["orgProductId","name","adminStatus","applicationStatus","financialAdminStatus","updates"]},"MeetingAgendaTopicDto":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"}},"required":["id","text"]},"MeetingAgendaActionStatus":{"type":"string","enum":["active","completed","not_in_tasks"]},"MeetingAgendaActionItemDto":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"productName":{"type":["string","null"]},"owner":{"type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/MeetingAgendaActionStatus"}]},"notes":{"type":["string","null"]}},"required":["id","text","productName","owner","status","notes"]},"MeetingAgendaSectionDto":{"type":"object","properties":{"key":{"allOf":[{"$ref":"#/components/schemas/MeetingAgendaSection"}]},"products":{"type":"array","items":{"$ref":"#/components/schemas/MeetingAgendaProductDto"}},"topics":{"type":"array","items":{"$ref":"#/components/schemas/MeetingAgendaTopicDto"}},"actionItems":{"type":"array","items":{"$ref":"#/components/schemas/MeetingAgendaActionItemDto"}},"moreProductsCount":{"type":"number","description":"Products that qualify but are past the section cap, or have activity in the window past the products read."},"otherProductsCount":{"type":"number","description":"The other non-cancelled products: no activity in the window and no open action item."}},"required":["key","products","topics","actionItems","moreProductsCount","otherProductsCount"]},"MeetingAgendaOrganizationContentDto":{"type":"object","properties":{"orgId":{"type":"string"},"name":{"type":"string"},"entityType":{"allOf":[{"$ref":"#/components/schemas/EntityType"}]},"lastMeeting":{"description":"The meeting the window starts from; null when there is none, so the window is all activity to date.","anyOf":[{"$ref":"#/components/schemas/MeetingAgendaLastMeetingDto"},{"type":"null"}]},"sections":{"description":"Every section, always, in the agenda order.","type":"array","items":{"$ref":"#/components/schemas/MeetingAgendaSectionDto"}}},"required":["orgId","name","entityType","lastMeeting","sections"]},"MeetingAgendaNextStepDto":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"owner":{"type":["string","null"]}},"required":["id","text","owner"]},"MeetingAgendaWrapUpDto":{"type":"object","properties":{"decisions":{"type":["string","null"]},"nextSteps":{"type":"array","items":{"$ref":"#/components/schemas/MeetingAgendaNextStepDto"}}},"required":["decisions","nextSteps"]},"MeetingAgendaContentDto":{"type":"object","properties":{"details":{"$ref":"#/components/schemas/MeetingAgendaDetailsDto"},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/MeetingAgendaOrganizationContentDto"}},"wrapUp":{"$ref":"#/components/schemas/MeetingAgendaWrapUpDto"}},"required":["details","organizations","wrapUp"]},"MeetingAgendaDto":{"type":"object","properties":{"id":{"type":"string"},"nicknameId":{"type":"string"},"nicknameName":{"type":"string"},"title":{"type":"string","description":"The attached meeting’s title, else \"Meeting Prep · <organization names>\"."},"status":{"description":"A generation that has run longer than the timeout reads as `failed`.","allOf":[{"$ref":"#/components/schemas/MeetingAgendaStatus"}]},"organizations":{"description":"In the order the document lists them.","type":"array","items":{"$ref":"#/components/schemas/OrganizationRefDto"}},"meeting":{"anyOf":[{"$ref":"#/components/schemas/MeetingAgendaMeetingDto"},{"type":"null"}]},"content":{"description":"Null until a generation succeeds.","anyOf":[{"$ref":"#/components/schemas/MeetingAgendaContentDto"},{"type":"null"}]},"hasRestrictedContent":{"type":"boolean","description":"Email-sourced updates were hidden from this viewer, who cannot read organization emails."},"generatedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string","description":"The version a save sends back as `expectedUpdatedAt`; it moves on every write to the agenda."}},"required":["id","nicknameId","nicknameName","title","status","organizations","meeting","content","hasRestrictedContent","generatedAt","createdAt","updatedAt"]},"GenerateMeetingShortAgendaDto":{"type":"object","properties":{"organizationIds":{"description":"1-20 organizations of one nickname, in the order the agenda lists them.","type":"array","items":{"type":"string"}}},"required":["organizationIds"]},"MeetingShortAgendaDto":{"type":"object","properties":{"lines":{"description":"One \"<Organization>: topic, topic\" line per organization with something to discuss, then \"Next steps and owners\"; empty when none has.","type":"array","items":{"type":"string"}}},"required":["lines"]},"MeetingAgendaListMeetingDto":{"type":"object","properties":{"startAt":{"format":"date-time","type":"string"}},"required":["startAt"]},"MeetingAgendaListItemDto":{"type":"object","properties":{"id":{"type":"string"},"nicknameId":{"type":"string"},"nicknameName":{"type":"string"},"title":{"type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/MeetingAgendaStatus"}]},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationRefDto"}},"meeting":{"anyOf":[{"$ref":"#/components/schemas/MeetingAgendaListMeetingDto"},{"type":"null"}]},"generatedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"}},"required":["id","nicknameId","nicknameName","title","status","organizations","meeting","generatedAt","createdAt"]},"MeetingAgendaDetailsInputDto":{"type":"object","properties":{"dateTime":{"type":["string","null"]},"attendees":{"type":["string","null"]},"objective":{"type":["string","null"]}},"required":["dateTime","attendees","objective"]},"MeetingAgendaTextInputDto":{"type":"object","properties":{"id":{"type":"string","description":"The id the agenda gave it, or a new UUID for a topic or action item added in the editor."},"text":{"type":"string"}},"required":["id","text"]},"MeetingAgendaProductInputDto":{"type":"object","properties":{"orgProductId":{"type":"string"},"updates":{"description":"The updates kept, by their ids; an update the agenda did not hold is ignored.","type":"array","items":{"$ref":"#/components/schemas/MeetingAgendaTextInputDto"}}},"required":["orgProductId","updates"]},"MeetingAgendaActionItemInputDto":{"type":"object","properties":{"id":{"type":"string","description":"The id the agenda gave it, or a new UUID for a topic or action item added in the editor."},"text":{"type":"string"},"owner":{"type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/MeetingAgendaActionStatus"}]},"notes":{"type":["string","null"]}},"required":["id","text","owner","status","notes"]},"MeetingAgendaSectionInputDto":{"type":"object","properties":{"key":{"allOf":[{"$ref":"#/components/schemas/MeetingAgendaSection"}]},"products":{"description":"The products kept; one left out is removed from the agenda.","type":"array","items":{"$ref":"#/components/schemas/MeetingAgendaProductInputDto"}},"topics":{"type":"array","items":{"$ref":"#/components/schemas/MeetingAgendaTextInputDto"}},"actionItems":{"type":"array","items":{"$ref":"#/components/schemas/MeetingAgendaActionItemInputDto"}}},"required":["key","products","topics","actionItems"]},"MeetingAgendaOrganizationInputDto":{"type":"object","properties":{"orgId":{"type":"string"},"sections":{"type":"array","items":{"$ref":"#/components/schemas/MeetingAgendaSectionInputDto"}}},"required":["orgId","sections"]},"MeetingAgendaNextStepInputDto":{"type":"object","properties":{"id":{"type":"string","description":"The id the agenda gave it, or a new UUID for a topic or action item added in the editor."},"text":{"type":"string"},"owner":{"type":["string","null"]}},"required":["id","text","owner"]},"MeetingAgendaWrapUpInputDto":{"type":"object","properties":{"decisions":{"type":["string","null"]},"nextSteps":{"type":"array","items":{"$ref":"#/components/schemas/MeetingAgendaNextStepInputDto"}}},"required":["decisions","nextSteps"]},"UpdateMeetingAgendaDto":{"type":"object","properties":{"expectedUpdatedAt":{"format":"date-time","type":"string","description":"The agenda’s `updatedAt` as the editor loaded it. Once the agenda has changed since, a save that would change it is refused with 409; one that changes nothing returns the current agenda."},"details":{"$ref":"#/components/schemas/MeetingAgendaDetailsInputDto"},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/MeetingAgendaOrganizationInputDto"}},"wrapUp":{"$ref":"#/components/schemas/MeetingAgendaWrapUpInputDto"}},"required":["expectedUpdatedAt","details","organizations","wrapUp"]},"AttachMeetingAgendaMeetingDto":{"type":"object","properties":{"meetingId":{"type":"string","description":"A scheduled meeting of the agenda’s nickname that has no agenda yet."}},"required":["meetingId"]},"CalendarMeetingDaySummaryDto":{"type":"object","properties":{"date":{"type":"string","example":"2026-08-18"},"meetings":{"type":"number"},"allDay":{"type":"number"}},"required":["date","meetings","allDay"]},"CalendarMeetingSummaryPageDto":{"type":"object","properties":{"days":{"type":"array","items":{"$ref":"#/components/schemas/CalendarMeetingDaySummaryDto"}},"failedCalendarIds":{"description":"Calendars whose fetch failed; their meetings are missing from these counts.","type":"array","items":{"type":"string"}},"omittedCalendarIds":{"description":"Calendars this request never read — unknown ids, or the ones past the per-request calendar cap; their meetings are missing from these counts too.","type":"array","items":{"type":"string"}}},"required":["days","failedCalendarIds","omittedCalendarIds"]},"CalendarEventStatus":{"type":"string","enum":["confirmed","tentative","cancelled"]},"CalendarAttendeeResponse":{"type":"string","enum":["needsAction","accepted","declined","tentative"]},"CalendarEventCapabilitiesDto":{"type":"object","properties":{"canEdit":{"type":"boolean"},"canCancel":{"type":"boolean"},"canInviteOthers":{"type":"boolean"},"canRespond":{"type":"boolean"},"isReadOnly":{"type":"boolean"}},"required":["canEdit","canCancel","canInviteOthers","canRespond","isReadOnly"]},"CalendarEventListItemDto":{"type":"object","properties":{"id":{"type":"string"},"calendarId":{"type":"string"},"calendarName":{"type":"string"},"isRecurring":{"type":"boolean"},"status":{"allOf":[{"$ref":"#/components/schemas/CalendarEventStatus"}]},"title":{"type":["string","null"]},"isAllDay":{"type":"boolean"},"startAt":{"format":"date-time","type":["string","null"]},"endAt":{"format":"date-time","type":["string","null"]},"startDate":{"type":["string","null"],"example":"2026-08-18"},"endDate":{"type":["string","null"],"example":"2026-08-18","description":"Inclusive, unlike the exclusive end date Google stores."},"timeZone":{"type":"string"},"location":{"type":["string","null"]},"meetLink":{"type":["string","null"]},"htmlLink":{"type":["string","null"]},"organizerEmail":{"type":["string","null"]},"isOrganizer":{"type":"boolean"},"selfResponseStatus":{"anyOf":[{"$ref":"#/components/schemas/CalendarAttendeeResponse"},{"type":"null"}]},"attendeeCount":{"type":"number"},"capabilities":{"$ref":"#/components/schemas/CalendarEventCapabilitiesDto"},"agendaId":{"type":["string","null"],"format":"uuid","description":"The Meeting Prep agenda attached to the meeting, shared by every occurrence of a series. Null as well when the viewer cannot read every organization it covers."}},"required":["id","calendarId","calendarName","isRecurring","status","title","isAllDay","startAt","endAt","startDate","endDate","timeZone","location","meetLink","htmlLink","organizerEmail","isOrganizer","selfResponseStatus","attendeeCount","capabilities","agendaId"]},"CalendarEventsPageDto":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/CalendarEventListItemDto"}},"timeZone":{"type":"string"},"failedCalendarIds":{"description":"Calendars whose fetch failed; their events are missing from this response.","type":"array","items":{"type":"string"}},"omittedCalendarIds":{"description":"Calendars this request never read — unknown ids, or the ones past the per-request calendar cap; their events are missing from this response too.","type":"array","items":{"type":"string"}}},"required":["events","timeZone","failedCalendarIds","omittedCalendarIds"]},"CalendarEventOrganizationEntity":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"]},"CalendarEventNicknameEntity":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"]},"CalendarEventMeetingPrepDto":{"type":"object","properties":{"meetingId":{"type":"string","format":"uuid"},"agendaId":{"type":["string","null"],"format":"uuid","description":"Null as well when the viewer cannot read every organization the attached agenda covers; `canTakeAgenda` is still false then."},"canTakeAgenda":{"type":"boolean","description":"Whether a Meeting Prep agenda can be generated for or attached to this meeting now: it is still scheduled and has none. A recurring series is marked completed after its first occurrence ends."}},"required":["meetingId","agendaId","canTakeAgenda"]},"CalendarEventAttendeeDto":{"type":"object","properties":{"email":{"type":"string"},"displayName":{"type":["string","null"]},"responseStatus":{"allOf":[{"$ref":"#/components/schemas/CalendarAttendeeResponse"}]},"optional":{"type":"boolean"},"isOrganizer":{"type":"boolean"}},"required":["email","displayName","responseStatus","optional","isOrganizer"]},"CalendarReminderMethod":{"type":"string","enum":["popup","email"]},"CalendarEventReminderDto":{"type":"object","properties":{"method":{"allOf":[{"$ref":"#/components/schemas/CalendarReminderMethod"}]},"minutes":{"type":"number"}},"required":["method","minutes"]},"CalendarEventDetailsDto":{"type":"object","properties":{"id":{"type":"string"},"calendarId":{"type":"string"},"calendarName":{"type":"string"},"isRecurring":{"type":"boolean"},"status":{"allOf":[{"$ref":"#/components/schemas/CalendarEventStatus"}]},"title":{"type":["string","null"]},"isAllDay":{"type":"boolean"},"startAt":{"format":"date-time","type":["string","null"]},"endAt":{"format":"date-time","type":["string","null"]},"startDate":{"type":["string","null"],"example":"2026-08-18"},"endDate":{"type":["string","null"],"example":"2026-08-18","description":"Inclusive, unlike the exclusive end date Google stores."},"timeZone":{"type":"string"},"location":{"type":["string","null"]},"meetLink":{"type":["string","null"]},"htmlLink":{"type":["string","null"]},"organizerEmail":{"type":["string","null"]},"isOrganizer":{"type":"boolean"},"selfResponseStatus":{"anyOf":[{"$ref":"#/components/schemas/CalendarAttendeeResponse"},{"type":"null"}]},"attendeeCount":{"type":"number"},"capabilities":{"$ref":"#/components/schemas/CalendarEventCapabilitiesDto"},"agendaId":{"type":["string","null"],"format":"uuid","description":"The Meeting Prep agenda attached to the meeting, shared by every occurrence of a series. Null as well when the viewer cannot read every organization it covers."},"description":{"type":["string","null"],"description":"Sanitised rich text. Google returns markup or plain text depending on where the description was last edited; both arrive here as HTML."},"organizerName":{"type":["string","null"]},"organization":{"anyOf":[{"$ref":"#/components/schemas/CalendarEventOrganizationEntity"},{"type":"null"}]},"nickname":{"anyOf":[{"$ref":"#/components/schemas/CalendarEventNicknameEntity"},{"type":"null"}]},"meetingPrep":{"description":"DECA's mirror of the meeting and its Meeting Prep agenda; null when the meeting was never filed under a nickname.","anyOf":[{"$ref":"#/components/schemas/CalendarEventMeetingPrepDto"},{"type":"null"}]},"attendees":{"type":"array","items":{"$ref":"#/components/schemas/CalendarEventAttendeeDto"}},"attendeesOmitted":{"type":"boolean","description":"Google truncated the guest list, so it cannot be written back safely."},"guestsCanSeeOtherGuests":{"type":"boolean"},"reminders":{"type":"array","items":{"$ref":"#/components/schemas/CalendarEventReminderDto"}},"usesDefaultReminders":{"type":"boolean","description":"The meeting inherits the calendar's reminders; an empty `reminders` list means no reminder only when this is false."},"recurrence":{"type":"array","items":{"type":"string"}},"isSeriesMaster":{"type":"boolean","description":"The event is the series itself rather than one of its meetings, so it only takes writes for all events."},"etag":{"type":["string","null"]}},"required":["id","calendarId","calendarName","isRecurring","status","title","isAllDay","startAt","endAt","startDate","endDate","timeZone","location","meetLink","htmlLink","organizerEmail","isOrganizer","selfResponseStatus","attendeeCount","capabilities","agendaId","description","organizerName","organization","nickname","meetingPrep","attendees","attendeesOmitted","guestsCanSeeOtherGuests","reminders","usesDefaultReminders","recurrence","isSeriesMaster","etag"]},"CalendarEventAttendeeInputDto":{"type":"object","properties":{"email":{"type":"string"},"displayName":{"type":"string"},"optional":{"type":"boolean"}},"required":["email"]},"CalendarEventReminderInputDto":{"type":"object","properties":{"method":{"allOf":[{"$ref":"#/components/schemas/CalendarReminderMethod"}]},"minutes":{"type":"number","minimum":0,"maximum":40320}},"required":["method","minutes"]},"CalendarSendUpdates":{"type":"string","enum":["all","externalOnly","none"]},"CreateCalendarEventDto":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":["string","null"],"description":"Sanitised rich text. Send null to clear it."},"location":{"type":["string","null"]},"isAllDay":{"type":"boolean"},"startAt":{"type":"string","description":"Required unless isAllDay."},"endAt":{"type":"string","description":"Required unless isAllDay."},"startDate":{"type":"string","example":"2026-08-18","description":"Required when isAllDay."},"endDate":{"type":"string","example":"2026-08-18","description":"Required when isAllDay. Inclusive."},"timeZone":{"type":"string","example":"America/Puerto_Rico"},"calendarId":{"type":"string","description":"Calendar the event lives on. Defaults to the primary one."},"attendees":{"type":"array","items":{"$ref":"#/components/schemas/CalendarEventAttendeeInputDto"}},"organizationId":{"type":["string","null"],"format":"uuid"},"nicknameId":{"type":["string","null"],"format":"uuid","description":"Required unless organizationId is sent — an organization already carries a nickname and the meeting inherits it. Every meeting is filed under a nickname, with or without a Meet."},"createMeetLink":{"type":"boolean","description":"Adds a Google Meet and invites the notetaker, which records it for the nickname."},"agendaId":{"type":"string","format":"uuid","description":"A ready Meeting Prep agenda of the meeting's nickname, not yet attached to a meeting. It is attached to the new meeting, which needs a Meet."},"recurrence":{"description":"RFC5545 RRULE / EXDATE / RDATE lines.","type":"array","items":{"type":"string"}},"reminders":{"type":"array","items":{"$ref":"#/components/schemas/CalendarEventReminderInputDto"}},"useDefaultReminders":{"type":"boolean"},"guestsCanModify":{"type":"boolean"},"guestsCanInviteOthers":{"type":"boolean"},"sendUpdates":{"allOf":[{"$ref":"#/components/schemas/CalendarSendUpdates"}]}},"required":["title","isAllDay","timeZone","createMeetLink","sendUpdates"]},"CalendarRecurrenceScope":{"type":"string","enum":["this_event","this_and_following","all_events"]},"UpdateCalendarEventDto":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":["string","null"],"description":"Sanitised rich text. Send null to clear it."},"location":{"type":["string","null"]},"isAllDay":{"type":"boolean"},"startAt":{"type":"string","description":"Required unless isAllDay."},"endAt":{"type":"string","description":"Required unless isAllDay."},"startDate":{"type":"string","example":"2026-08-18","description":"Required when isAllDay."},"endDate":{"type":"string","example":"2026-08-18","description":"Required when isAllDay. Inclusive."},"timeZone":{"type":"string","example":"America/Puerto_Rico"},"calendarId":{"type":"string","description":"Calendar the event lives on. Defaults to the primary one."},"attendees":{"type":"array","items":{"$ref":"#/components/schemas/CalendarEventAttendeeInputDto"}},"organizationId":{"type":["string","null"],"format":"uuid"},"nicknameId":{"type":["string","null"],"format":"uuid","description":"Moves the meeting and its notes to another nickname. Required when turning on a Meet for a meeting with no nickname and no organization. A meeting filed under a nickname cannot be detached; turning its Meet off only drops the notetaker."},"createMeetLink":{"type":"boolean","description":"Adds a Google Meet and invites the notetaker, which records it for the nickname."},"recurrence":{"description":"RFC5545 RRULE / EXDATE / RDATE lines.","type":"array","items":{"type":"string"}},"reminders":{"type":"array","items":{"$ref":"#/components/schemas/CalendarEventReminderInputDto"}},"useDefaultReminders":{"type":"boolean"},"guestsCanModify":{"type":"boolean"},"guestsCanInviteOthers":{"type":"boolean"},"scope":{"allOf":[{"$ref":"#/components/schemas/CalendarRecurrenceScope"}]},"sendUpdates":{"allOf":[{"$ref":"#/components/schemas/CalendarSendUpdates"}]},"etag":{"type":"string","description":"Google etag of the event being edited; rejects the write if it changed meanwhile."}},"required":["scope","sendUpdates"]},"CalendarEventResponseValue":{"type":"string","enum":["accepted","declined","tentative"]},"CalendarEventResponseScope":{"type":"string","enum":["this_event","all_events"]},"CalendarEventResponseDto":{"type":"object","properties":{"calendarId":{"type":"string","description":"Calendar the event lives on. Defaults to the primary one."},"response":{"allOf":[{"$ref":"#/components/schemas/CalendarEventResponseValue"}]},"scope":{"allOf":[{"$ref":"#/components/schemas/CalendarEventResponseScope"}]},"comment":{"type":["string","null"]}},"required":["response","scope"]},"CalendarListItemDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"canWrite":{"type":"boolean"}},"required":["id","name","canWrite"]},"AnnouncementAudience":{"type":"string","enum":["clients","admins"]},"AnnouncementDeliveryStatus":{"type":"string","enum":["unconfirmed","sent","partially_sent","failed"]},"AnnouncementDto":{"type":"object","properties":{"id":{"type":"string"},"audience":{"allOf":[{"$ref":"#/components/schemas/AnnouncementAudience"}]},"subject":{"type":"string"},"bodyPreview":{"type":"string","description":"The start of the message as plain text, cut at 300 characters with an ellipsis"},"senderName":{"type":"string"},"sentAt":{"format":"date-time","type":"string"},"recipientCount":{"type":"number"},"sentCount":{"type":"number","description":"Recipients Postmark accepted"},"failedCount":{"type":"number","description":"Recipients Postmark refused"},"deliveryStatus":{"allOf":[{"$ref":"#/components/schemas/AnnouncementDeliveryStatus"}]}},"required":["id","audience","subject","bodyPreview","senderName","sentAt","recipientCount","sentCount","failedCount","deliveryStatus"]},"AnnouncementsPageDto":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AnnouncementDto"}}},"required":["meta","data"]},"AnnouncementSenderDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"AnnouncementAudienceSizeDto":{"type":"object","properties":{"audience":{"allOf":[{"$ref":"#/components/schemas/AnnouncementAudience"}]},"recipientCount":{"type":"number","description":"How many people a send to this audience would reach now"}},"required":["audience","recipientCount"]},"AnnouncementComposeInfoDto":{"type":"object","properties":{"fromEmail":{"type":"string","description":"The no-reply address announcements are sent from"},"audiences":{"type":"array","items":{"$ref":"#/components/schemas/AnnouncementAudienceSizeDto"}}},"required":["fromEmail","audiences"]},"AnnouncementDetailsDto":{"type":"object","properties":{"id":{"type":"string"},"audience":{"allOf":[{"$ref":"#/components/schemas/AnnouncementAudience"}]},"subject":{"type":"string"},"bodyPreview":{"type":"string","description":"The start of the message as plain text, cut at 300 characters with an ellipsis"},"senderName":{"type":"string"},"sentAt":{"format":"date-time","type":"string"},"recipientCount":{"type":"number"},"sentCount":{"type":"number","description":"Recipients Postmark accepted"},"failedCount":{"type":"number","description":"Recipients Postmark refused"},"deliveryStatus":{"allOf":[{"$ref":"#/components/schemas/AnnouncementDeliveryStatus"}]},"bodyHtml":{"type":"string","description":"The sanitised message markup"},"fromEmail":{"type":"string"}},"required":["id","audience","subject","bodyPreview","senderName","sentAt","recipientCount","sentCount","failedCount","deliveryStatus","bodyHtml","fromEmail"]},"CreateAnnouncementDto":{"type":"object","properties":{"idempotencyKey":{"type":"string","format":"uuid","description":"Generated by the client for each confirmed send. A repeated request with the same key returns the announcement it created instead of mailing the audience again."},"audience":{"allOf":[{"$ref":"#/components/schemas/AnnouncementAudience"}]},"subject":{"type":"string","maxLength":255},"body":{"type":"string","maxLength":50000,"description":"Sanitised rich text: at most 5000 characters of visible text — markup does not count — and 50000 of HTML. At least 50 characters of visible text."}},"required":["idempotencyKey","audience","subject","body"]},"AddressDto":{"type":"object","properties":{"addressLine1":{"type":"string","example":"123 Industrial Ave"},"addressLine2":{"type":"string","example":"Building 4"},"city":{"type":"string","example":"San Juan"},"region":{"type":"string","example":"PR"},"postalCode":{"type":"string","example":"00901"},"country":{"example":"US","description":"ISO 3166-1 alpha-2 country code. \"PR\" is its own entry.","allOf":[{"$ref":"#/components/schemas/CountryCode"}]}},"required":["addressLine1","city","region","postalCode","country"]},"RndBusinessProfileDto":{"type":"object","properties":{"legalName":{"type":"string"},"organizationType":{"type":"string","enum":["corporation","limited_liability_company","partnership","sole_proprietor","other"]},"otherOrganizationType":{"type":"string","description":"Required when organizationType is \"other\""},"isDba":{"type":"boolean"},"dbaName":{"type":"string"},"isSubsidiary":{"type":"boolean"},"parentCompanyName":{"type":"string"},"parentCompanyAddress":{"$ref":"#/components/schemas/OptionalAddressDto"},"physicalAddress":{"$ref":"#/components/schemas/AddressDto"},"companyWebsiteUrl":{"type":"string"},"revenue":{"type":"number"},"ebit":{"type":"number"},"previousYearRevenue":{"type":"number"},"previousYearEbit":{"type":"number"},"companyLogoStorageKey":{"type":["string","null"]}},"required":["legalName","organizationType","isDba","isSubsidiary","physicalAddress","revenue","ebit"]},"SubmitRndDocumentSetDto":{"type":"object","properties":{"generalLedgerStorageKey":{"type":"string"},"payrollLedgerStorageKey":{"type":"string"},"supportingDocumentStorageKeys":{"maxItems":5,"description":"Array of storage keys for supporting documents","type":"array","items":{"type":"string"}}},"required":["generalLedgerStorageKey","payrollLedgerStorageKey"]},"RndTaxInfoDto":{"type":"object","properties":{"fiscalYearEndMonth":{"type":"string"},"fiscalYearEndDay":{"type":"number"},"ein":{"type":"string","description":"9-digit Employer Identification Number with format: 12-3456789"},"taxExemptionGrantNumber":{"type":"string"}},"required":["fiscalYearEndMonth","fiscalYearEndDay","ein"]},"RndCompanyOperationsInfoDto":{"type":"object","properties":{"businessDescription":{"type":"string"},"targetMarkets":{"type":"array","items":{"type":"string","enum":["consumer","small_business","enterprise","government","education","healthcare","non_profit"]}},"industrySectors":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndustry"}},"geographicMarkets":{"type":"array","items":{"type":"string","enum":["us_and_territories","canada_and_mexico","central_america_and_caribbean","south_america","europe","asia_pacific","middle_east","africa"]}},"commercialMarkets":{"type":"array","items":{"type":"string","enum":["b2b","b2c","b2g","c2c","d2c"]}},"clientAndMarketInfo":{"type":"string"}},"required":["businessDescription","targetMarkets","industrySectors","geographicMarkets","commercialMarkets"]},"RndAcquiredIpDto":{"type":"object","properties":{"ipType":{"type":"string"},"maturityLevel":{"type":"string"},"rndUseDescription":{"type":"string"},"expenseAllocationMethodology":{"type":"string"}},"required":["ipType","maturityLevel","rndUseDescription","expenseAllocationMethodology"]},"RndAdditionalInfoSoftwareToolDto":{"type":"object","properties":{"category":{"type":"string","enum":["integrated_development_environments","code_editors","version_control_systems","database_management_systems","build_tools","testing_tools","cicd_tools","configuration_management_tools","containerization_and_orchestration_tools","debugging_tools","project_management_and_collaboration_tools","documentation_tools","api_development_and_testing_tools","static_code_analysis_tools"]},"description":{"type":"string"}},"required":["category","description"]},"RndAdditionalInfoDto":{"type":"object","properties":{"buildsSoftware":{"type":["boolean","null"]},"softwareDevelopmentCycle":{"type":["string","null"],"enum":["agile_methodology","waterfall_model","scrum","kanban","devops",null]},"hasAcquiredIp":{"type":"boolean"},"hasEifGrant":{"type":"boolean"},"eifGrantAmount":{"type":["number","null"]},"acquiredIps":{"type":"array","items":{"$ref":"#/components/schemas/RndAcquiredIpDto"}},"softwareTools":{"description":"One entry per category, at most 14","type":"array","items":{"$ref":"#/components/schemas/RndAdditionalInfoSoftwareToolDto"}}},"required":["hasAcquiredIp","hasEifGrant","acquiredIps"]},"RndContactDto":{"type":"object","properties":{"type":{"type":"string","enum":["company_contact","rnd_lead_manager","authorized_signer"]},"fullName":{"type":"string"},"title":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string","example":"+17871234567"}},"required":["type","fullName","title","email","phone"]},"RndPersonnelDto":{"type":"object","properties":{"fullName":{"type":"string"},"title":{"type":"string"},"academicDegrees":{"type":"array","items":{"type":"string"}},"bio":{"type":"string"}},"required":["fullName","title","academicDegrees","bio"]},"RndProjectProductDto":{"type":"object","properties":{"category":{"type":"string","enum":["software_and_digital_technologies","consumer_and_medical_products","renewable_energy"]},"productStage":{"type":"string","enum":["finished","intermediary"]},"subcategory":{"type":"string"},"functionalities":{"type":"string"}},"required":["category","productStage","functionalities"]},"RndProjectProcessDto":{"type":"object","properties":{"category":{"type":"string","enum":["advanced_systems_and_automation","pharmaceutical_and_biotechnology_innovations","renewable_energy"]},"subcategory":{"type":"string"},"capabilities":{"type":"string"}},"required":["category","capabilities"]},"RndProjectFacilityDto":{"type":"object","properties":{"rndSpaceUse":{"type":"string","enum":["exclusively_for_rnd","initially_for_rnd_with_future_commercial_activity_use","split_use_between_rnd_and_commercial_activities"]},"completionTimeline":{"type":"string","enum":["less_than_one_year","one_to_two_years","two_to_three_years","more_than_three_years"]}},"required":["rndSpaceUse","completionTimeline"]},"RndProjectCommercializationDto":{"type":"object","properties":{"strategy":{"type":"string","enum":["d2c","b2b","b2g","b2b2c","licensing","franchise","white_label"]},"timeline":{"type":"string","enum":["less_than_one_year","one_to_two_years","two_to_three_years","more_than_three_years"]},"targetEndUsers":{"type":"string"},"location":{"type":"string","enum":["us_and_territories","canada_and_mexico","central_america_and_caribbean","south_america","europe","asia_pacific","middle_east","africa"]}},"required":["strategy","timeline","targetEndUsers","location"]},"RndActivityDto":{"type":"object","properties":{"name":{"type":"string"},"category":{"type":"string","enum":["preliminary_study","theoretical_design","prototype_development","design_of_experiments","execution_of_experiments"]},"what":{"type":"string"},"how":{"type":"string"},"why":{"type":"string"},"disposition":{"type":"string","enum":["new","carryover"]},"status":{"type":"string","enum":["ongoing","completed","cancelled"]}},"required":["name","category","disposition","status"]},"RndProjectDto":{"type":"object","properties":{"name":{"type":"string"},"category":{"type":"string","enum":["product","process","facility"]},"status":{"type":"string","enum":["ongoing","completed","postponed","cancelled"]},"disposition":{"type":"string","enum":["new","carryover"]},"type":{"type":"string","enum":["new","existing"]},"ipOwnership":{"type":"boolean"},"location":{"type":"string","enum":["all_in_puerto_rico","more_than_half_in_puerto_rico","less_than_half_in_puerto_rico","none_in_puerto_rico"]},"allocation":{"type":"number","description":"Project allocation percentage (0-100)","minimum":0,"maximum":100},"product":{"$ref":"#/components/schemas/RndProjectProductDto"},"process":{"$ref":"#/components/schemas/RndProjectProcessDto"},"facility":{"$ref":"#/components/schemas/RndProjectFacilityDto"},"commercialization":{"$ref":"#/components/schemas/RndProjectCommercializationDto"},"activities":{"type":"array","items":{"$ref":"#/components/schemas/RndActivityDto"}}},"required":["name","category","status","type","allocation","activities"]},"RndEmployeeAllocationDto":{"type":"object","properties":{"payrollEmployeeId":{"type":"string","format":"uuid"},"performedRnd":{"type":"boolean"},"eaAllocation":{"type":"number","minimum":0,"maximum":100,"description":"Experimental Activities allocation %"},"iaAllocation":{"type":"number","minimum":0,"maximum":100,"description":"Incidental Activities allocation %"},"prsAllocation":{"type":"number","minimum":0,"maximum":100,"description":"Puerto Rico allocation %"},"hiredThisYear":{"type":"boolean"}},"required":["payrollEmployeeId","performedRnd"]},"RndExpenseAllocationDto":{"type":"object","properties":{"generalAccountId":{"type":"string","format":"uuid"},"rndCategory":{"allOf":[{"$ref":"#/components/schemas/RndExpenseCategory"}]},"exclusivelyRnd":{"type":"boolean"}},"required":["generalAccountId","rndCategory","exclusivelyRnd"]},"RndVendorDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"parentAccountId":{"type":"string","format":"uuid"},"vendorName":{"type":"string"},"totalAmount":{"type":"number"},"transactionCount":{"type":"number"},"performedRnd":{"type":"boolean"},"eaAllocation":{"type":"number","minimum":0,"maximum":100,"description":"Experimental Activities allocation % (0-100). EA + IA must be <= 100."},"iaAllocation":{"type":"number","minimum":0,"maximum":100,"description":"Incidental Activities allocation % (0-100). EA + IA must be <= 100."},"prsAllocation":{"type":"number","minimum":0,"maximum":100,"description":"Puerto Rico allocation % (0-100). Independent of EA and IA."},"description":{"type":"string"}},"required":["vendorName","totalAmount","transactionCount","performedRnd"]},"SubmitRndTaxCreditDto":{"type":"object","properties":{"businessProfile":{"$ref":"#/components/schemas/RndBusinessProfileDto"},"documentSet":{"$ref":"#/components/schemas/SubmitRndDocumentSetDto"},"taxInfo":{"$ref":"#/components/schemas/RndTaxInfoDto"},"companyOperationsInfo":{"$ref":"#/components/schemas/RndCompanyOperationsInfoDto"},"additionalInfo":{"$ref":"#/components/schemas/RndAdditionalInfoDto"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/RndContactDto"}},"personnel":{"type":"array","items":{"$ref":"#/components/schemas/RndPersonnelDto"}},"projects":{"type":"array","items":{"$ref":"#/components/schemas/RndProjectDto"}},"employeeAllocations":{"type":"array","items":{"$ref":"#/components/schemas/RndEmployeeAllocationDto"}},"expenseAllocations":{"type":"array","items":{"$ref":"#/components/schemas/RndExpenseAllocationDto"}},"vendors":{"type":"array","items":{"$ref":"#/components/schemas/RndVendorDto"}}},"required":["businessProfile","documentSet","taxInfo","companyOperationsInfo","additionalInfo","contacts","personnel","projects","employeeAllocations","expenseAllocations","vendors"]},"RndTaxCreditSubmissionDto":{"type":"object","properties":{"orgProductId":{"type":"string"},"reportSourceId":{"type":"string"}},"required":["orgProductId","reportSourceId"]},"SubmitRndGeneralInformationDto":{"type":"object","properties":{"businessProfile":{"$ref":"#/components/schemas/RndBusinessProfileDto"},"taxInfo":{"$ref":"#/components/schemas/RndTaxInfoDto"},"companyOperationsInfo":{"$ref":"#/components/schemas/RndCompanyOperationsInfoDto"},"additionalInfo":{"$ref":"#/components/schemas/RndAdditionalInfoDto"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/RndContactDto"}},"personnel":{"type":"array","items":{"$ref":"#/components/schemas/RndPersonnelDto"}},"projects":{"type":"array","items":{"$ref":"#/components/schemas/RndProjectDto"}}},"required":["businessProfile","taxInfo","companyOperationsInfo","additionalInfo","contacts","personnel","projects"]},"RndAmendmentSubmittedProjectDto":{"type":"object","properties":{"allocation":{"type":"number","description":"Project allocation percentage (0-100)","minimum":0,"maximum":100},"id":{"type":"string","format":"uuid"},"activities":{"description":"The activities added in the amendment","type":"array","items":{"$ref":"#/components/schemas/RndActivityDto"}}},"required":["allocation","id","activities"]},"SubmitRndAmendmentDto":{"type":"object","properties":{"documentSet":{"$ref":"#/components/schemas/SubmitRndDocumentSetDto"},"employeeAllocations":{"type":"array","items":{"$ref":"#/components/schemas/RndEmployeeAllocationDto"}},"expenseAllocations":{"type":"array","items":{"$ref":"#/components/schemas/RndExpenseAllocationDto"}},"vendors":{"type":"array","items":{"$ref":"#/components/schemas/RndVendorDto"}},"submittedProjects":{"description":"Every project the original application carried, once each","type":"array","items":{"$ref":"#/components/schemas/RndAmendmentSubmittedProjectDto"}},"newProjects":{"description":"The projects added in the amendment","type":"array","items":{"$ref":"#/components/schemas/RndProjectDto"}}},"required":["documentSet","employeeAllocations","expenseAllocations","vendors","submittedProjects","newProjects"]},"SubmitRndFinancialInformationDto":{"type":"object","properties":{"documentSet":{"$ref":"#/components/schemas/SubmitRndDocumentSetDto"},"employeeAllocations":{"type":"array","items":{"$ref":"#/components/schemas/RndEmployeeAllocationDto"}},"expenseAllocations":{"type":"array","items":{"$ref":"#/components/schemas/RndExpenseAllocationDto"}},"vendors":{"type":"array","items":{"$ref":"#/components/schemas/RndVendorDto"}}},"required":["documentSet","employeeAllocations","expenseAllocations","vendors"]},"RndBusinessProfilePointOfContactEntity":{"type":"object","properties":{"fullName":{"type":["string","null"]},"relationWithCompany":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["fullName","relationWithCompany","email","phone"]},"RndBusinessProfileEntity":{"type":"object","properties":{"id":{"type":["string","null"]},"legalName":{"type":"string"},"organizationType":{"type":["string","null"],"enum":["corporation","limited_liability_company","partnership","sole_proprietor","other",null]},"otherOrganizationType":{"type":["string","null"]},"isDba":{"type":["boolean","null"]},"dbaName":{"type":["string","null"]},"isSubsidiary":{"type":["boolean","null"]},"parentCompanyName":{"type":["string","null"]},"parentCompanyAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"companyWebsiteUrl":{"type":["string","null"]},"industries":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndustry"}},"revenue":{"type":["number","null"]},"ebit":{"type":["number","null"]},"previousYearRevenue":{"type":["number","null"]},"previousYearEbit":{"type":["number","null"]},"companyLogoStorageKey":{"type":["string","null"]},"companyLogo":{"anyOf":[{"$ref":"#/components/schemas/FileUploadResultEntity"},{"type":"null"}]},"primaryPointOfContact":{"$ref":"#/components/schemas/RndBusinessProfilePointOfContactEntity"}},"required":["id","legalName","organizationType","otherOrganizationType","isDba","dbaName","isSubsidiary","parentCompanyName","parentCompanyAddress","physicalAddress","companyWebsiteUrl","industries","revenue","ebit","previousYearRevenue","previousYearEbit","companyLogoStorageKey","companyLogo","primaryPointOfContact"]},"ProductDocumentCategory":{"type":"string","enum":["rnd_general_ledger","rnd_payroll_ledger","rnd_supporting_document","rnd_additional_general_ledger","rnd_additional_payroll_ledger","rnd_aup_certificate","tax_credit_final_document","act60_all_concepts_debt_certificate","act60_certificate_of_filing_income_tax","act60_certificate_of_good_standing","act60_certificate_of_registry","act60_certified_financial_statements","act60_criminal_record","act60_debt_certificate_social_security_chauffeurs","act60_debt_certificate_unemployment_disability","act60_employer_identification_number_letter","act60_merchants_registration_certificate","act60_negative_debt_certificate_treasury","act60_negative_debt_certificate_state_insurance","act60_entity_organizational_chart","act60_resume_or_curriculum_vitae","act60_commercial_reference","act60_other","act60_manufacturing_production_process_description","act60_manufacturing_professionals_registry","act60_manufacturing_section_2064_declination","act60_manufacturing_disclosure_tax_investigation","act60_manufacturing_disclosure_conviction","act60_manufacturing_disclosure_arrest_or_summons","act60_manufacturing_disclosure_business_prohibition","act60_manufacturing_new_business_evidence","act60_manufacturing_background_support","act60_export_ownership_chart","act60_export_professionals_registry","act60_export_disclosure_tax_investigation","act60_export_disclosure_conviction","act60_export_disclosure_arrest_or_summons","act60_export_disclosure_business_prohibition","act60_export_base_period_income_support","act60_export_background_support","act60_private_equity_background_document","act60_tourism_authorization_letter","act60_tourism_certificate_of_formation","act60_tourism_operating_agreements","act60_tourism_pre_application_letter","act60_tourism_endorsement_letter","act60_tourism_previous_concession_copy","act60_tourism_entity_income_tax_returns","act60_tourism_negative_debt_room_tax","act60_tourism_employee_compliance_asume","act60_tourism_detailed_description","act60_tourism_business_plan","act60_tourism_construction_permit","act60_tourism_project_blueprints","act60_tourism_conservation_environmental_plan","act60_tourism_locally_sourced_materials","act60_tourism_local_agricultural_products","act60_tourism_local_professional_services","act60_tourism_contractors_subcontractors","act60_tourism_vendor_contracts","act60_tourism_bank_account_evidence","act60_tourism_marketing_plan","act60_tourism_security_measures_plan","act60_tourism_personnel_training_plan","act60_tourism_ada_accessibility_plan","act60_tourism_sole_permit","act60_tourism_municipal_license","act60_tourism_alcoholic_beverages_license","act60_tourism_hacienda_registration","act60_tourism_public_liability_insurance","act60_tourism_real_personal_property_inventory","act60_tourism_financial_analysis_statement","act60_tourism_negative_debt_treasury","act60_tourism_economic_development_description","act60_tourism_design_planification","act60_tourism_fire_inspection_certificate","act60_tourism_public_establishment_certificate","act60_tourism_casino_license","act60_tourism_casino_endorsement","act60_tourism_golf_course_description","act60_tourism_nautical_permits","act60_tourism_nautical_registration","act60_tourism_nautical_vessel_info","act60_tourism_institutional_sworn_statement","act60_tourism_additional_information","act60_tourism_eligibility_report","act60_hard_to_recruit_all_concepts_debt_report","act60_hard_to_recruit_explanatory_letter_applicant","act60_hard_to_recruit_explanatory_letter_exempt_business","act60_hard_to_recruit_bachelors_degree_copy","act60_hard_to_recruit_resume_or_curriculum_vitae","act60_hard_to_recruit_institutional_sworn_statement","act60_hard_to_recruit_negative_certificate_child_support","act60_hard_to_recruit_returns_filing_certification","act60_hard_to_recruit_ssn_or_national_id","act60_hard_to_recruit_us_passport_or_resident_visa","act60_hard_to_recruit_criminal_record","act60_hard_to_recruit_negative_debt_certificate_treasury","act60_hard_to_recruit_other","act60_young_entrepreneur_all_concepts_debt_report","act60_young_entrepreneur_negative_debt_certificate_treasury","act60_young_entrepreneur_diploma","act60_young_entrepreneur_photo_identification","act60_young_entrepreneur_tax_return_filing_certification","act60_young_entrepreneur_birth_certificate","act60_young_entrepreneur_certificate_of_incorporation","act60_young_entrepreneur_child_support_compliance","act60_young_entrepreneur_other"]},"ProductDocumentsByCategoryDto":{"type":"object","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/ProductDocumentCategory"}]},"label":{"type":"string"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentFileDto"}},"description":{"type":["string","null"]},"notApplicable":{"type":"boolean"}},"required":["category","label","documents","description","notApplicable"]},"RndTaxInfoEntity":{"type":"object","properties":{"id":{"type":"string"},"fiscalYearEndMonth":{"type":"string"},"fiscalYearEndDay":{"type":"number"},"ein":{"type":"string"},"taxExemptionGrantNumber":{"type":["string","null"]}},"required":["id","fiscalYearEndMonth","fiscalYearEndDay","ein","taxExemptionGrantNumber"]},"RndCompanyOperationsEntity":{"type":"object","properties":{"id":{"type":"string"},"businessDescription":{"type":"string"},"targetMarkets":{"type":"array","items":{"type":"string"}},"industrySectors":{"type":"array","items":{"type":"string"}},"geographicMarkets":{"type":"array","items":{"type":"string"}},"commercialMarkets":{"type":"array","items":{"type":"string"}},"clientAndMarketInfo":{"type":["string","null"]}},"required":["id","businessDescription","targetMarkets","industrySectors","geographicMarkets","commercialMarkets","clientAndMarketInfo"]},"RndAcquiredIpEntity":{"type":"object","properties":{"id":{"type":"string"},"ipType":{"type":"string"},"maturityLevel":{"type":"string"},"rndUseDescription":{"type":"string"},"expenseAllocationMethodology":{"type":"string"}},"required":["id","ipType","maturityLevel","rndUseDescription","expenseAllocationMethodology"]},"RndAdditionalInfoSoftwareToolEntity":{"type":"object","properties":{"category":{"type":"string","enum":["integrated_development_environments","code_editors","version_control_systems","database_management_systems","build_tools","testing_tools","cicd_tools","configuration_management_tools","containerization_and_orchestration_tools","debugging_tools","project_management_and_collaboration_tools","documentation_tools","api_development_and_testing_tools","static_code_analysis_tools"]},"description":{"type":"string"}},"required":["category","description"]},"RndAdditionalInfoEntity":{"type":"object","properties":{"id":{"type":"string"},"buildsSoftware":{"type":["boolean","null"]},"softwareDevelopmentCycle":{"type":["string","null"],"enum":["agile_methodology","waterfall_model","scrum","kanban","devops",null]},"hasAcquiredIp":{"type":"boolean"},"hasEifGrant":{"type":"boolean"},"eifGrantAmount":{"type":["number","null"]},"acquiredIps":{"type":"array","items":{"$ref":"#/components/schemas/RndAcquiredIpEntity"}},"softwareTools":{"type":"array","items":{"$ref":"#/components/schemas/RndAdditionalInfoSoftwareToolEntity"}}},"required":["id","buildsSoftware","softwareDevelopmentCycle","hasAcquiredIp","hasEifGrant","eifGrantAmount","acquiredIps","softwareTools"]},"RndContactEntity":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["company_contact","rnd_lead_manager","authorized_signer"]},"fullName":{"type":"string"},"title":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"}},"required":["id","type","fullName","title","email","phone"]},"RndPersonnelEntity":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"type":"string"},"title":{"type":"string"},"academicDegrees":{"type":"array","items":{"type":"string"}},"bio":{"type":"string"}},"required":["id","fullName","title","academicDegrees","bio"]},"RndProjectProductEntity":{"type":"object","properties":{"category":{"type":"string","enum":["software_and_digital_technologies","consumer_and_medical_products","renewable_energy"]},"productStage":{"type":["string","null"],"enum":["finished","intermediary",null]},"subcategory":{"type":["string","null"]},"functionalities":{"type":"string"}},"required":["category","productStage","subcategory","functionalities"]},"RndProjectProcessEntity":{"type":"object","properties":{"category":{"type":"string","enum":["advanced_systems_and_automation","pharmaceutical_and_biotechnology_innovations","renewable_energy"]},"subcategory":{"type":["string","null"]},"capabilities":{"type":"string"}},"required":["category","subcategory","capabilities"]},"RndProjectFacilityEntity":{"type":"object","properties":{"rndSpaceUse":{"type":"string","enum":["exclusively_for_rnd","initially_for_rnd_with_future_commercial_activity_use","split_use_between_rnd_and_commercial_activities"]},"completionTimeline":{"type":"string","enum":["less_than_one_year","one_to_two_years","two_to_three_years","more_than_three_years"]}},"required":["rndSpaceUse","completionTimeline"]},"RndProjectCommercializationEntity":{"type":"object","properties":{"strategy":{"type":"string","enum":["d2c","b2b","b2g","b2b2c","licensing","franchise","white_label"]},"timeline":{"type":"string","enum":["less_than_one_year","one_to_two_years","two_to_three_years","more_than_three_years"]},"targetEndUsers":{"type":"string"},"location":{"type":"string","enum":["us_and_territories","canada_and_mexico","central_america_and_caribbean","south_america","europe","asia_pacific","middle_east","africa"]}},"required":["strategy","timeline","targetEndUsers","location"]},"RndActivityEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["preliminary_study","theoretical_design","prototype_development","design_of_experiments","execution_of_experiments"]},"status":{"type":"string","enum":["ongoing","completed","cancelled"]},"disposition":{"type":"string","enum":["new","carryover"]},"what":{"type":["string","null"]},"how":{"type":["string","null"]},"why":{"type":["string","null"]},"isPreviouslySubmitted":{"type":"boolean"}},"required":["id","name","category","status","disposition","what","how","why","isPreviouslySubmitted"]},"RndProjectEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["product","process","facility"]},"status":{"type":"string","enum":["ongoing","completed","postponed","cancelled"]},"disposition":{"type":"string","enum":["new","carryover"]},"type":{"type":"string","enum":["new","existing"]},"ipOwnership":{"type":["boolean","null"]},"location":{"type":["string","null"],"enum":["all_in_puerto_rico","more_than_half_in_puerto_rico","less_than_half_in_puerto_rico","none_in_puerto_rico",null]},"allocation":{"type":"number"},"isPreviouslySubmitted":{"type":"boolean"},"product":{"anyOf":[{"$ref":"#/components/schemas/RndProjectProductEntity"},{"type":"null"}]},"process":{"anyOf":[{"$ref":"#/components/schemas/RndProjectProcessEntity"},{"type":"null"}]},"facility":{"anyOf":[{"$ref":"#/components/schemas/RndProjectFacilityEntity"},{"type":"null"}]},"commercialization":{"anyOf":[{"$ref":"#/components/schemas/RndProjectCommercializationEntity"},{"type":"null"}]},"activities":{"type":"array","items":{"$ref":"#/components/schemas/RndActivityEntity"}}},"required":["id","name","category","status","disposition","type","ipOwnership","location","allocation","isPreviouslySubmitted","product","process","facility","commercialization","activities"]},"RndEmployeeAllocationEntity":{"type":"object","properties":{"payrollEmployeeId":{"type":"string"},"performedRnd":{"type":"boolean"},"hiredThisYear":{"type":["boolean","null"]},"eaAllocation":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Experimental Activities allocation %"},"iaAllocation":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Incidental Activities allocation %"},"prsAllocation":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Puerto Rico allocation %"}},"required":["payrollEmployeeId","performedRnd","hiredThisYear","eaAllocation","iaAllocation","prsAllocation"]},"RndExpenseAllocationEntity":{"type":"object","properties":{"generalAccountId":{"type":"string"},"rndCategory":{"allOf":[{"$ref":"#/components/schemas/RndExpenseCategory"}]},"exclusivelyRnd":{"type":"boolean"},"allocation":{"type":["number","null"],"minimum":0,"maximum":100}},"required":["generalAccountId","rndCategory","exclusivelyRnd","allocation"]},"RndVendorEntity":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"parentAccountId":{"type":["string","null"],"format":"uuid"},"vendorName":{"type":"string","description":"Vendor name from General Ledger"},"totalAmount":{"type":"number","description":"Total expenses for this vendor"},"transactionCount":{"type":"number","description":"Number of transactions for this vendor"},"performedRnd":{"type":["boolean","null"],"description":"Whether this vendor performed R&D work"},"eaAllocation":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Experimental Activities allocation %"},"iaAllocation":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Incidental Activities allocation %"},"prsAllocation":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Puerto Rico allocation %"},"description":{"type":["string","null"]}},"required":["id","parentAccountId","vendorName","totalAmount","transactionCount","performedRnd","eaAllocation","iaAllocation","prsAllocation","description"]},"RndLedgerFormStatusesEntity":{"type":"object","properties":{"employeesExpenses":{"type":"string","enum":["completed","new"]},"rndExpenses":{"type":"string","enum":["completed","new"]},"vendorsExpenses":{"type":"string","enum":["completed","new"]},"projectsExpenses":{"type":"string","enum":["completed","new"]}},"required":["employeesExpenses","rndExpenses","vendorsExpenses","projectsExpenses"]},"RndTaxCreditDataEntity":{"type":"object","properties":{"orgProductId":{"type":"string"},"year":{"type":"number"},"amendmentNumber":{"type":["number","null"],"minimum":1},"status":{"allOf":[{"$ref":"#/components/schemas/OrgProductStatus"}]},"generalClientStatus":{"type":"string","enum":["not_started_yet","in_progress","in_review","on_hold","aup_review","aup_completed","submitted_to_government","not_approved","approved","monetized"]},"financialClientStatus":{"type":"string","enum":["not_started_yet","in_progress","in_review","on_hold","aup_review","aup_completed","submitted_to_government","not_approved","approved","monetized"]},"businessProfile":{"anyOf":[{"$ref":"#/components/schemas/RndBusinessProfileEntity"},{"type":"null"}]},"documents":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}},"aupLocked":{"type":"boolean"},"taxInfo":{"anyOf":[{"$ref":"#/components/schemas/RndTaxInfoEntity"},{"type":"null"}]},"companyOperations":{"anyOf":[{"$ref":"#/components/schemas/RndCompanyOperationsEntity"},{"type":"null"}]},"additionalInfo":{"anyOf":[{"$ref":"#/components/schemas/RndAdditionalInfoEntity"},{"type":"null"}]},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/RndContactEntity"}},"personnel":{"type":"array","items":{"$ref":"#/components/schemas/RndPersonnelEntity"}},"projects":{"type":"array","items":{"$ref":"#/components/schemas/RndProjectEntity"}},"employeeAllocations":{"type":"array","items":{"$ref":"#/components/schemas/RndEmployeeAllocationEntity"}},"expenseAllocations":{"type":"array","items":{"$ref":"#/components/schemas/RndExpenseAllocationEntity"}},"vendors":{"type":"array","items":{"$ref":"#/components/schemas/RndVendorEntity"}},"ledgerFormStatuses":{"$ref":"#/components/schemas/RndLedgerFormStatusesEntity"},"additionalExpensesPending":{"type":"boolean","description":"Additional ledger documents were sent and are awaiting data-analyst review; the Financial Ledgers tab is blocked until then"}},"required":["orgProductId","year","amendmentNumber","status","generalClientStatus","financialClientStatus","businessProfile","documents","aupLocked","taxInfo","companyOperations","additionalInfo","contacts","personnel","projects","employeeAllocations","expenseAllocations","vendors","ledgerFormStatuses","additionalExpensesPending"]},"RndProjectsExportFormat":{"type":"string","enum":["csv","xlsx"]},"UploadProductDocumentsDto":{"type":"object","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/ProductDocumentCategory"}]},"storageKeys":{"type":"array","items":{"type":"string"}},"sendForReview":{"type":"boolean"}},"required":["category","storageKeys"]},"ReportEntity":{"type":"object","properties":{"id":{"type":"string"},"orgProductId":{"type":"string"},"submissionId":{"type":["string","null"]},"productType":{"type":"string","enum":["rnd_tax_credit","rnd_tax_credit_amendment","act_60","act_60_amendment","certificate_of_organization","articles_of_incorporation","ein_letter","operating_agreement_bylaws","department_of_state_registrations","treasury_suri_registration","child_support_registration","crim_registration","state_insurance_fund_registration","labor_human_resources_registration","incentives_portal_registration","merchants_registration_certificate","single_permit_application","provisional_municipal_license_tax","local_pr_bank_account","manufacturers_id","non_withholding_waiver","municipal_decree","sales_use_tax","professional_services_rendered","volume_of_business","incentive_income_tax_return","informative_returns","personal_property_tax","annual_report","exempt_annual_report","federal_income_tax_return","irs_form_8898","income_tax_return","state_income_tax_return","filing_extension","tourism_tax_credit","financing","federal_grant","eif_grant","me_grant","other_grant","ad_hoc_foundational_services","ad_hoc_incentives","ad_hoc_tax_compliance","ad_hoc_tax_credits","ad_hoc_financing","ad_hoc_local_grants","ad_hoc_federal_grants","custom"]},"decreeType":{"type":["string","null"],"enum":["manufacturing","tourism","export","private_equity","hard_to_recruit","young_entrepreneur",null]},"generatedAt":{"format":"date-time","type":"string"},"generatedById":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","orgProductId","submissionId","productType","decreeType","generatedAt","generatedById","createdAt","updatedAt"]},"OrganizationType":{"type":"string","enum":["corporation","limited_liability_company","partnership","sole_proprietor","other"]},"RndReportImportBusinessProfileDto":{"type":"object","properties":{"legalName":{"type":["string","null"]},"dbaName":{"type":["string","null"]},"organizationType":{"anyOf":[{"$ref":"#/components/schemas/OrganizationType"},{"type":"null"}]},"website":{"type":["string","null"],"description":"With its scheme, as the form requires."},"physicalAddress":{"description":"Country as an ISO 3166-1 alpha-2 code.","anyOf":[{"$ref":"#/components/schemas/OptionalAddressEntity"},{"type":"null"}]},"parentCompanyName":{"type":["string","null"]},"parentCompanyAddress":{"description":"Country as an ISO 3166-1 alpha-2 code.","anyOf":[{"$ref":"#/components/schemas/OptionalAddressEntity"},{"type":"null"}]},"revenue":{"type":["number","null"],"description":"The report's Current Year figure."},"ebit":{"type":["number","null"],"description":"The report's Current Year figure."},"previousYearRevenue":{"type":["number","null"],"description":"The report's Prior Year figure."},"previousYearEbit":{"type":["number","null"],"description":"The report's Prior Year figure."}},"required":["legalName","dbaName","organizationType","website","physicalAddress","parentCompanyName","parentCompanyAddress","revenue","ebit","previousYearRevenue","previousYearEbit"]},"RndReportImportTaxInfoDto":{"type":"object","properties":{"fiscalYearEndMonth":{"type":["string","null"],"example":"December","description":"The month, day and year are set together, only when the report prints the full date."},"fiscalYearEndDay":{"type":["number","null"],"description":"The month, day and year are set together, only when the report prints the full date."},"fiscalYearEndYear":{"type":["number","null"],"description":"The month, day and year are set together, only when the report prints the full date."},"ein":{"type":["string","null"]},"taxExemptionGrantNumber":{"type":["string","null"]}},"required":["fiscalYearEndMonth","fiscalYearEndDay","fiscalYearEndYear","ein","taxExemptionGrantNumber"]},"RndCompanyOperationsTargetMarket":{"type":"string","enum":["consumer","small_business","enterprise","government","education","healthcare","non_profit"]},"RndGeographicRegion":{"type":"string","enum":["us_and_territories","canada_and_mexico","central_america_and_caribbean","south_america","europe","asia_pacific","middle_east","africa"]},"RndCompanyOperationsCommercialMarket":{"type":"string","enum":["b2b","b2c","b2g","c2c","d2c"]},"RndReportImportCompanyOperationsDto":{"type":"object","properties":{"targetMarkets":{"type":"array","items":{"$ref":"#/components/schemas/RndCompanyOperationsTargetMarket"}},"industrySectors":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndustry"}},"geographicMarkets":{"type":"array","items":{"$ref":"#/components/schemas/RndGeographicRegion"}},"commercialMarkets":{"type":"array","items":{"$ref":"#/components/schemas/RndCompanyOperationsCommercialMarket"}}},"required":["targetMarkets","industrySectors","geographicMarkets","commercialMarkets"]},"RndSoftwareDevelopmentCycle":{"type":"string","enum":["agile_methodology","waterfall_model","scrum","kanban","devops"]},"RndSoftwareToolCategory":{"type":"string","enum":["integrated_development_environments","code_editors","version_control_systems","database_management_systems","build_tools","testing_tools","cicd_tools","configuration_management_tools","containerization_and_orchestration_tools","debugging_tools","project_management_and_collaboration_tools","documentation_tools","api_development_and_testing_tools","static_code_analysis_tools"]},"RndReportImportSoftwareToolDto":{"type":"object","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/RndSoftwareToolCategory"}]},"description":{"type":"string"}},"required":["category","description"]},"RndReportImportAdditionalInfoDto":{"type":"object","properties":{"buildsSoftware":{"type":["boolean","null"]},"softwareDevelopmentCycle":{"anyOf":[{"$ref":"#/components/schemas/RndSoftwareDevelopmentCycle"},{"type":"null"}]},"softwareTools":{"type":"array","items":{"$ref":"#/components/schemas/RndReportImportSoftwareToolDto"}}},"required":["buildsSoftware","softwareDevelopmentCycle","softwareTools"]},"RndContactType":{"type":"string","enum":["company_contact","rnd_lead_manager","authorized_signer"]},"RndReportImportContactDto":{"type":"object","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/RndContactType"}]},"fullName":{"type":"string"},"title":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["type","fullName","title","email","phone"]},"RndReportImportPersonnelDto":{"type":"object","properties":{"fullName":{"type":"string"},"title":{"type":["string","null"]}},"required":["fullName","title"]},"RndProjectCategory":{"type":"string","enum":["product","process","facility"]},"RndProjectStatus":{"type":"string","enum":["ongoing","completed","postponed","cancelled"]},"RndProjectType":{"type":"string","enum":["new","existing"]},"RndProjectProductStage":{"type":"string","enum":["finished","intermediary"]},"RndReportImportProjectDto":{"type":"object","properties":{"name":{"type":"string"},"category":{"anyOf":[{"$ref":"#/components/schemas/RndProjectCategory"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/RndProjectStatus"},{"type":"null"}]},"type":{"anyOf":[{"$ref":"#/components/schemas/RndProjectType"},{"type":"null"}]},"productStage":{"anyOf":[{"$ref":"#/components/schemas/RndProjectProductStage"},{"type":"null"}]}},"required":["name","category","status","type","productStage"]},"RndReportImportDto":{"type":"object","properties":{"businessProfile":{"anyOf":[{"$ref":"#/components/schemas/RndReportImportBusinessProfileDto"},{"type":"null"}]},"taxInfo":{"anyOf":[{"$ref":"#/components/schemas/RndReportImportTaxInfoDto"},{"type":"null"}]},"companyOperations":{"anyOf":[{"$ref":"#/components/schemas/RndReportImportCompanyOperationsDto"},{"type":"null"}]},"additionalInfo":{"anyOf":[{"$ref":"#/components/schemas/RndReportImportAdditionalInfoDto"},{"type":"null"}]},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/RndReportImportContactDto"}},"personnel":{"type":"array","items":{"$ref":"#/components/schemas/RndReportImportPersonnelDto"}},"projects":{"type":"array","items":{"$ref":"#/components/schemas/RndReportImportProjectDto"}},"isFiledInLibrary":{"type":"boolean","description":"Whether the uploaded report was filed in the organization's library (Other block). False when the report was chosen from the library, or when it could not be filed — the viewer may lack the right to add library documents."}},"required":["businessProfile","taxInfo","companyOperations","additionalInfo","contacts","personnel","projects","isFiledInLibrary"]},"RndReportImportParseDocumentDto":{"type":"object","properties":{"documentId":{"type":"string"}},"required":["documentId"]},"MarkRndAupCertificateReviewedDto":{"type":"object","properties":{"documentId":{"type":"string"}},"required":["documentId"]},"UploadRndAupCertificateDto":{"type":"object","properties":{"storageKey":{"type":"string"}},"required":["storageKey"]},"RndAmendmentPackageMissingCode":{"type":"string","enum":["certification_date","certified_amount","ein","tax_exemption_grant_number","aup_certificate","original_aup_figures","amendment_aup_figures"]},"RndAmendmentPackageMissingItemDto":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/RndAmendmentPackageMissingCode"}]},"label":{"type":"string"}},"required":["code","label"]},"RndAmendmentPackageWarningCode":{"type":"string","enum":["filing_date","fiscal_year_end"]},"RndAmendmentPackageWarningItemDto":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/RndAmendmentPackageWarningCode"}]},"label":{"type":"string"}},"required":["code","label"]},"RndAmendmentPackageReadinessDto":{"type":"object","properties":{"missing":{"description":"What the package cannot be generated without; generating is refused while any is listed.","type":"array","items":{"$ref":"#/components/schemas/RndAmendmentPackageMissingItemDto"}},"warnings":{"description":"What the package is generated without, each leaving a highlighted blank in the letter and a review note on the version.","type":"array","items":{"$ref":"#/components/schemas/RndAmendmentPackageWarningItemDto"}},"defaultRecipient":{"description":"Who the letter is addressed to unless the admin picks another: the first DDEC Responsible of the original application; null when it has none.","anyOf":[{"$ref":"#/components/schemas/DdecOfficerEntity"},{"type":"null"}]}},"required":["missing","warnings","defaultRecipient"]},"GenerateRndAmendmentPackageDto":{"type":"object","properties":{"recipientId":{"type":"string","format":"uuid","description":"The DDEC officer the letter is addressed to."}},"required":["recipientId"]},"RndAmendmentPackageVersionDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"number","description":"1-based, per amendment."},"generatedAt":{"format":"date-time","type":"string"},"generatedByName":{"type":["string","null"]},"recipientName":{"type":"string"},"reviewNotes":{"description":"What the admin should check before sending. Shown here only, never printed in the documents.","type":"array","items":{"type":"string"}},"letterFileName":{"type":"string"},"certificateFileName":{"type":"string"},"reportFileName":{"type":["string","null"],"description":"The New Projects and Activities RDTC report; null when the amendment adds no project or activity."},"packageFileName":{"type":"string"}},"required":["id","version","generatedAt","generatedByName","recipientName","reviewNotes","letterFileName","certificateFileName","reportFileName","packageFileName"]},"RndAmendmentPackageVersionsDto":{"type":"object","properties":{"versions":{"description":"Newest first; `total` counts them all.","type":"array","items":{"$ref":"#/components/schemas/RndAmendmentPackageVersionDto"}},"total":{"type":"number","description":"How many versions exist."}},"required":["versions","total"]},"RndAmendmentPackageFileKind":{"type":"string","enum":["letter","certificate","report","package"]},"VouchingFileUploadedFilter":{"type":"string","enum":["all","yes","no"]},"IngestedDocumentType":{"type":"string","enum":["invoice","payment","other"],"description":"What the document is. Null means it has not been classified — by the AI or by hand — and the document is shown as unresolved. `other` is a decided answer and is not the same as null."},"VouchingFileRefEntity":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"previewContentType":{"type":["string","null"],"description":"The type the preview serves the file under, e.g. `application/pdf` or `image/png`, taken from the stored type or, when that is missing or generic, the file’s extension. Null when the file downloads instead of opening in place: its type is not one shown inline, it has no stored copy, or the pipeline refused it as `unsupported_type`. While `isProcessing` it reflects the type declared at upload, not yet checked."},"size":{"type":"number"},"url":{"type":"string"},"type":{"description":"What the document is. Null means it has not been classified — by the AI or by hand — and the document is shown as unresolved. `other` is a decided answer and is not the same as null.","anyOf":[{"$ref":"#/components/schemas/IngestedDocumentType"},{"type":"null"}]},"invoiceAmount":{"type":["number","null"],"description":"The invoice total read out of the document, or null when it carries none. This is what invoice totals are built from, and only for a document typed `invoice`; a transaction with lines highlighted on the document takes their total instead (see `attributedShare`)."},"paymentAmount":{"type":["number","null"],"description":"The amount paid according to the document, or null when it carries none. This is what evidence-of-payment totals are built from, and only for a document typed `payment`; a transaction with lines highlighted on the document takes their total instead (see `attributedShare`). A payment with no paid amount read contributes only its highlighted lines and the lines the classifier priced for its links; its invoice amount never stands in."},"documentDate":{"type":["string","null"],"format":"date","description":"The calendar day the document carries, as `YYYY-MM-DD`. Null when none was found."},"documentNumber":{"type":["string","null"],"description":"The identifier the document carries: the payment reference for a payment and the invoice number for anything else, each falling back to the other when the document carries only one. Null when it carries neither — which is why a record falls back to its file name."},"paymentType":{"type":["string","null"],"description":"How the payment was made, e.g. \"ACH\", \"Wire\", \"Check #1234\", as read off the document whatever its type. Null when none was found."},"documentDescription":{"type":["string","null"],"description":"What the invoice was for, as read off the document."},"linkedTransactionIds":{"description":"Every Selected Sample transaction this document supports, across the whole application, regardless of the table’s filters.","type":"array","items":{"type":"string"}},"isNew":{"type":"boolean","description":"A client uploaded the document and no DECA admin has seen it yet: opening its preview or Mark as seen clears it. Always false for anyone but DECA staff."},"uploadedAt":{"type":"string","format":"date-time","description":"When the document was uploaded."},"isProcessing":{"type":"boolean","description":"Whether the upload pipeline is still reading this document. Until it finishes the document is neither attachable nor unresolved."},"hasStoredFile":{"type":"boolean","description":"False when no object was stored for the file (an archive entry the pipeline blocked) or the stored object went missing. A placeholder still being uploaded reads true."}},"required":["id","fileName","previewContentType","size","url","type","invoiceAmount","paymentAmount","documentDate","documentNumber","paymentType","documentDescription","linkedTransactionIds","isNew","uploadedAt","isProcessing","hasStoredFile"]},"VouchingFileMatchEntity":{"type":"object","properties":{"file":{"$ref":"#/components/schemas/VouchingFileRefEntity"},"confidenceScore":{"type":["number","null"]},"matchedAt":{"type":"string"},"attributedShare":{"type":"number","description":"This transaction's share of the document's amount (DECA-2656 §9, DECA-2659). The amount is the one of the document's kind: the paid amount of a payment, the invoice total of anything else. When lines of the document are highlighted for this transaction, the share is exactly their total — never scaled, even past the amount. The document's other links share what the highlighted lines leave: a link the classifier priced takes that price, scaled back when the priced links exceed what is left, and the unpriced links split the rest evenly. While none of the document's links has highlighted lines, the only link of a payment takes the whole paid amount when that is positive, whatever the classifier priced it at. A document with no amount read contributes only its highlighted and priced links; its invoice amount never stands in for a paid amount."},"invoiceNumbers":{"description":"The invoice numbers highlighted on the document for this transaction, in reading order. One document can hold different numbers for different transactions.","type":"array","items":{"type":"string"}}},"required":["file","confidenceScore","matchedAt","attributedShare","invoiceNumbers"]},"VouchingApprovalStatus":{"type":"string","enum":["pending","approved","further_documents_required"],"description":"The approval decision DECA recorded. Outside an admin-portal session it comes as the client-facing `status` reads: `approved` for `vouched`, `further_documents_required` for that status, `pending` otherwise."},"VouchingTransactionStatus":{"type":"string","enum":["pending_invoice","pending_payment","pending_approval","document_issue","further_documents_required","approved","vouched_without_exception","exception_noted","in_review","vouched"],"description":"The status shown in the table: a reviewer’s hand-set status, or a Document issue the documents raised, when there is one; otherwise derived from the approval decision and the documents currently attached. Derived, a transaction awaits its invoice, then its payment, then its approval once both are attached; `vouched_without_exception` is never derived: it is set by hand once the transaction is approved, and is the final status while the transaction keeps an invoice (a document change leaving it none drops it to `pending_invoice`). `document_issue` is raised by itself when the AI confidence is under 60% or an attached document has no type, on a transaction whose approval is pending with nothing hand-set or that waits on further documents, and only a reviewer ends it. Outside an admin-portal session it comes as the client-facing name: `in_review` for `pending_approval`, `document_issue` and `approved`, and `vouched` for `vouched_without_exception` and `exception_noted`."},"VouchingDocumentIssueEntity":{"type":"object","properties":{"lowConfidence":{"type":["number","null"],"description":"The transaction’s AI confidence (0–100) when it is under the Document issue threshold; null otherwise."},"untypedDocumentCount":{"type":"number","description":"Documents attached to the transaction with no type yet (still processing ones aside)."}},"required":["lowConfidence","untypedDocumentCount"]},"VouchingTransactionEntity":{"type":"object","properties":{"id":{"type":"string"},"categoryKey":{"allOf":[{"$ref":"#/components/schemas/RndAupExpenseCategory"}]},"supplier":{"type":"string"},"claimedAmount":{"type":"number"},"number":{"type":"string"},"glAccount":{"type":"string"},"description":{"type":"string"},"date":{"type":"string"},"dateLabel":{"type":["string","null"],"description":"The period the CPA workbook recorded instead of a date, e.g. \"FY 2025\"; shown while `date` is empty."},"eligibleExpenses":{"type":"number"},"confidenceScore":{"type":["number","null"],"description":"Median confidence of the matched documents (0–100), or null when the transaction has no document (N/A band)."},"matches":{"description":"Every document allocated to this transaction, ordered best-confidence first.","type":"array","items":{"$ref":"#/components/schemas/VouchingFileMatchEntity"}},"match":{"description":"The best-confidence match (matches[0]); null when none.","anyOf":[{"$ref":"#/components/schemas/VouchingFileMatchEntity"},{"type":"null"}]},"approvalStatus":{"description":"The approval decision DECA recorded. Outside an admin-portal session it comes as the client-facing `status` reads: `approved` for `vouched`, `further_documents_required` for that status, `pending` otherwise.","allOf":[{"$ref":"#/components/schemas/VouchingApprovalStatus"}]},"status":{"description":"The status shown in the table: a reviewer’s hand-set status, or a Document issue the documents raised, when there is one; otherwise derived from the approval decision and the documents currently attached. Derived, a transaction awaits its invoice, then its payment, then its approval once both are attached; `vouched_without_exception` is never derived: it is set by hand once the transaction is approved, and is the final status while the transaction keeps an invoice (a document change leaving it none drops it to `pending_invoice`). `document_issue` is raised by itself when the AI confidence is under 60% or an attached document has no type, on a transaction whose approval is pending with nothing hand-set or that waits on further documents, and only a reviewer ends it. Outside an admin-portal session it comes as the client-facing name: `in_review` for `pending_approval`, `document_issue` and `approved`, and `vouched` for `vouched_without_exception` and `exception_noted`.","allOf":[{"$ref":"#/components/schemas/VouchingTransactionStatus"}]},"documentIssue":{"description":"Why the transaction is in Document issue, as its documents read now; null in any other status.","anyOf":[{"$ref":"#/components/schemas/VouchingDocumentIssueEntity"},{"type":"null"}]},"furtherDocumentsNote":{"type":["string","null"],"description":"What the reviewer said is missing when further documents were requested; null when there is none. It moves to the history once the status leaves Further documents required."},"isMisstatement":{"type":["boolean","null"],"description":"Whether the CPA workbook’s examination is \"Exception noted\". It is independent of the `exception_noted` status: Addendum A counts a transaction with either, once. Null outside the admin portal."},"invoiceCount":{"type":"number","description":"Documents attached to this transaction and classified as invoices — which includes agreements."},"paymentCount":{"type":"number","description":"Documents attached to this transaction and classified as evidence of payment."},"newInvoiceCount":{"type":"number","description":"The attached invoices that are new (see the file’s `isNew`); the row’s green dot on the invoice count. Always 0 for anyone but DECA staff."},"newPaymentCount":{"type":"number","description":"The attached evidence of payment that is new (see the file’s `isNew`); the row’s green dot on the payment count. Always 0 for anyone but DECA staff."},"newOtherCount":{"type":"number","description":"The attached other documents that are new (see the file’s `isNew`); the row’s green dot on the other count. Always 0 for anyone but DECA staff."},"otherCount":{"type":"number","description":"Everything else attached to this transaction: documents decided to be `other`, and documents with no type yet. Unclassified documents are shown here without being treated as classified — the Other Docs tab is a place to look at them, not an answer about them."},"invoiceTotal":{"type":"number","description":"Total invoiced according to the invoice documents attached to this transaction: the sum of their `attributedShare`."},"paymentEvidenceTotal":{"type":"number","description":"Total supported by evidence of payment: the sum of the payment documents’ `attributedShare` for this transaction."},"isCompleted":{"type":"boolean","description":"Whether the amount supported by evidence of payment equals the Selected Sample amount. False covers both too little and too much evidence, which is what the Not Completed filter returns. It never reads DECA’s decision, so every viewer gets it: it follows from `paymentCount`, `paymentEvidenceTotal` (highlighted payment amounts included) and `claimedAmount`, all in the payload."},"noteCount":{"type":"number","description":"The note threads on this transaction the viewer can read: internal and client ones in an admin-portal session, client ones outside one."},"clientNoteCount":{"type":"number","description":"The client note threads on this transaction."}},"required":["id","categoryKey","supplier","claimedAmount","number","glAccount","description","date","dateLabel","eligibleExpenses","confidenceScore","matches","match","approvalStatus","status","documentIssue","furtherDocumentsNote","isMisstatement","invoiceCount","paymentCount","newInvoiceCount","newPaymentCount","newOtherCount","otherCount","invoiceTotal","paymentEvidenceTotal","isCompleted","noteCount","clientNoteCount"]},"VouchingCategoryDto":{"type":"object","properties":{"key":{"allOf":[{"$ref":"#/components/schemas/RndAupExpenseCategory"}]},"eligibleTotal":{"type":"number","description":"Total Selected Sample amount of this category’s transactions — the left-hand figure in the header’s amount pair."},"evidenceTotal":{"type":"number","description":"Total evidence of payment supporting this category, apportioned: a payment document that supports several transactions contributes each of them only its own `attributedShare`, so this figure and the transactions beneath it are read against each other. Invoice amounts — including one quoted on a payment with no paid amount read — and other documents do not contribute."},"approvedTransactionCount":{"type":"number","description":"Transactions whose `approvalStatus` is `approved`, as the viewer gets it: outside an admin-portal session, the vouched ones."},"vouchedTransactionCount":{"type":"number","description":"Transactions in Vouched without exception (outside the admin portal also Exception noted, as both read Vouched there): the \"Y vouched\" of the category head."},"transactionCount":{"type":"number"},"misstatementTransactionCount":{"type":["number","null"],"description":"Transactions of this category marked as a misstatement. Null outside the admin portal."},"uploadedFileCount":{"type":"number","description":"Distinct documents linked to this category across every type. A document linked to several transactions in the category is counted once."},"newDocumentCount":{"type":"number","description":"Of those, the documents a client uploaded that no DECA admin has seen yet: the head’s \"Z new documents\". Always 0 for anyone but DECA staff."},"isFullyEvidenced":{"type":"boolean","description":"Whether every transaction in this category is supported by evidence of payment matching its own amount. Not the two totals agreeing: one payment document spread across some of the transactions can make them agree while others have nothing behind them."},"invoiceDocumentCount":{"type":"number","description":"Distinct invoice documents linked to this category."},"paymentDocumentCount":{"type":"number","description":"Distinct evidence-of-payment documents linked to this category."},"otherDocumentCount":{"type":"number","description":"Distinct documents linked to this category that are `other` or not yet classified."},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/VouchingTransactionEntity"}}},"required":["key","eligibleTotal","evidenceTotal","approvedTransactionCount","vouchedTransactionCount","transactionCount","misstatementTransactionCount","uploadedFileCount","newDocumentCount","isFullyEvidenced","invoiceDocumentCount","paymentDocumentCount","otherDocumentCount","transactions"]},"VouchingUploadedFileEntity":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"previewContentType":{"type":["string","null"],"description":"The type the preview serves the file under, e.g. `application/pdf` or `image/png`, taken from the stored type or, when that is missing or generic, the file’s extension. Null when the file downloads instead of opening in place: its type is not one shown inline, it has no stored copy, or the pipeline refused it as `unsupported_type`. While `isProcessing` it reflects the type declared at upload, not yet checked."},"size":{"type":"number"},"url":{"type":"string"},"type":{"description":"What the document is. Null means it has not been classified — by the AI or by hand — and the document is shown as unresolved. `other` is a decided answer and is not the same as null.","anyOf":[{"$ref":"#/components/schemas/IngestedDocumentType"},{"type":"null"}]},"invoiceAmount":{"type":["number","null"],"description":"The invoice total read out of the document, or null when it carries none. This is what invoice totals are built from, and only for a document typed `invoice`; a transaction with lines highlighted on the document takes their total instead (see `attributedShare`)."},"paymentAmount":{"type":["number","null"],"description":"The amount paid according to the document, or null when it carries none. This is what evidence-of-payment totals are built from, and only for a document typed `payment`; a transaction with lines highlighted on the document takes their total instead (see `attributedShare`). A payment with no paid amount read contributes only its highlighted lines and the lines the classifier priced for its links; its invoice amount never stands in."},"documentDate":{"type":["string","null"],"format":"date","description":"The calendar day the document carries, as `YYYY-MM-DD`. Null when none was found."},"documentNumber":{"type":["string","null"],"description":"The identifier the document carries: the payment reference for a payment and the invoice number for anything else, each falling back to the other when the document carries only one. Null when it carries neither — which is why a record falls back to its file name."},"paymentType":{"type":["string","null"],"description":"How the payment was made, e.g. \"ACH\", \"Wire\", \"Check #1234\", as read off the document whatever its type. Null when none was found."},"documentDescription":{"type":["string","null"],"description":"What the invoice was for, as read off the document."},"linkedTransactionIds":{"description":"Every Selected Sample transaction this document supports, across the whole application, regardless of the table’s filters.","type":"array","items":{"type":"string"}},"isNew":{"type":"boolean","description":"A client uploaded the document and no DECA admin has seen it yet: opening its preview or Mark as seen clears it. Always false for anyone but DECA staff."},"uploadedAt":{"type":"string","format":"date-time","description":"When the document was uploaded."},"isProcessing":{"type":"boolean","description":"Whether the upload pipeline is still reading this document. Until it finishes the document is neither attachable nor unresolved."},"hasStoredFile":{"type":"boolean","description":"False when no object was stored for the file (an archive entry the pipeline blocked) or the stored object went missing. A placeholder still being uploaded reads true."},"issue":{"description":"Why this file needs attention, as a bucket the client renders its own copy for. Where the pipeline has something more specific to say, that is in `detail`.","anyOf":[{"$ref":"#/components/schemas/IngestedDocumentIssue"},{"type":"null"}]},"detail":{"type":["string","null"],"description":"What the pipeline can say about this file beyond its `issue`, written for the client. Prefer it over the issue's own copy when present; null when there is nothing to add."},"isAttachable":{"type":"boolean","description":"Whether this file may be attached to a target. False while the document is still processing, and for good when the system could not read it — then the only actions left are Delete and Re-upload, and allocation rejects it."}},"required":["id","fileName","previewContentType","size","url","type","invoiceAmount","paymentAmount","documentDate","documentNumber","paymentType","documentDescription","linkedTransactionIds","isNew","uploadedAt","isProcessing","hasStoredFile","issue","detail","isAttachable"]},"VouchingKpiSummaryDto":{"type":"object","properties":{"filesAllocated":{"type":"number"},"filesAllocatable":{"type":"number","description":"Files that may be allocated, and so the denominator allocation is measured against. Unreadable ones are counted by `filesSkipped` instead — carrying them here would ask the user to allocate files that can never be allocated."},"filesSkipped":{"type":"number","description":"Uploaded files the system could not read (encrypted, damaged, oversized, unsupported). They still appear in the file list, flagged, so the user can replace them."},"transactionsConfirmed":{"type":"number","description":"Transactions whose `approvalStatus` is `approved`, as the viewer gets it: outside an admin-portal session, the vouched ones."},"transactionsUnconfirmed":{"type":"number","description":"The transactions `transactionsConfirmed` leaves out."}},"required":["filesAllocated","filesAllocatable","filesSkipped","transactionsConfirmed","transactionsUnconfirmed"]},"VouchingDataDto":{"type":"object","properties":{"processing":{"description":"Progress of the in-flight upload, or null when nothing is running.","anyOf":[{"$ref":"#/components/schemas/BulkUploadBatchEntity"},{"type":"null"}]},"categories":{"type":"array","items":{"$ref":"#/components/schemas/VouchingCategoryDto"}},"uploadedFiles":{"type":"array","items":{"$ref":"#/components/schemas/VouchingUploadedFileEntity"}},"kpi":{"$ref":"#/components/schemas/VouchingKpiSummaryDto"},"hasUploadedDocs":{"type":"boolean"}},"required":["processing","categories","uploadedFiles","kpi","hasUploadedDocs"]},"VouchingProcessingStatusDto":{"type":"object","properties":{"processing":{"description":"Progress of the in-flight upload, or null when nothing is running.","anyOf":[{"$ref":"#/components/schemas/BulkUploadBatchEntity"},{"type":"null"}]}},"required":["processing"]},"VouchingDocumentTypeFilter":{"type":"string","enum":["invoice","payment","other","untyped"]},"VouchingDocumentLinkedFilter":{"type":"string","enum":["all","linked","unlinked"]},"VouchingDocumentShowFilter":{"type":"string","enum":["all","new","needs_attention"]},"VouchingDocumentTransactionRefEntity":{"type":"object","properties":{"id":{"type":"string"},"categoryKey":{"allOf":[{"$ref":"#/components/schemas/RndAupExpenseCategory"}]},"supplier":{"type":["string","null"]},"number":{"type":["string","null"]}},"required":["id","categoryKey","supplier","number"]},"VouchingDocumentEntity":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"previewContentType":{"type":["string","null"],"description":"The type the preview serves the file under, e.g. `application/pdf` or `image/png`, taken from the stored type or, when that is missing or generic, the file’s extension. Null when the file downloads instead of opening in place: its type is not one shown inline, it has no stored copy, or the pipeline refused it as `unsupported_type`. While `isProcessing` it reflects the type declared at upload, not yet checked."},"size":{"type":"number"},"url":{"type":"string"},"type":{"description":"What the document is. Null means it has not been classified — by the AI or by hand — and the document is shown as unresolved. `other` is a decided answer and is not the same as null.","anyOf":[{"$ref":"#/components/schemas/IngestedDocumentType"},{"type":"null"}]},"invoiceAmount":{"type":["number","null"],"description":"The invoice total read out of the document, or null when it carries none. This is what invoice totals are built from, and only for a document typed `invoice`; a transaction with lines highlighted on the document takes their total instead (see `attributedShare`)."},"paymentAmount":{"type":["number","null"],"description":"The amount paid according to the document, or null when it carries none. This is what evidence-of-payment totals are built from, and only for a document typed `payment`; a transaction with lines highlighted on the document takes their total instead (see `attributedShare`). A payment with no paid amount read contributes only its highlighted lines and the lines the classifier priced for its links; its invoice amount never stands in."},"documentDate":{"type":["string","null"],"format":"date","description":"The calendar day the document carries, as `YYYY-MM-DD`. Null when none was found."},"documentNumber":{"type":["string","null"],"description":"The identifier the document carries: the payment reference for a payment and the invoice number for anything else, each falling back to the other when the document carries only one. Null when it carries neither — which is why a record falls back to its file name."},"paymentType":{"type":["string","null"],"description":"How the payment was made, e.g. \"ACH\", \"Wire\", \"Check #1234\", as read off the document whatever its type. Null when none was found."},"documentDescription":{"type":["string","null"],"description":"What the invoice was for, as read off the document."},"linkedTransactionIds":{"description":"Every Selected Sample transaction this document supports, across the whole application, regardless of the table’s filters.","type":"array","items":{"type":"string"}},"isNew":{"type":"boolean","description":"A client uploaded the document and no DECA admin has seen it yet: opening its preview or Mark as seen clears it. Always false for anyone but DECA staff."},"uploadedAt":{"type":"string","format":"date-time","description":"When the document was uploaded."},"isProcessing":{"type":"boolean","description":"Whether the upload pipeline is still reading this document. Until it finishes the document is neither attachable nor unresolved."},"hasStoredFile":{"type":"boolean","description":"False when no object was stored for the file (an archive entry the pipeline blocked) or the stored object went missing. A placeholder still being uploaded reads true."},"issue":{"description":"Why this file needs attention, as a bucket the client renders its own copy for. Where the pipeline has something more specific to say, that is in `detail`.","anyOf":[{"$ref":"#/components/schemas/IngestedDocumentIssue"},{"type":"null"}]},"detail":{"type":["string","null"],"description":"What the pipeline can say about this file beyond its `issue`, written for the client. Prefer it over the issue's own copy when present; null when there is nothing to add."},"isAttachable":{"type":"boolean","description":"Whether this file may be attached to a target. False while the document is still processing, and for good when the system could not read it — then the only actions left are Delete and Re-upload, and allocation rejects it."},"archivePath":{"type":["string","null"],"description":"Path the file arrived under inside an uploaded archive or folder, or null when it was uploaded on its own. Searched alongside the name."},"categories":{"type":"array","description":"Categories this document supports, derived from the transactions it is linked to. Each appears once.","items":{"$ref":"#/components/schemas/RndAupExpenseCategory"}},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/VouchingDocumentTransactionRefEntity"}},"isAccepted":{"type":"boolean","description":"Whether the pipeline took this file in as a document — its bytes landed and its type is one this context reads. A file it skipped is not part of the set: nothing is asked of it, and it cannot be classified. One it took in and could not read still can be, even though it can never be attached to a transaction."},"isUnresolved":{"type":"boolean","description":"Whether the document still needs a person: it has no type, or it supports no transaction. False for a file that was skipped (see isAccepted) or is still processing. Resolving one of the two leaves this true while the other stands."},"openCommentCount":{"type":"number","description":"Area comment threads on the document not resolved yet. Always 0 for anyone but DECA staff."}},"required":["id","fileName","previewContentType","size","url","type","invoiceAmount","paymentAmount","documentDate","documentNumber","paymentType","documentDescription","linkedTransactionIds","isNew","uploadedAt","isProcessing","hasStoredFile","issue","detail","isAttachable","archivePath","categories","transactions","isAccepted","isUnresolved","openCommentCount"]},"VouchingDocumentsResponseDto":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/VouchingDocumentEntity"}},"unresolvedCount":{"type":"number","description":"Documents in this application that still need a person — the rule each row serves as `isUnresolved`. Counted across the whole collection, not just this page, so the sidebar can say how much is left while a filter is applied."},"newCount":{"type":"number","description":"New documents in this application (a client upload no DECA admin has seen), across the whole collection, for Mark all as seen. Always 0 for anyone but DECA staff."},"listedAt":{"type":"string","format":"date-time","description":"When the list was read, just before its counts: Mark all as seen sends it back, so it clears only what `newCount` could count."}},"required":["meta","data","unresolvedCount","newCount","listedAt"]},"InitVouchingUploadDto":{"type":"object","properties":{"files":{"description":"Declared files. Any `.zip` in the selection is expanded server-side; anything else is treated as a loose file.","type":"array","items":{"$ref":"#/components/schemas/InitUploadFileDto"}},"category":{"description":"The category this upload was started from, retained as processing context: its documents are matched against that category’s transactions rather than every transaction in the application. Omit for an upload started at the top of the page.","allOf":[{"$ref":"#/components/schemas/RndAupExpenseCategory"}]},"replacesDocumentId":{"type":"string","format":"uuid","description":"A document of this application the upload replaces, with exactly one file, never an archive. The replacement is never skipped as a duplicate of it. The original is removed, with its links, once the replacement finishes processing and can be attached (not skipped as unreadable, unsupported or already uploaded, and not a document the classifier failed on for good; a temporary classification failure still replaces it). Each transaction losing the document is un-approved and loses its hand-set status first. Document issue, Exception noted and Vouched without exception stay, and a Vouched without exception transaction keeps its approval, unless the document is its only invoice: then it drops back to Pending invoice, its approval with it. A replace that is cancelled, abandoned or fails before processing leaves the original untouched. Refused while the original is still processing, and with 409 while another upload is already replacing it."}},"required":["files"]},"DuplicateCandidateFileDto":{"type":"object","properties":{"name":{"type":"string","description":"File name only, never a path."},"size":{"type":"number"}},"required":["name","size"]},"FindDuplicateDocumentsDto":{"type":"object","properties":{"files":{"maxItems":1000,"type":"array","items":{"$ref":"#/components/schemas/DuplicateCandidateFileDto"}}},"required":["files"]},"VouchingDuplicateDocumentDto":{"type":"object","properties":{"fileName":{"type":"string","description":"The file asked about."},"fileSize":{"type":"number"},"documentId":{"type":"string","format":"uuid","description":"The document of the organization it duplicates."},"orgProductId":{"type":"string","format":"uuid","description":"The application that document belongs to."},"isInThisApplication":{"type":"boolean","description":"Whether that application is the one the upload is for."},"applicationLabel":{"type":"string","description":"How that application is named, as the portals name it, e.g. \"Puerto Rico R&D Tax Credits (2024)\"."}},"required":["fileName","fileSize","documentId","orgProductId","isInThisApplication","applicationLabel"]},"VouchingDuplicatesDto":{"type":"object","properties":{"duplicates":{"description":"One entry per file asked about that duplicates a document: this application’s document when one matches, else the earliest uploaded of the others. Files with no match are left out.","type":"array","items":{"$ref":"#/components/schemas/VouchingDuplicateDocumentDto"}}},"required":["duplicates"]},"CreateTransactionDto":{"type":"object","properties":{"categoryKey":{"description":"The expense category this transaction belongs to.","allOf":[{"$ref":"#/components/schemas/RndAupExpenseCategory"}]},"amount":{"type":"number","minimum":0,"description":"The Selected Sample amount, in dollars."},"supplier":{"type":"string","description":"Supplier or payee name."},"number":{"type":"string","description":"Transaction number."},"description":{"type":"string","maxLength":2000,"description":"Transaction description."},"glAccount":{"type":"string","description":"GL account / split."},"date":{"type":"string","format":"date","description":"Transaction date, as a calendar date (YYYY-MM-DD)."}},"required":["categoryKey","amount"]},"UpdateTransactionDto":{"type":"object","properties":{"supplier":{"type":"string","description":"Supplier or payee name."},"number":{"type":"string","description":"Transaction number."},"description":{"type":"string","maxLength":2000,"description":"Transaction description."},"glAccount":{"type":"string","description":"GL account / split."},"categoryKey":{"description":"Moves the transaction to another category. Its documents move with it, since they are attached to the transaction rather than to the category.","allOf":[{"$ref":"#/components/schemas/RndAupExpenseCategory"}]},"amount":{"type":"number","minimum":0},"date":{"type":"string","format":"date"}}},"RndAupRowVouchingStatus":{"type":"string","enum":["pending_invoice","pending_payment","pending_approval","document_issue","further_documents_required","approved","vouched_without_exception","exception_noted"],"description":"The status to show for this transaction, overriding the one derived from its documents. `approved` needs a supporting document and no open `document_issue`, like an approval; `vouched_without_exception` needs the transaction approved first. Cleared when an approval decision or a request for further documents is recorded on the transaction, when its amount or category is edited, and when a document is linked to it, detached from it, moved onto or off it, retyped, re-checked, replaced or deleted. A classification pass that only removes one of its links leaves it. `document_issue`, `exception_noted` and `vouched_without_exception` are otherwise never cleared by a document action, and an approval decision keeps the first two, and Vouched while the transaction stays approved: only a reviewer picking another status or a request for further documents ends them, and taking the approval back also ends Vouched. The one document action that ends Vouched: one that leaves the transaction with no invoice (a detach, move, retype to anything but an invoice, delete, replace, re-check, or the pipeline discarding a copy) drops it back to `pending_invoice`, its approval with it."},"SetTransactionStatusDto":{"type":"object","properties":{"status":{"description":"The status to show for this transaction, overriding the one derived from its documents. `approved` needs a supporting document and no open `document_issue`, like an approval; `vouched_without_exception` needs the transaction approved first. Cleared when an approval decision or a request for further documents is recorded on the transaction, when its amount or category is edited, and when a document is linked to it, detached from it, moved onto or off it, retyped, re-checked, replaced or deleted. A classification pass that only removes one of its links leaves it. `document_issue`, `exception_noted` and `vouched_without_exception` are otherwise never cleared by a document action, and an approval decision keeps the first two, and Vouched while the transaction stays approved: only a reviewer picking another status or a request for further documents ends them, and taking the approval back also ends Vouched. The one document action that ends Vouched: one that leaves the transaction with no invoice (a detach, move, retype to anything but an invoice, delete, replace, re-check, or the pipeline discarding a copy) drops it back to `pending_invoice`, its approval with it.","allOf":[{"$ref":"#/components/schemas/RndAupRowVouchingStatus"}]}},"required":["status"]},"SetTransactionsStatusDto":{"type":"object","properties":{"status":{"description":"The status to show for this transaction, overriding the one derived from its documents. `approved` needs a supporting document and no open `document_issue`, like an approval; `vouched_without_exception` needs the transaction approved first. Cleared when an approval decision or a request for further documents is recorded on the transaction, when its amount or category is edited, and when a document is linked to it, detached from it, moved onto or off it, retyped, re-checked, replaced or deleted. A classification pass that only removes one of its links leaves it. `document_issue`, `exception_noted` and `vouched_without_exception` are otherwise never cleared by a document action, and an approval decision keeps the first two, and Vouched while the transaction stays approved: only a reviewer picking another status or a request for further documents ends them, and taking the approval back also ends Vouched. The one document action that ends Vouched: one that leaves the transaction with no invoice (a detach, move, retype to anything but an invoice, delete, replace, re-check, or the pipeline discarding a copy) drops it back to `pending_invoice`, its approval with it.","allOf":[{"$ref":"#/components/schemas/RndAupRowVouchingStatus"}]},"transactionIds":{"maxItems":500,"type":"array","items":{"type":"string","format":"uuid"}}},"required":["status","transactionIds"]},"SkippedTransactionDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"label":{"type":"string","description":"How the transaction is named to the user: supplier, number and amount."},"reason":{"type":"string"}},"required":["id","label","reason"]},"SetTransactionsStatusResultDto":{"type":"object","properties":{"updatedCount":{"type":"number"},"skipped":{"type":"array","items":{"$ref":"#/components/schemas/SkippedTransactionDto"}}},"required":["updatedCount","skipped"]},"SetMisstatementDto":{"type":"object","properties":{"marked":{"type":"boolean","description":"True marks as a misstatement — the CPA workbook’s \"Exception noted\" examination; false clears the mark, restoring the examination it replaced (blank when there was none)."}},"required":["marked"]},"ApproveTransactionDto":{"type":"object","properties":{"approved":{"type":"boolean","description":"Explicit target state. When omitted, approval is toggled between approved and pending."}}},"FurtherDocumentsRequestDto":{"type":"object","properties":{"transactionIds":{"maxItems":10000,"description":"The transactions to ask for, a whole sample at most; an id named twice counts once.","type":"array","items":{"type":"string","format":"uuid"}},"reviewerNote":{"type":["string","null"],"maxLength":1000,"description":"What is still missing, for the client: emailed with the request and saved on each transaction. Blank means none, and clears an earlier note."}},"required":["transactionIds"]},"MarkDocumentsSeenDto":{"type":"object","properties":{"documentIds":{"maxItems":1000,"description":"The documents to mark as seen; left out, every new document of the AUP (Mark all as seen).","type":["array","null"],"items":{"type":"string","format":"uuid"}},"listedAt":{"type":"string","format":"date-time","description":"The list's `listedAt`: leaves out the documents uploaded after this instant, so an upload that arrived after the list was read stays new."}}},"AllocateFileDto":{"type":"object","properties":{"transactionIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["transactionIds"]},"SetDocumentTypeDto":{"type":"object","properties":{"type":{"description":"What the document is. `other` is a decided type, distinct from having no type yet; this route cannot clear a type.","allOf":[{"$ref":"#/components/schemas/IngestedDocumentType"}]}},"required":["type"]},"RenameVouchingDocumentDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"description":"The new name: the document keeps its extension, which a name typed with it (or a spelling of the same kind, `.jpg` for `.jpeg`) does not repeat. Trimmed; a path separator is refused, and so is a name that is too long once the extension is added. A name that is only the extension keeps the document’s name."}},"required":["name"]},"MoveFileDto":{"type":"object","properties":{"fromTransactionId":{"type":"string","format":"uuid","description":"The transaction the document is currently attached to."},"toTransactionId":{"type":"string","format":"uuid","description":"The transaction the document should be attached to instead."}},"required":["fromTransactionId","toTransactionId"]},"VouchingNoteEntity":{"type":"object","properties":{"id":{"type":"string"},"createdById":{"type":["string","null"]},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/NoteAuthorEntity"},{"type":"null"}]},"content":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"title":{"type":["string","null"]},"source":{"type":["string","null"],"enum":["scribe",null]},"meetingDate":{"format":"date-time","type":["string","null"]},"participants":{"type":"array","items":{"type":"string"}},"replyCount":{"type":"number"},"lastReplyAt":{"format":"date-time","type":["string","null"]},"lastRepliers":{"type":"array","items":{"$ref":"#/components/schemas/NoteAuthorEntity"}},"hasUnread":{"type":"boolean"},"transactionId":{"type":"string"},"visibility":{"description":"Which of the transaction’s two threads this note belongs to. The threads are separate conversations, not one list filtered two ways.","allOf":[{"$ref":"#/components/schemas/NoteVisibility"}]}},"required":["id","createdById","createdBy","content","createdAt","updatedAt","title","source","meetingDate","participants","replyCount","lastReplyAt","lastRepliers","hasUnread","transactionId","visibility"]},"VouchingNotesResponseDto":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/VouchingNoteEntity"}}},"required":["meta","data"]},"CreateVouchingNoteDto":{"type":"object","properties":{"content":{"type":"string","maxLength":50000,"description":"Sanitised rich text: at most 5000 characters of visible text — markup does not count — and 50000 of HTML."},"visibility":{"description":"Which thread to act on. `internal` is staff-only commentary; `client` is the client-facing staff thread.","allOf":[{"$ref":"#/components/schemas/NoteVisibility"}]}},"required":["content","visibility"]},"RndAupVouchingHighlightType":{"type":"string","enum":["invoice_amount","payment_amount","invoice_number"]},"VouchingHighlightEntity":{"type":"object","properties":{"id":{"type":"string"},"transaction":{"description":"The transaction the line is highlighted for. Its category is the transaction’s current one.","allOf":[{"$ref":"#/components/schemas/VouchingDocumentTransactionRefEntity"}]},"page":{"type":"number","description":"The page the line is on, from 1; an image is page 1."},"x":{"type":"number","description":"The box’s left edge, as a fraction (0–1) of the page’s width. The box is measured from the page’s top-left corner, so zoom never moves it."},"y":{"type":"number","description":"The box’s top edge, as a fraction (0–1) of the page’s height."},"width":{"type":"number","description":"The box’s width, as a fraction of the page’s width."},"height":{"type":"number","description":"The box’s height, as a fraction of the page’s height."},"type":{"allOf":[{"$ref":"#/components/schemas/RndAupVouchingHighlightType"}]},"amount":{"type":["number","null"],"description":"The line’s amount; null on an invoice number line. While the document is linked to the transaction, the total of its amount lines is the document’s share for it (`attributedShare`)."},"documentNumber":{"type":["string","null"],"description":"The invoice number of an invoice number line; null otherwise."},"description":{"type":["string","null"]}},"required":["id","transaction","page","x","y","width","height","type","amount","documentNumber","description"]},"CreateVouchingHighlightDto":{"type":"object","properties":{"page":{"type":"number","minimum":1,"maximum":2147483647,"description":"The page the box is on, from 1. An image has one page."},"x":{"type":"number","minimum":0,"maximum":1,"description":"The box’s left edge, as a fraction of the page’s width."},"y":{"type":"number","minimum":0,"maximum":1,"description":"The box’s top edge, as a fraction of the page’s height."},"width":{"type":"number","exclusiveMinimum":0,"maximum":1,"description":"The box’s width, as a fraction of the page’s width. `x + width` may not pass the page’s right edge."},"height":{"type":"number","exclusiveMinimum":0,"maximum":1,"description":"The box’s height, as a fraction of the page’s height. `y + height` may not pass the page’s bottom edge."},"transactionId":{"type":"string","format":"uuid","description":"The transaction the line is highlighted for. The document has to be linked to it."},"type":{"description":"What the line is. Left out, it follows the document's type: an invoice's line is an invoice amount, a payment's a payment amount.","allOf":[{"$ref":"#/components/schemas/RndAupVouchingHighlightType"}]},"amount":{"type":"number","exclusiveMinimum":0,"description":"The amount on the line, in dollars. Required on an amount line; an invoice number line has none."},"documentNumber":{"type":"string","maxLength":255,"description":"The invoice number as the document prints it, typed by hand when it cannot be read. Required on an invoice number line, and only there."},"description":{"type":"string","maxLength":255,"description":"What the line is for. A blank one is stored as none."}},"required":["page","x","y","width","height","transactionId"]},"CreateVouchingHighlightsDto":{"type":"object","properties":{"lines":{"minItems":1,"maxItems":200,"description":"The selected lines, saved together or not at all.","type":"array","items":{"$ref":"#/components/schemas/CreateVouchingHighlightDto"}}},"required":["lines"]},"VouchingAreaCommentEntity":{"type":"object","properties":{"id":{"type":"string"},"createdById":{"type":["string","null"]},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/NoteAuthorEntity"},{"type":"null"}]},"content":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"replyCount":{"type":"number"},"lastReplyAt":{"format":"date-time","type":["string","null"]},"lastRepliers":{"type":"array","items":{"$ref":"#/components/schemas/NoteAuthorEntity"}},"commentId":{"type":"string","format":"uuid","description":"The area comment; `id` is its thread’s root note."},"documentId":{"type":"string","format":"uuid"},"page":{"type":"number","description":"The page, from 1; an image is page 1."},"x":{"type":"number","description":"The area’s left edge, as a fraction (0–1) of the page’s width. The area is measured from the page’s top-left corner, so zoom never moves it."},"y":{"type":"number","description":"The area’s top edge, as a fraction (0–1) of the page’s height."},"width":{"type":"number","description":"The area’s width, as a fraction of the page’s width."},"height":{"type":"number","description":"The area’s height, as a fraction of the page’s height."},"quote":{"type":["string","null"],"description":"The text selected to anchor the comment; `null` for a drawn box."},"resolvedAt":{"format":"date-time","type":["string","null"]},"resolvedBy":{"anyOf":[{"$ref":"#/components/schemas/NoteAuthorEntity"},{"type":"null"}]}},"required":["id","createdById","createdBy","content","createdAt","updatedAt","replyCount","lastReplyAt","lastRepliers","commentId","documentId","page","x","y","width","height","quote","resolvedAt","resolvedBy"]},"CreateVouchingAreaCommentDto":{"type":"object","properties":{"content":{"type":"string","maxLength":50000,"description":"Sanitised rich text: at most 5000 characters of visible text — markup does not count — and 50000 of HTML."},"page":{"type":"number","minimum":1,"maximum":2147483647,"description":"The page the box is on, from 1. An image has one page."},"x":{"type":"number","minimum":0,"maximum":1,"description":"The box’s left edge, as a fraction of the page’s width."},"y":{"type":"number","minimum":0,"maximum":1,"description":"The box’s top edge, as a fraction of the page’s height."},"width":{"type":"number","exclusiveMinimum":0,"maximum":1,"description":"The box’s width, as a fraction of the page’s width. `x + width` may not pass the page’s right edge."},"height":{"type":"number","exclusiveMinimum":0,"maximum":1,"description":"The box’s height, as a fraction of the page’s height. `y + height` may not pass the page’s bottom edge."},"quote":{"type":["string","null"],"maxLength":1000,"description":"The text selected to anchor the comment; left out for a drawn box."}},"required":["content","page","x","y","width","height"]},"SetVouchingAreaCommentResolvedDto":{"type":"object","properties":{"isResolved":{"type":"boolean","description":"`true` resolves the thread, `false` reopens it."}},"required":["isResolved"]},"CreateNoteDto":{"type":"object","properties":{"content":{"type":"string","maxLength":50000,"description":"Sanitised rich text: at most 5000 characters of visible text — markup does not count — and 50000 of HTML."}},"required":["content"]},"RndFormStepKey":{"type":"string","enum":["businessProfile","taxInformation","companyOperations","contactInfo","personnel","additionalInfo","projects","documentSet","ledgers"]},"RndStepEventDto":{"type":"object","properties":{"stepKey":{"allOf":[{"$ref":"#/components/schemas/RndFormStepKey"}]}},"required":["stepKey"]},"RndStepStartResultDto":{"type":"object","properties":{"isFirstOpen":{"type":"boolean"},"orgHash":{"type":"string"}},"required":["isFirstOpen","orgHash"]},"RndStepCompleteEventDto":{"type":"object","properties":{"stepKey":{"allOf":[{"$ref":"#/components/schemas/RndFormStepKey"}]},"wasPrefilled":{"type":"boolean"}},"required":["stepKey","wasPrefilled"]},"RndStepCompleteResultDto":{"type":"object","properties":{"isFirstComplete":{"type":"boolean"},"durationMs":{"type":["number","null"]},"orgHash":{"type":"string"}},"required":["isFirstComplete","durationMs","orgHash"]},"RndMetricsOverviewDto":{"type":"object","properties":{"completionRate":{"type":["number","null"]},"dropOffRate":{"type":["number","null"]},"startedCount":{"type":"number"},"submittedCount":{"type":"number"},"averageDaysToSubmit":{"type":["number","null"]}},"required":["completionRate","dropOffRate","startedCount","submittedCount","averageDaysToSubmit"]},"ClarityStepMetricsDto":{"type":"object","properties":{"deadClickCount":{"type":"number"},"rageClickCount":{"type":"number"},"averageActiveTimeSeconds":{"type":["number","null"]}},"required":["deadClickCount","rageClickCount","averageActiveTimeSeconds"]},"RndStepMetricsDto":{"type":"object","properties":{"completionRate":{"type":["number","null"]},"dropOffRate":{"type":["number","null"]},"stepKey":{"allOf":[{"$ref":"#/components/schemas/RndFormStepKey"}]},"startedCount":{"type":"number"},"completedCount":{"type":"number"},"averageDurationMs":{"type":["number","null"]},"clarity":{"anyOf":[{"$ref":"#/components/schemas/ClarityStepMetricsDto"},{"type":"null"}]}},"required":["completionRate","dropOffRate","stepKey","startedCount","completedCount","averageDurationMs","clarity"]},"ClarityMetricsDto":{"type":"object","properties":{"deadClickCount":{"type":"number"},"rageClickCount":{"type":"number"},"averageActiveTimeSeconds":{"type":["number","null"]},"pageSessionCount":{"type":"number"},"quickbackClickCount":{"type":"number"},"excessiveScrollCount":{"type":"number"},"errorClickCount":{"type":"number"},"scriptErrorCount":{"type":"number"},"averageTotalTimeSeconds":{"type":["number","null"]}},"required":["deadClickCount","rageClickCount","averageActiveTimeSeconds","pageSessionCount","quickbackClickCount","excessiveScrollCount","errorClickCount","scriptErrorCount","averageTotalTimeSeconds"]},"ClarityQuotaDto":{"type":"object","properties":{"isConfigured":{"type":"boolean"},"manualLimit":{"type":"number"},"manualRemaining":{"type":"number"},"canRefresh":{"type":"boolean"},"refusalReason":{"type":["string","null"]},"resetsAt":{"format":"date-time","type":"string"},"lastSnapshotAt":{"format":"date-time","type":["string","null"]},"lastFailureReason":{"type":["string","null"]}},"required":["isConfigured","manualLimit","manualRemaining","canRefresh","refusalReason","resetsAt","lastSnapshotAt","lastFailureReason"]},"RndMetricsDto":{"type":"object","properties":{"overview":{"$ref":"#/components/schemas/RndMetricsOverviewDto"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/RndStepMetricsDto"}},"clarity":{"anyOf":[{"$ref":"#/components/schemas/ClarityMetricsDto"},{"type":"null"}]},"clarityQuota":{"$ref":"#/components/schemas/ClarityQuotaDto"}},"required":["overview","steps","clarity","clarityQuota"]},"RndProductMetricsRowDto":{"type":"object","properties":{"orgName":{"type":"string"},"productName":{"type":"string"},"year":{"type":["number","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"firstSubmittedAt":{"format":"date-time","type":["string","null"]},"lastSubmittedAt":{"format":"date-time","type":["string","null"]},"submissionsCount":{"type":"number"},"totalDays":{"type":["number","null"]}},"required":["orgName","productName","year","startedAt","firstSubmittedAt","lastSubmittedAt","submissionsCount","totalDays"]},"RndProductMetricsDto":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/RndProductMetricsRowDto"}},"isTruncated":{"type":"boolean"}},"required":["rows","isTruncated"]},"Act60RndAnswer":{"type":"string","enum":["yes","no","not_sure"]},"Act60ScreeningBusinessDto":{"type":"object","properties":{"legalBusinessName":{"type":"string","maxLength":255},"organizationType":{"allOf":[{"$ref":"#/components/schemas/OrganizationType"}]},"otherOrganizationType":{"type":"string","maxLength":255},"ein":{"type":"string","example":"66-1234567"},"businessDescription":{"type":"string","maxLength":1000},"industries":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndustry"}},"otherIndustryDescription":{"type":"string","maxLength":255},"decreeRequestType":{"type":"string","enum":["new","extension","renegotiation","successor"]},"primaryCategory":{"type":"string","enum":["manufacturing","export","tourism","private_equity","not_sure"]},"performsRnd":{"allOf":[{"$ref":"#/components/schemas/Act60RndAnswer"}]},"taxCreditsReceived":{"type":"array","description":"Optional. Leave empty with `hasReceivedNoTaxCredits` for \"No\".","items":{"$ref":"#/components/schemas/ProspectTaxCreditType"}},"hasReceivedNoTaxCredits":{"type":"boolean","description":"The answer \"No\"; excludes every tax credit."}},"required":["legalBusinessName","organizationType","ein","businessDescription","industries","decreeRequestType","primaryCategory","performsRnd"]},"Act60ScreeningHistoryDto":{"type":"object","properties":{"decreeStatus":{"allOf":[{"$ref":"#/components/schemas/ProspectDecreeStatus"}]},"decreeType":{"allOf":[{"$ref":"#/components/schemas/ProspectBusinessDecreeType"}]},"decreeNumber":{"type":"string","maxLength":255},"decreeSubmissionDate":{"type":"string","example":"2024-01-15","description":"Required when a decree was submitted (approved or not)."},"decreeApprovalDate":{"type":"string","example":"2024-03-01","description":"Required when the decree was approved."}},"required":["decreeStatus"]},"Act60ScreeningCustomerGeographyDto":{"type":"object","properties":{"puertoRicoPercentage":{"type":"number"},"mainlandUsPercentage":{"type":"number"},"internationalPercentage":{"type":"number"}},"required":["puertoRicoPercentage","mainlandUsPercentage","internationalPercentage"]},"Act60ScreeningManufacturingBranchDto":{"type":"object","properties":{"description":{"type":"string","maxLength":1000},"activities":{"type":"array","items":{"type":"string","enum":["physical_goods","pharma_biotech","software_digital","contract_rnd","recycling_sustainability","key_supplier","manufacturing_property","other"]}},"otherActivity":{"type":"string","maxLength":255}}},"Act60ScreeningExportBranchDto":{"type":"object","properties":{"activities":{"type":"array","items":{"type":"string","enum":["research_development","advertising_pr","consulting","business_industry_advisory","creative_industries","architecture_engineering_pm","professional_services","centralized_management_hq","electronic_data_processing","software_development","software_distribution_licensing","telecommunications","call_centers","shared_service_centers","education_training","healthcare_laboratory","investment_banking_financial","marketing_centers","export_trade","promoter_services","other"]}},"otherActivity":{"type":"string","maxLength":255}}},"Act60ScreeningTourismProjectType":{"type":"string","enum":["hotel_resort_lodging","theme_park_attraction","real_estate_leasing","sustainable_ecotourism","esports_fantasy","medical_tourism","other"]},"Act60ScreeningTourismBranchDto":{"type":"object","properties":{"inPr":{"type":"boolean"},"projectTypes":{"type":"array","items":{"$ref":"#/components/schemas/Act60ScreeningTourismProjectType"}},"projectTypeOther":{"type":"string","maxLength":255},"description":{"type":"string","maxLength":1000}}},"Act60ScreeningPrivateEquityBranchDto":{"type":"object","properties":{"fundInPr":{"type":"boolean"},"strategyDescription":{"type":"string","maxLength":1000}}},"Act60SubmitBusinessSummaryDto":{"type":"object","properties":{"business":{"$ref":"#/components/schemas/Act60ScreeningBusinessDto"},"history":{"$ref":"#/components/schemas/Act60ScreeningHistoryDto"},"customerGeography":{"$ref":"#/components/schemas/Act60ScreeningCustomerGeographyDto"},"manufacturing":{"$ref":"#/components/schemas/Act60ScreeningManufacturingBranchDto"},"export":{"$ref":"#/components/schemas/Act60ScreeningExportBranchDto"},"tourism":{"$ref":"#/components/schemas/Act60ScreeningTourismBranchDto"},"privateEquity":{"$ref":"#/components/schemas/Act60ScreeningPrivateEquityBranchDto"}},"required":["business","history","customerGeography"]},"Act60ScreeningLocationEntity":{"type":"object","properties":{"isRelocating":{"type":["boolean","null"]}},"required":["isRelocating"]},"Act60ScreeningHistoryEntity":{"type":"object","properties":{"decreeType":{"anyOf":[{"$ref":"#/components/schemas/ProspectBusinessDecreeType"},{"type":"null"}]},"decreeNumber":{"type":["string","null"]},"decreeSubmissionDate":{"format":"date-time","type":["string","null"]},"decreeApprovalDate":{"format":"date-time","type":["string","null"]},"decreeStatus":{"type":"string","enum":["issued_and_accepted","submitted_not_approved","none_filed"]}},"required":["decreeType","decreeNumber","decreeSubmissionDate","decreeApprovalDate","decreeStatus"]},"Act60ScreeningBusinessEntity":{"type":"object","properties":{"legalBusinessName":{"type":["string","null"]},"organizationType":{"type":"string","enum":["corporation","limited_liability_company","partnership","sole_proprietor","other"]},"otherOrganizationType":{"type":["string","null"]},"ein":{"type":["string","null"]},"industries":{"type":"array","items":{"type":"string","enum":["technology","finance","healthcare","manufacturing","retail","real_estate","energy","transportation","agriculture","construction","entertainment","hospitality","biotechnology","film","other"]}},"otherIndustryDescription":{"type":["string","null"]},"taxCreditsReceived":{"type":"array","items":{"type":"string","enum":["rnd","hospitality_tourism","film"]}},"hasReceivedNoTaxCredits":{"type":["boolean","null"]},"performsRnd":{"allOf":[{"$ref":"#/components/schemas/Act60RndAnswer"}]},"businessDescription":{"type":"string"},"primaryCategory":{"type":"string","enum":["manufacturing","export","tourism","private_equity","not_sure"]},"decreeRequestType":{"type":"string","enum":["new","extension","renegotiation","successor"]}},"required":["legalBusinessName","organizationType","otherOrganizationType","ein","industries","otherIndustryDescription","taxCreditsReceived","hasReceivedNoTaxCredits","performsRnd","businessDescription","primaryCategory","decreeRequestType"]},"Act60ScreeningCustomerGeographyEntity":{"type":"object","properties":{"puertoRicoPercentage":{"type":"number"},"mainlandUsPercentage":{"type":"number"},"internationalPercentage":{"type":"number"}},"required":["puertoRicoPercentage","mainlandUsPercentage","internationalPercentage"]},"Act60ScreeningManufacturingBranchEntity":{"type":"object","properties":{"description":{"type":["string","null"]},"activities":{"type":"array","items":{"type":"string","enum":["physical_goods","pharma_biotech","software_digital","contract_rnd","recycling_sustainability","key_supplier","manufacturing_property","other"]}},"otherActivity":{"type":["string","null"]}},"required":["description","activities","otherActivity"]},"Act60ScreeningExportBranchEntity":{"type":"object","properties":{"activities":{"type":"array","items":{"type":"string","enum":["research_development","advertising_pr","consulting","business_industry_advisory","creative_industries","architecture_engineering_pm","professional_services","centralized_management_hq","electronic_data_processing","software_development","software_distribution_licensing","telecommunications","call_centers","shared_service_centers","education_training","healthcare_laboratory","investment_banking_financial","marketing_centers","export_trade","promoter_services","other"]}},"otherActivity":{"type":["string","null"]}},"required":["activities","otherActivity"]},"Act60ScreeningTourismBranchEntity":{"type":"object","properties":{"inPr":{"type":["boolean","null"]},"projectTypes":{"type":"array","items":{"$ref":"#/components/schemas/Act60ScreeningTourismProjectType"}},"projectTypeOther":{"type":["string","null"]},"description":{"type":["string","null"]}},"required":["inPr","projectTypes","projectTypeOther","description"]},"Act60ScreeningPrivateEquityBranchEntity":{"type":"object","properties":{"fundInPr":{"type":["boolean","null"]},"strategyDescription":{"type":["string","null"]}},"required":["fundInPr","strategyDescription"]},"Act60BusinessSummaryDataEntity":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/Act60ScreeningLocationEntity"},"history":{"$ref":"#/components/schemas/Act60ScreeningHistoryEntity"},"business":{"$ref":"#/components/schemas/Act60ScreeningBusinessEntity"},"customerGeography":{"$ref":"#/components/schemas/Act60ScreeningCustomerGeographyEntity"},"manufacturing":{"anyOf":[{"$ref":"#/components/schemas/Act60ScreeningManufacturingBranchEntity"},{"type":"null"}]},"export":{"anyOf":[{"$ref":"#/components/schemas/Act60ScreeningExportBranchEntity"},{"type":"null"}]},"tourism":{"anyOf":[{"$ref":"#/components/schemas/Act60ScreeningTourismBranchEntity"},{"type":"null"}]},"privateEquity":{"anyOf":[{"$ref":"#/components/schemas/Act60ScreeningPrivateEquityBranchEntity"},{"type":"null"}]},"suggestedDecreeType":{"type":["string","null"],"enum":["manufacturing","tourism","export","private_equity","hard_to_recruit","young_entrepreneur",null]}},"required":["location","history","business","customerGeography","manufacturing","export","tourism","privateEquity","suggestedDecreeType"]},"Act60BusinessSummaryEntity":{"type":"object","properties":{"id":{"type":"string"},"orgProductId":{"type":"string"},"data":{"$ref":"#/components/schemas/Act60BusinessSummaryDataEntity"},"decreeType":{"type":["string","null"],"enum":["manufacturing","tourism","export","private_equity","hard_to_recruit","young_entrepreneur",null]},"decreeTypeSetAt":{"format":"date-time","type":["string","null"]},"decreeTypeSetById":{"type":["string","null"]},"submittedAt":{"format":"date-time","type":"string"},"submittedById":{"type":["string","null"]},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","orgProductId","data","decreeType","decreeTypeSetAt","decreeTypeSetById","submittedAt","submittedById","updatedAt"]},"Act60BusinessSummaryPrefillDto":{"type":"object","properties":{"decreeType":{"anyOf":[{"$ref":"#/components/schemas/ProspectBusinessDecreeType"},{"type":"null"}]},"decreeNumber":{"type":["string","null"]},"decreeSubmissionDate":{"format":"date-time","type":["string","null"]},"decreeApprovalDate":{"format":"date-time","type":["string","null"]},"legalBusinessName":{"type":["string","null"]},"organizationType":{"type":["string","null"],"enum":["corporation","limited_liability_company","partnership","sole_proprietor","other",null]},"otherOrganizationType":{"type":["string","null"]},"ein":{"type":["string","null"]},"businessDescription":{"type":["string","null"]},"industries":{"type":"array","items":{"type":"string","enum":["technology","finance","healthcare","manufacturing","retail","real_estate","energy","transportation","agriculture","construction","entertainment","hospitality","biotechnology","film","other"]}},"otherIndustryDescription":{"type":["string","null"]},"decreeStatus":{"type":["string","null"],"enum":["issued_and_accepted","submitted_not_approved","none_filed",null]},"taxCreditsReceived":{"type":"array","items":{"type":"string","enum":["rnd","hospitality_tourism","film"]}},"noTaxCreditsIssued":{"type":["boolean","null"]},"performsRnd":{"anyOf":[{"$ref":"#/components/schemas/Act60RndAnswer"},{"type":"null"}]}},"required":["decreeType","decreeNumber","decreeSubmissionDate","decreeApprovalDate","legalBusinessName","organizationType","otherOrganizationType","ein","businessDescription","industries","otherIndustryDescription","decreeStatus","taxCreditsReceived","noTaxCreditsIssued","performsRnd"]},"Act60BusinessSummaryDraftEntity":{"type":"object","properties":{"id":{"type":"string"},"orgProductId":{"type":"string"},"data":{"type":"object","additionalProperties":true},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","orgProductId","data","updatedAt"]},"Act60SaveBusinessSummaryDraftDto":{"type":"object","properties":{"data":{"type":"object","additionalProperties":true,"description":"The client's unsubmitted assessment answers, as the form holds them; never validated. Max 262144 bytes when serialized."}},"required":["data"]},"Act60UpdateBusinessSummaryDto":{"type":"object","properties":{"business":{"$ref":"#/components/schemas/Act60ScreeningBusinessDto"},"history":{"$ref":"#/components/schemas/Act60ScreeningHistoryDto"},"customerGeography":{"$ref":"#/components/schemas/Act60ScreeningCustomerGeographyDto"},"manufacturing":{"$ref":"#/components/schemas/Act60ScreeningManufacturingBranchDto"},"export":{"$ref":"#/components/schemas/Act60ScreeningExportBranchDto"},"tourism":{"$ref":"#/components/schemas/Act60ScreeningTourismBranchDto"},"privateEquity":{"$ref":"#/components/schemas/Act60ScreeningPrivateEquityBranchDto"}}},"Act60DecreeType":{"type":"string","enum":["manufacturing","tourism","export","private_equity","hard_to_recruit","young_entrepreneur"]},"Act60SetDecreeTypeDto":{"type":"object","properties":{"decreeType":{"allOf":[{"$ref":"#/components/schemas/Act60DecreeType"}]}},"required":["decreeType"]},"Act60IndividualLocationDto":{"type":"object","properties":{"isResidingInPr":{"type":"boolean"},"isRelocating":{"type":"boolean"},"relocationCountry":{"example":"US","description":"ISO 3166-1 alpha-2 country code. \"PR\" is its own entry.","allOf":[{"$ref":"#/components/schemas/CountryCode"}]},"relocationRegion":{"type":"string","maxLength":255}},"required":["isResidingInPr","isRelocating"]},"Act60IndividualHistoryDto":{"type":"object","properties":{"decreeStatus":{"allOf":[{"$ref":"#/components/schemas/ProspectDecreeStatus"}]},"decreeNumber":{"type":"string","maxLength":255}},"required":["decreeStatus"]},"Act60IndividualScreeningPath":{"type":"string","enum":["hard_to_recruit","young_entrepreneur","not_sure"]},"Act60IndividualAboutYouDto":{"type":"object","properties":{"screeningPath":{"allOf":[{"$ref":"#/components/schemas/Act60IndividualScreeningPath"}]}},"required":["screeningPath"]},"Act60IndividualHardToRecruitBranchDto":{"type":"object","properties":{"professionalField":{"type":"string","maxLength":255},"yearsOfExperience":{"type":"number","minimum":0,"maximum":100},"sponsoringBusinessName":{"type":"string","maxLength":255},"sponsoringDecreeNumber":{"type":"string","maxLength":255}}},"Act60IndividualYoungEntrepreneurBranchDto":{"type":"object","properties":{"dateOfBirth":{"format":"date-time","type":"string"},"businessDescription":{"type":"string","maxLength":1000},"projectedJobs":{"type":"number","minimum":0,"maximum":1000000}}},"Act60SubmitIndividualSummaryDto":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/Act60IndividualLocationDto"},"history":{"$ref":"#/components/schemas/Act60IndividualHistoryDto"},"aboutYou":{"$ref":"#/components/schemas/Act60IndividualAboutYouDto"},"hardToRecruit":{"$ref":"#/components/schemas/Act60IndividualHardToRecruitBranchDto"},"youngEntrepreneur":{"$ref":"#/components/schemas/Act60IndividualYoungEntrepreneurBranchDto"}},"required":["location","history","aboutYou"]},"Act60IndividualLocationEntity":{"type":"object","properties":{"isResidingInPr":{"type":"boolean"},"isRelocating":{"type":["boolean","null"]},"relocationCountry":{"type":["string","null"]},"relocationRegion":{"type":["string","null"]}},"required":["isResidingInPr","isRelocating","relocationCountry","relocationRegion"]},"Act60IndividualHistoryEntity":{"type":"object","properties":{"decreeStatus":{"allOf":[{"$ref":"#/components/schemas/ProspectDecreeStatus"}]},"decreeNumber":{"type":["string","null"]}},"required":["decreeStatus","decreeNumber"]},"Act60IndividualAboutYouEntity":{"type":"object","properties":{"screeningPath":{"allOf":[{"$ref":"#/components/schemas/Act60IndividualScreeningPath"}]}},"required":["screeningPath"]},"Act60IndividualHardToRecruitBranchEntity":{"type":"object","properties":{"professionalField":{"type":["string","null"]},"yearsOfExperience":{"type":["number","null"]},"sponsoringBusinessName":{"type":["string","null"]},"sponsoringDecreeNumber":{"type":["string","null"]}},"required":["professionalField","yearsOfExperience","sponsoringBusinessName","sponsoringDecreeNumber"]},"Act60IndividualYoungEntrepreneurBranchEntity":{"type":"object","properties":{"dateOfBirth":{"format":"date-time","type":["string","null"]},"businessDescription":{"type":["string","null"]},"projectedJobs":{"type":["number","null"]}},"required":["dateOfBirth","businessDescription","projectedJobs"]},"Act60IndividualSummaryDataEntity":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/Act60IndividualLocationEntity"},"history":{"$ref":"#/components/schemas/Act60IndividualHistoryEntity"},"aboutYou":{"$ref":"#/components/schemas/Act60IndividualAboutYouEntity"},"hardToRecruit":{"anyOf":[{"$ref":"#/components/schemas/Act60IndividualHardToRecruitBranchEntity"},{"type":"null"}]},"youngEntrepreneur":{"anyOf":[{"$ref":"#/components/schemas/Act60IndividualYoungEntrepreneurBranchEntity"},{"type":"null"}]},"suggestedDecreeType":{"anyOf":[{"$ref":"#/components/schemas/Act60DecreeType"},{"type":"null"}]}},"required":["location","history","aboutYou","hardToRecruit","youngEntrepreneur","suggestedDecreeType"]},"Act60IndividualSummaryEntity":{"type":"object","properties":{"id":{"type":"string"},"orgProductId":{"type":"string"},"data":{"$ref":"#/components/schemas/Act60IndividualSummaryDataEntity"},"decreeType":{"anyOf":[{"$ref":"#/components/schemas/Act60DecreeType"},{"type":"null"}]},"decreeTypeSetAt":{"format":"date-time","type":["string","null"]},"decreeTypeSetById":{"type":["string","null"]},"submittedAt":{"format":"date-time","type":"string"},"submittedById":{"type":["string","null"]},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","orgProductId","data","decreeType","decreeTypeSetAt","decreeTypeSetById","submittedAt","submittedById","updatedAt"]},"Act60IndividualSummaryPrefillDto":{"type":"object","properties":{"isResidingInPr":{"type":["boolean","null"]},"isRelocating":{"type":["boolean","null"]},"relocationCountry":{"type":["string","null"]},"relocationRegion":{"type":["string","null"]},"decreeStatus":{"anyOf":[{"$ref":"#/components/schemas/ProspectDecreeStatus"},{"type":"null"}]},"decreeNumber":{"type":["string","null"]},"dateOfBirth":{"format":"date-time","type":["string","null"]}},"required":["isResidingInPr","isRelocating","relocationCountry","relocationRegion","decreeStatus","decreeNumber","dateOfBirth"]},"Act60UpdateIndividualSummaryDto":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/Act60IndividualLocationDto"},"history":{"$ref":"#/components/schemas/Act60IndividualHistoryDto"},"aboutYou":{"$ref":"#/components/schemas/Act60IndividualAboutYouDto"},"hardToRecruit":{"$ref":"#/components/schemas/Act60IndividualHardToRecruitBranchDto"},"youngEntrepreneur":{"$ref":"#/components/schemas/Act60IndividualYoungEntrepreneurBranchDto"}},"required":["location","history","aboutYou"]},"Act60SetIndividualDecreeTypeDto":{"type":"object","properties":{"decreeType":{"allOf":[{"$ref":"#/components/schemas/Act60DecreeType"}]}},"required":["decreeType"]},"ForeignCountryCode":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","MK","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"ISO 3166-1 alpha-2 country code. Excludes \"US\" and \"PR\", which this app treats as domestic."},"TaxationMethod":{"type":"string","enum":["corporation","individual","partnership","other"]},"Act60ManufacturingGeneralInfoDto":{"type":"object","properties":{"registrationLocations":{"type":"array","items":{"$ref":"#/components/schemas/ProspectRegistrationLocation"}},"registrationState":{"example":"DE","description":"The registration follow-up for US mainland: a USPS state code.","anyOf":[{"$ref":"#/components/schemas/UsStateCode"},{"type":"null"}]},"registrationCountry":{"example":"CA","description":"ISO 3166-1 alpha-2 country code. Excludes \"US\" and \"PR\", which this app treats as domestic.","anyOf":[{"$ref":"#/components/schemas/ForeignCountryCode"},{"type":"null"}]},"isAuthorizedToOperateInPr":{"type":["boolean","null"],"description":"The registration follow-up, asked when the business is registered in the United States or Internationally and not in Puerto Rico. Yes asks the Department of State registration."},"dosRegistrationNumber":{"type":["string","null"],"description":"Asked when registered in Puerto Rico, or authorized to operate there."},"dosRegistrationDate":{"type":["string","null"],"example":"2019-03-14","description":"Asked when registered in Puerto Rico, or authorized to operate there."},"isOperatingInPr":{"type":"boolean"},"commencementOfOperationsDate":{"type":["string","null"],"example":"2019-03-14","description":"Asked when the business operates in Puerto Rico."},"taxationMethod":{"allOf":[{"$ref":"#/components/schemas/TaxationMethod"}]},"otherTaxationMethod":{"type":["string","null"]},"isSubsidiary":{"type":["boolean","null"],"description":"MD8; a submit with it blank is refused."}},"required":["registrationLocations","isOperatingInPr","taxationMethod"]},"Act60DecreeUltimateOwnerDto":{"type":"object","properties":{"id":{"type":"string","description":"Existing row id. Omit to create new."},"ownerType":{"allOf":[{"$ref":"#/components/schemas/OwnerType"}]},"fullName":{"type":"string","example":"Isabel Cruz"},"ssnOrEin":{"type":["string","null"],"description":"SSN for individuals or EIN for entities (MD9.3 / MD9.4, ES9.3 / ES9.4), validated by ownerType. Stored encrypted."},"ownerEmail":{"type":["string","null"]},"ownerPhone":{"type":["string","null"]},"ownershipPercentage":{"type":"number","minimum":0.01,"maximum":100,"example":50.5},"placeOfBirth":{"type":["string","null"],"description":"MD9.8 / ES9.8, individuals only."},"dateOfBirth":{"type":["string","null"],"example":"1984-07-22","description":"MD9.9 / ES9.9, individuals only."},"physicalAddress":{"anyOf":[{"$ref":"#/components/schemas/OptionalAddressDto"},{"type":"null"}]}},"required":["ownerType","fullName","ownershipPercentage"]},"Act60DecreeOwnerDto":{"type":"object","properties":{"id":{"type":"string","description":"Existing row id. Omit to create new."},"ownerType":{"allOf":[{"$ref":"#/components/schemas/OwnerType"}]},"fullName":{"type":"string","example":"Isabel Cruz"},"ssnOrEin":{"type":["string","null"],"description":"SSN for individuals or EIN for entities (MD9.3 / MD9.4, ES9.3 / ES9.4), validated by ownerType. Stored encrypted."},"ownerEmail":{"type":["string","null"]},"ownerPhone":{"type":["string","null"]},"ownershipPercentage":{"type":"number","minimum":0.01,"maximum":100,"example":50.5},"placeOfBirth":{"type":["string","null"],"description":"MD9.8 / ES9.8, individuals only."},"dateOfBirth":{"type":["string","null"],"example":"1984-07-22","description":"MD9.9 / ES9.9, individuals only."},"physicalAddress":{"anyOf":[{"$ref":"#/components/schemas/OptionalAddressDto"},{"type":"null"}]},"isParentCompany":{"type":"boolean","description":"MD9.11 / ES9.11, asked of every entity owner and dropped on an individual. MD8 / ES8 Yes needs exactly one entity owner marked; a submit with MD8 / ES8 blank is refused."},"ultimateOwners":{"description":"MD9.12 / ES9.12, every entity owner's (the parent company's too): 1 to 20.","type":"array","items":{"$ref":"#/components/schemas/Act60DecreeUltimateOwnerDto"}}},"required":["ownerType","fullName","ownershipPercentage"]},"ManufacturingDocumentCategory":{"type":"string","enum":["act60_all_concepts_debt_certificate","act60_certificate_of_filing_income_tax","act60_certificate_of_good_standing","act60_certificate_of_registry","act60_certified_financial_statements","act60_criminal_record","act60_debt_certificate_social_security_chauffeurs","act60_debt_certificate_unemployment_disability","act60_employer_identification_number_letter","act60_merchants_registration_certificate","act60_negative_debt_certificate_treasury","act60_negative_debt_certificate_state_insurance","act60_entity_organizational_chart","act60_resume_or_curriculum_vitae","act60_commercial_reference","act60_other","act60_manufacturing_production_process_description","act60_manufacturing_professionals_registry","act60_manufacturing_section_2064_declination","act60_manufacturing_disclosure_tax_investigation","act60_manufacturing_disclosure_conviction","act60_manufacturing_disclosure_arrest_or_summons","act60_manufacturing_disclosure_business_prohibition","act60_manufacturing_new_business_evidence","act60_manufacturing_background_support"]},"Act60ManufacturingFileNameDto":{"type":"object","properties":{"storageKey":{"type":"string"},"name":{"type":"string","description":"The file's new name. Its extension is kept: appended unless the name already ends with it or another spelling of it (.jpg for .jpeg). At most 200 characters with the extension."}},"required":["storageKey","name"]},"Act60ManufacturingDocumentDto":{"type":"object","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/ManufacturingDocumentCategory"}]},"storageKeys":{"type":"array","items":{"type":"string"}},"description":{"type":["string","null"],"description":"Omitted leaves the caption as it is; null clears it."},"fileNames":{"description":"The files renamed in this submit, one name each (up to 5); a file left out keeps its name. A file listed under two documents takes the same name in both.","type":"array","items":{"$ref":"#/components/schemas/Act60ManufacturingFileNameDto"}}},"required":["category","storageKeys"]},"Act60ProductNature":{"type":"string","enum":["tangible_only","intangible_only","both"]},"Act60ScreeningManufacturingActivity":{"type":"string","enum":["physical_goods","pharma_biotech","software_digital","contract_rnd","recycling_sustainability","key_supplier","manufacturing_property","other"]},"Act60ManufacturingProductDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","example":"Precision sensor housing"},"naicsCode":{"type":"string","example":"332119","description":"Six-digit NAICS industry code."},"currentAnnualUnits":{"type":"number","minimum":0,"maximum":2147483647,"example":0,"description":"Can be 0."},"currentAnnualSalesValue":{"type":"number","example":0,"description":"Can be 0."},"projectedAnnualUnits":{"type":"number","minimum":1,"maximum":2147483647,"example":60000,"description":"Above 0."},"projectedAnnualSalesValue":{"type":"number","example":3000000,"description":"Above 0."}},"required":["name","naicsCode","currentAnnualUnits","currentAnnualSalesValue","projectedAnnualUnits","projectedAnnualSalesValue"]},"Act60ManufacturingProductsDto":{"type":"object","properties":{"productNature":{"allOf":[{"$ref":"#/components/schemas/Act60ProductNature"}]},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Act60ScreeningManufacturingActivity"}},"otherActivity":{"type":["string","null"],"description":"MD12 \"Other\" text."},"items":{"description":"MD13","type":"array","items":{"$ref":"#/components/schemas/Act60ManufacturingProductDto"}}},"required":["productNature","activities","items"]},"Act60AssetStatus":{"type":"string","enum":["has_assets","plans_to_acquire","no_assets_needed"]},"Act60ManufacturingEquipmentItemDto":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":"string","example":"5-axis CNC milling center"},"acquisitionCost":{"type":"number"},"currentValue":{"type":"number"},"isInUse":{"type":"boolean"},"areaSquareFootage":{"type":"number","description":"Square feet."},"acquisitionDate":{"type":"string","example":"2021-06-01"},"projectedAdditionalAcquisition":{"type":"number","description":"Defaults to 0."}},"required":["description","acquisitionCost","currentValue","isInUse","areaSquareFootage","acquisitionDate"]},"Act60ManufacturingEquipmentDto":{"type":"object","properties":{"assetStatus":{"allOf":[{"$ref":"#/components/schemas/Act60AssetStatus"}]},"items":{"description":"MD15, when equipment is in use or planned.","type":"array","items":{"$ref":"#/components/schemas/Act60ManufacturingEquipmentItemDto"}}},"required":["assetStatus","items"]},"Act60ManufacturingMaterialDto":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":"string","example":"Aluminum bar stock 6061"},"supplierName":{"type":"string","example":"Alcoa Corporation"},"countryOfOrigin":{"example":"US","description":"ISO 3166-1 alpha-2 country code. \"PR\" is its own entry.","allOf":[{"$ref":"#/components/schemas/CountryCode"}]},"annualCost":{"type":"number"}},"required":["description","supplierName","countryOfOrigin","annualCost"]},"Act60ManufacturingMaterialsDto":{"type":"object","properties":{"hasMaterialsAndSupplies":{"type":"boolean","description":"MD16"},"items":{"description":"MD17","type":"array","items":{"$ref":"#/components/schemas/Act60ManufacturingMaterialDto"}}},"required":["hasMaterialsAndSupplies","items"]},"Act60PropertyType":{"type":"string","enum":["owned","leased","subleased","pridco","other"]},"Act60ManufacturingFacilityFiguresDto":{"type":"object","properties":{"landArea":{"type":"number","description":"Square feet."},"landValue":{"type":"number"},"numberOfBuildings":{"type":"number","minimum":1,"maximum":2147483647},"buildingValue":{"type":"number"},"totalBuildingArea":{"type":"number"},"manufacturingArea":{"type":"number"},"storageArea":{"type":"number"},"otherArea":{"type":["number","null"]},"parkingUnits":{"type":"number","minimum":0,"maximum":2147483647},"annualRent":{"type":"number"},"acquisitionDate":{"type":"string","example":"2021-06-01"}},"required":["landArea","landValue","numberOfBuildings","buildingValue","totalBuildingArea","manufacturingArea","storageArea","parkingUnits","annualRent","acquisitionDate"]},"Act60ManufacturingProjectedFacilityFiguresDto":{"type":"object","properties":{"landArea":{"type":"number","description":"Square feet."},"landValue":{"type":"number"},"numberOfBuildings":{"type":"number","minimum":1,"maximum":2147483647},"buildingValue":{"type":"number"},"totalBuildingArea":{"type":"number"},"manufacturingArea":{"type":"number"},"storageArea":{"type":"number"},"otherArea":{"type":["number","null"]},"parkingUnits":{"type":"number","minimum":0,"maximum":2147483647},"annualRent":{"type":"number"}},"required":["landArea","landValue","numberOfBuildings","buildingValue","totalBuildingArea","manufacturingArea","storageArea","parkingUnits","annualRent"]},"Act60ManufacturingLandBuildingsDto":{"type":"object","properties":{"hasFacilityInPr":{"type":"boolean","description":"MD18"},"propertyType":{"allOf":[{"$ref":"#/components/schemas/Act60PropertyType"}]},"zoneDescription":{"type":"string","description":"MD20"},"isFacilityShared":{"type":"boolean","description":"MD21"},"sharedEntityName":{"type":["string","null"],"description":"MD22"},"isSharedEntityRelated":{"type":["boolean","null"],"description":"MD23"},"sharedSpacePercentage":{"type":["number","null"],"description":"MD24"},"current":{"$ref":"#/components/schemas/Act60ManufacturingFacilityFiguresDto"},"projected":{"$ref":"#/components/schemas/Act60ManufacturingProjectedFacilityFiguresDto"}},"required":["hasFacilityInPr","propertyType","zoneDescription","isFacilityShared","current","projected"]},"Act60ManufacturingHeadcountCategory":{"type":"string","enum":["production_development","supervision_technical_leadership","administration","temporary_internal","hired_external"]},"Act60ManufacturingHeadcountDto":{"type":"object","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/Act60ManufacturingHeadcountCategory"}]},"headcount":{"type":"number","minimum":0,"maximum":2147483647},"annualPayroll":{"type":"number"},"projectedHeadcount":{"type":"number","minimum":0,"maximum":2147483647},"projectedAnnualPayroll":{"type":"number"}},"required":["category","headcount","annualPayroll","projectedHeadcount","projectedAnnualPayroll"]},"Act60ManufacturingEmployeesDto":{"type":"object","properties":{"categories":{"description":"MD26: one row per category, 5 in all.","type":"array","items":{"$ref":"#/components/schemas/Act60ManufacturingHeadcountDto"}},"shiftsCount":{"type":"number","minimum":0,"maximum":24,"description":"MD27"},"hoursPerShift":{"type":"number","minimum":0,"maximum":24,"description":"MD28"},"threeYearAverageEmployment":{"type":["number","null"],"minimum":0,"maximum":2147483647,"description":"MD29, when MD5 has a date."},"threeYearAverageYearlyCost":{"type":["number","null"],"description":"MD29, when MD5 has a date."},"hasLaborDispute":{"type":"boolean","description":"MD30"}},"required":["categories","shiftsCount","hoursPerShift","hasLaborDispute"]},"Act60ManufacturingFinancialYearDto":{"type":"object","properties":{"fiscalYear":{"type":"number","minimum":2000,"maximum":2100,"example":2026},"netIncome":{"type":"number"},"incomeTaxPaid":{"type":"number"}},"required":["fiscalYear","netIncome","incomeTaxPaid"]},"Act60ExemptionAct":{"type":"string","enum":["act_135","act_60","act_73","act_20","act_83","act_74","act_22","other"]},"Act60ExemptionPeriod":{"type":"string","enum":["ten_years","fifteen_years","twenty_years","twenty_five_years"]},"Act60ManufacturingProductionYearDto":{"type":"object","properties":{"fiscalYear":{"type":"number","minimum":2000,"maximum":2100,"example":2026},"annualProduction":{"type":"number","minimum":0,"maximum":2147483647},"productionEmployment":{"type":"number","minimum":0,"maximum":2147483647},"totalManHours":{"type":"number","minimum":0,"maximum":2147483647},"unitsProduced":{"type":"number","minimum":0,"maximum":2147483647},"annualSalesValue":{"type":"number"}},"required":["fiscalYear","annualProduction","productionEmployment","totalManHours","unitsProduced","annualSalesValue"]},"Act60ManufacturingAdditionalInfoDto":{"type":"object","properties":{"isInFreeTradeZone":{"type":["boolean","null"],"description":"MD31, optional."},"financialHistory":{"description":"MD32, when MD5 has a date: one per fiscal year (BP11), from the one MD5 falls in to the current one, up to 3; the current one alone for an MD5 after today.","type":"array","items":{"$ref":"#/components/schemas/Act60ManufacturingFinancialYearDto"}},"hasRelatedDecree":{"type":"boolean","description":"MD33"},"relatedDecreeNumber":{"type":["string","null"],"description":"MD34"},"relatedDecreeAct":{"anyOf":[{"$ref":"#/components/schemas/Act60ExemptionAct"},{"type":"null"}]},"relatedDecreeApprovalDate":{"type":["string","null"],"description":"MD36"},"relatedDecreeExemptionPeriod":{"anyOf":[{"$ref":"#/components/schemas/Act60ExemptionPeriod"},{"type":"null"}]},"isRelatedDecreeActive":{"type":["boolean","null"],"description":"MD38"},"relatedDecreeRequiredEmployment":{"type":["number","null"],"minimum":0,"maximum":2147483647,"description":"MD39"},"relatedDecreeCurrentEmployment":{"type":["number","null"],"minimum":0,"maximum":2147483647,"description":"MD40"},"hasProprietaryInterest":{"type":"boolean","description":"MD41"},"interestBusinessName":{"type":["string","null"],"description":"MD42"},"interestDecreeNumber":{"type":["string","null"],"description":"MD43"},"interestDecreeAct":{"anyOf":[{"$ref":"#/components/schemas/Act60ExemptionAct"},{"type":"null"}]},"interestOperationDetails":{"type":["string","null"],"minLength":50,"maxLength":1000,"description":"MD45"},"isReplacingExistingOperation":{"type":"boolean","description":"MD46"},"productionHistory":{"description":"MD48, optional: the last 3 fiscal years.","type":"array","items":{"$ref":"#/components/schemas/Act60ManufacturingProductionYearDto"}}},"required":["financialHistory","hasRelatedDecree","hasProprietaryInterest","isReplacingExistingOperation","productionHistory"]},"Act60DecreeRndSubcontractorDto":{"type":"object","properties":{"id":{"type":"string"},"providerName":{"type":"string"},"serviceDescription":{"type":"string"},"annualCost":{"type":"number"}},"required":["providerName","serviceDescription","annualCost"]},"Act60ManufacturingRndDto":{"type":"object","properties":{"performsRnd":{"description":"Whether the business performs R&D in Puerto Rico.","allOf":[{"$ref":"#/components/schemas/Act60RndAnswer"}]},"jobsCreated":{"type":["number","null"],"minimum":0,"maximum":2147483647,"description":"Jobs the R&D activity creates."},"capitalInvestment":{"type":["number","null"],"description":"Capital invested in the R&D activity."},"localPurchases":{"type":["number","null"],"description":"Local purchases of the R&D activity."},"taxableIncomeContributions":{"type":["number","null"],"description":"Taxable income contributions of the R&D activity."},"foreignSales":{"type":["number","null"],"description":"Foreign sales of the R&D activity."},"subcontractors":{"description":"The subcontracted local providers; may stay empty when the business performs R&D.","type":"array","items":{"$ref":"#/components/schemas/Act60DecreeRndSubcontractorDto"}},"hasMarketedRndProduct":{"type":["boolean","null"],"description":"Whether an R&D product reached the market; optional."}},"required":["performsRnd","subcontractors"]},"Act60ManufacturingBackgroundDto":{"type":"object","properties":{"hasTaxInvestigationOrPaymentPlan":{"type":"boolean","description":"The tax investigation or payment plan disclosure."},"hasConviction":{"type":"boolean","description":"The conviction disclosure."},"hasArrestOrSummons":{"type":"boolean","description":"The arrest or summons disclosure."},"hasBusinessProhibition":{"type":"boolean","description":"The business prohibition disclosure."}},"required":["hasTaxInvestigationOrPaymentPlan","hasConviction","hasArrestOrSummons","hasBusinessProhibition"]},"Act60SubmitManufacturingDto":{"type":"object","properties":{"generalInfo":{"$ref":"#/components/schemas/Act60ManufacturingGeneralInfoDto"},"owners":{"description":"MD9: 1 to 20 owners. Their shares total within 0.01% of 100%. Replaces the product's owners; a non-amendment submit also writes them to the Business Profile, with the parent mark (where MD9.11 is asked) and the ultimate owners, but not the birth details.","type":"array","items":{"$ref":"#/components/schemas/Act60DecreeOwnerDto"}},"documents":{"description":"MD10, MD47 and MD61, one entry per category.","type":"array","items":{"$ref":"#/components/schemas/Act60ManufacturingDocumentDto"}},"products":{"$ref":"#/components/schemas/Act60ManufacturingProductsDto"},"equipment":{"$ref":"#/components/schemas/Act60ManufacturingEquipmentDto"},"materials":{"$ref":"#/components/schemas/Act60ManufacturingMaterialsDto"},"landBuildings":{"$ref":"#/components/schemas/Act60ManufacturingLandBuildingsDto"},"employees":{"$ref":"#/components/schemas/Act60ManufacturingEmployeesDto"},"additionalInfo":{"$ref":"#/components/schemas/Act60ManufacturingAdditionalInfoDto"},"rnd":{"$ref":"#/components/schemas/Act60ManufacturingRndDto"},"background":{"$ref":"#/components/schemas/Act60ManufacturingBackgroundDto"}},"required":["generalInfo","owners","documents","products","equipment","materials","landBuildings","employees","additionalInfo","rnd","background"]},"Act60ManufacturingGeneralInfoEntity":{"type":"object","properties":{"registrationLocations":{"type":"array","items":{"$ref":"#/components/schemas/ProspectRegistrationLocation"}},"registrationState":{"type":["string","null"]},"registrationCountry":{"type":["string","null"]},"isAuthorizedToOperateInPr":{"type":["boolean","null"]},"dosRegistrationNumber":{"type":["string","null"]},"dosRegistrationDate":{"format":"date-time","type":["string","null"]},"isOperatingInPr":{"type":"boolean"},"commencementOfOperationsDate":{"format":"date-time","type":["string","null"]},"taxationMethod":{"allOf":[{"$ref":"#/components/schemas/TaxationMethod"}]},"otherTaxationMethod":{"type":["string","null"]},"isSubsidiary":{"type":["boolean","null"]}},"required":["registrationLocations","registrationState","registrationCountry","isAuthorizedToOperateInPr","dosRegistrationNumber","dosRegistrationDate","isOperatingInPr","commencementOfOperationsDate","taxationMethod","otherTaxationMethod","isSubsidiary"]},"Act60DecreeUltimateOwnerEntity":{"type":"object","properties":{"id":{"type":"string"},"ownerType":{"anyOf":[{"$ref":"#/components/schemas/OwnerType"},{"type":"null"}]},"ssnOrEin":{"type":["string","null"]},"ownerEmail":{"type":["string","null"]},"ownerPhone":{"type":["string","null"]},"placeOfBirth":{"type":["string","null"]},"dateOfBirth":{"format":"date-time","type":["string","null"]},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"fullName":{"type":"string"},"ownershipPercentage":{"type":"number"}},"required":["id","ownerType","ssnOrEin","ownerEmail","ownerPhone","placeOfBirth","dateOfBirth","physicalAddress","fullName","ownershipPercentage"]},"Act60DecreeOwnerEntity":{"type":"object","properties":{"id":{"type":"string"},"ownerType":{"anyOf":[{"$ref":"#/components/schemas/OwnerType"},{"type":"null"}]},"ssnOrEin":{"type":["string","null"]},"ownerEmail":{"type":["string","null"]},"ownerPhone":{"type":["string","null"]},"placeOfBirth":{"type":["string","null"]},"dateOfBirth":{"format":"date-time","type":["string","null"]},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"fullName":{"type":"string"},"ownershipPercentage":{"type":"number"},"isParentCompany":{"type":"boolean"},"ultimateOwners":{"type":"array","items":{"$ref":"#/components/schemas/Act60DecreeUltimateOwnerEntity"}}},"required":["id","ownerType","ssnOrEin","ownerEmail","ownerPhone","placeOfBirth","dateOfBirth","physicalAddress","fullName","ownershipPercentage","isParentCompany","ultimateOwners"]},"Act60ManufacturingProductEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"naicsCode":{"type":"string"},"currentAnnualUnits":{"type":"number"},"currentAnnualSalesValue":{"type":"number"},"projectedAnnualUnits":{"type":"number"},"projectedAnnualSalesValue":{"type":"number"}},"required":["id","name","naicsCode","currentAnnualUnits","currentAnnualSalesValue","projectedAnnualUnits","projectedAnnualSalesValue"]},"Act60ManufacturingProductsEntity":{"type":"object","properties":{"productNature":{"allOf":[{"$ref":"#/components/schemas/Act60ProductNature"}]},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Act60ScreeningManufacturingActivity"}},"otherActivity":{"type":["string","null"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/Act60ManufacturingProductEntity"}}},"required":["productNature","activities","otherActivity","items"]},"Act60ManufacturingEquipmentItemEntity":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"acquisitionCost":{"type":"number"},"currentValue":{"type":"number"},"isInUse":{"type":"boolean"},"areaSquareFootage":{"type":"number"},"acquisitionDate":{"format":"date-time","type":"string"},"projectedAdditionalAcquisition":{"type":"number"}},"required":["id","description","acquisitionCost","currentValue","isInUse","areaSquareFootage","acquisitionDate","projectedAdditionalAcquisition"]},"Act60ManufacturingEquipmentEntity":{"type":"object","properties":{"assetStatus":{"allOf":[{"$ref":"#/components/schemas/Act60AssetStatus"}]},"items":{"type":"array","items":{"$ref":"#/components/schemas/Act60ManufacturingEquipmentItemEntity"}}},"required":["assetStatus","items"]},"Act60ManufacturingMaterialEntity":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"supplierName":{"type":"string"},"countryOfOrigin":{"type":["string","null"],"description":"ISO country code. Null on a row the earlier form saved."},"annualCost":{"type":"number"}},"required":["id","description","supplierName","countryOfOrigin","annualCost"]},"Act60ManufacturingMaterialsEntity":{"type":"object","properties":{"hasMaterialsAndSupplies":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Act60ManufacturingMaterialEntity"}}},"required":["hasMaterialsAndSupplies","items"]},"Act60ManufacturingFacilityFiguresEntity":{"type":"object","properties":{"landArea":{"type":["number","null"]},"landValue":{"type":["number","null"]},"numberOfBuildings":{"type":["number","null"]},"buildingValue":{"type":["number","null"]},"totalBuildingArea":{"type":["number","null"]},"manufacturingArea":{"type":["number","null"]},"storageArea":{"type":["number","null"]},"otherArea":{"type":["number","null"]},"parkingUnits":{"type":["number","null"]},"annualRent":{"type":["number","null"]},"acquisitionDate":{"format":"date-time","type":["string","null"]}},"required":["landArea","landValue","numberOfBuildings","buildingValue","totalBuildingArea","manufacturingArea","storageArea","otherArea","parkingUnits","annualRent","acquisitionDate"]},"Act60ManufacturingProjectedFacilityFiguresEntity":{"type":"object","properties":{"landArea":{"type":["number","null"]},"landValue":{"type":["number","null"]},"numberOfBuildings":{"type":["number","null"]},"buildingValue":{"type":["number","null"]},"totalBuildingArea":{"type":["number","null"]},"manufacturingArea":{"type":["number","null"]},"storageArea":{"type":["number","null"]},"otherArea":{"type":["number","null"]},"parkingUnits":{"type":["number","null"]},"annualRent":{"type":["number","null"]}},"required":["landArea","landValue","numberOfBuildings","buildingValue","totalBuildingArea","manufacturingArea","storageArea","otherArea","parkingUnits","annualRent"]},"Act60ManufacturingLandBuildingsEntity":{"type":"object","properties":{"hasFacilityInPr":{"type":["boolean","null"]},"propertyType":{"anyOf":[{"$ref":"#/components/schemas/Act60PropertyType"},{"type":"null"}]},"zoneDescription":{"type":["string","null"]},"isFacilityShared":{"type":["boolean","null"]},"sharedEntityName":{"type":["string","null"]},"isSharedEntityRelated":{"type":["boolean","null"]},"sharedSpacePercentage":{"type":["number","null"]},"current":{"$ref":"#/components/schemas/Act60ManufacturingFacilityFiguresEntity"},"projected":{"$ref":"#/components/schemas/Act60ManufacturingProjectedFacilityFiguresEntity"}},"required":["hasFacilityInPr","propertyType","zoneDescription","isFacilityShared","sharedEntityName","isSharedEntityRelated","sharedSpacePercentage","current","projected"]},"Act60WorkforceFunctionCategory":{"type":"string","enum":["production_development","supervision_technical_leadership","administration","temporary_internal","hired_external","other"]},"Act60ManufacturingHeadcountEntity":{"type":"object","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/Act60WorkforceFunctionCategory"}]},"headcount":{"type":"number"},"annualPayroll":{"type":"number"},"projectedHeadcount":{"type":["number","null"],"description":"Null on an application the earlier form saved."},"projectedAnnualPayroll":{"type":["number","null"]}},"required":["category","headcount","annualPayroll","projectedHeadcount","projectedAnnualPayroll"]},"Act60ManufacturingEmployeesEntity":{"type":"object","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/Act60ManufacturingHeadcountEntity"}},"shiftsCount":{"type":"number"},"hoursPerShift":{"type":"number"},"threeYearAverageEmployment":{"type":["number","null"]},"threeYearAverageYearlyCost":{"type":["number","null"]},"hasLaborDispute":{"type":"boolean"}},"required":["categories","shiftsCount","hoursPerShift","threeYearAverageEmployment","threeYearAverageYearlyCost","hasLaborDispute"]},"Act60ManufacturingFinancialYearEntity":{"type":"object","properties":{"fiscalYear":{"type":"number"},"netIncome":{"type":"number"},"incomeTaxPaid":{"type":"number"}},"required":["fiscalYear","netIncome","incomeTaxPaid"]},"Act60ManufacturingProductionYearEntity":{"type":"object","properties":{"fiscalYear":{"type":"number"},"annualProduction":{"type":"number"},"productionEmployment":{"type":"number"},"totalManHours":{"type":"number"},"unitsProduced":{"type":"number"},"annualSalesValue":{"type":"number"}},"required":["fiscalYear","annualProduction","productionEmployment","totalManHours","unitsProduced","annualSalesValue"]},"Act60ManufacturingAdditionalInfoEntity":{"type":"object","properties":{"isInFreeTradeZone":{"type":["boolean","null"]},"financialHistory":{"type":"array","items":{"$ref":"#/components/schemas/Act60ManufacturingFinancialYearEntity"}},"hasRelatedDecree":{"type":"boolean"},"relatedDecreeNumber":{"type":["string","null"]},"relatedDecreeAct":{"anyOf":[{"$ref":"#/components/schemas/Act60ExemptionAct"},{"type":"null"}]},"relatedDecreeApprovalDate":{"format":"date-time","type":["string","null"]},"relatedDecreeExemptionPeriod":{"anyOf":[{"$ref":"#/components/schemas/Act60ExemptionPeriod"},{"type":"null"}]},"isRelatedDecreeActive":{"type":["boolean","null"]},"relatedDecreeRequiredEmployment":{"type":["number","null"]},"relatedDecreeCurrentEmployment":{"type":["number","null"]},"hasProprietaryInterest":{"type":["boolean","null"]},"interestBusinessName":{"type":["string","null"]},"interestDecreeNumber":{"type":["string","null"]},"interestDecreeAct":{"anyOf":[{"$ref":"#/components/schemas/Act60ExemptionAct"},{"type":"null"}]},"interestOperationDetails":{"type":["string","null"]},"isReplacingExistingOperation":{"type":["boolean","null"]},"productionHistory":{"type":"array","items":{"$ref":"#/components/schemas/Act60ManufacturingProductionYearEntity"}}},"required":["isInFreeTradeZone","financialHistory","hasRelatedDecree","relatedDecreeNumber","relatedDecreeAct","relatedDecreeApprovalDate","relatedDecreeExemptionPeriod","isRelatedDecreeActive","relatedDecreeRequiredEmployment","relatedDecreeCurrentEmployment","hasProprietaryInterest","interestBusinessName","interestDecreeNumber","interestDecreeAct","interestOperationDetails","isReplacingExistingOperation","productionHistory"]},"Act60ManufacturingRndSubcontractorEntity":{"type":"object","properties":{"id":{"type":"string"},"providerName":{"type":"string"},"serviceDescription":{"type":"string"},"annualCost":{"type":"number"}},"required":["id","providerName","serviceDescription","annualCost"]},"Act60ManufacturingRndEntity":{"type":"object","properties":{"performsRnd":{"anyOf":[{"$ref":"#/components/schemas/Act60RndAnswer"},{"type":"null"}]},"jobsCreated":{"type":["number","null"]},"capitalInvestment":{"type":["number","null"]},"localPurchases":{"type":["number","null"]},"taxableIncomeContributions":{"type":["number","null"]},"foreignSales":{"type":["number","null"]},"subcontractors":{"type":"array","items":{"$ref":"#/components/schemas/Act60ManufacturingRndSubcontractorEntity"}},"hasMarketedRndProduct":{"type":["boolean","null"]}},"required":["performsRnd","jobsCreated","capitalInvestment","localPurchases","taxableIncomeContributions","foreignSales","subcontractors","hasMarketedRndProduct"]},"Act60ManufacturingBackgroundEntity":{"type":"object","properties":{"hasTaxInvestigationOrPaymentPlan":{"type":"boolean"},"hasConviction":{"type":"boolean"},"hasArrestOrSummons":{"type":"boolean"},"hasBusinessProhibition":{"type":"boolean"}},"required":["hasTaxInvestigationOrPaymentPlan","hasConviction","hasArrestOrSummons","hasBusinessProhibition"]},"Act60ManufacturingDataEntity":{"type":"object","properties":{"generalInfo":{"$ref":"#/components/schemas/Act60ManufacturingGeneralInfoEntity"},"owners":{"type":"array","items":{"$ref":"#/components/schemas/Act60DecreeOwnerEntity"}},"documents":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}},"products":{"$ref":"#/components/schemas/Act60ManufacturingProductsEntity"},"equipment":{"$ref":"#/components/schemas/Act60ManufacturingEquipmentEntity"},"materials":{"$ref":"#/components/schemas/Act60ManufacturingMaterialsEntity"},"landBuildings":{"$ref":"#/components/schemas/Act60ManufacturingLandBuildingsEntity"},"employees":{"$ref":"#/components/schemas/Act60ManufacturingEmployeesEntity"},"additionalInfo":{"$ref":"#/components/schemas/Act60ManufacturingAdditionalInfoEntity"},"rnd":{"$ref":"#/components/schemas/Act60ManufacturingRndEntity"},"background":{"$ref":"#/components/schemas/Act60ManufacturingBackgroundEntity"}},"required":["generalInfo","owners","documents","products","equipment","materials","landBuildings","employees","additionalInfo","rnd","background"]},"Act60ManufacturingEntity":{"type":"object","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/OrgProductStatus"}]},"clientStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentClientStatus"},{"type":"null"}]},"locked":{"type":"boolean"},"id":{"type":["string","null"]},"orgProductId":{"type":"string"},"data":{"anyOf":[{"$ref":"#/components/schemas/Act60ManufacturingDataEntity"},{"type":"null"}]},"submittedAt":{"format":"date-time","type":["string","null"]},"submittedById":{"type":["string","null"]},"updatedAt":{"format":"date-time","type":["string","null"]},"fiscalYearEnd":{"type":["string","null"],"example":"Jun-30","description":"The Business Profile's BP11 as `MMM-DD`, the day MD32's fiscal years end on."}},"required":["status","clientStatus","locked","id","orgProductId","data","submittedAt","submittedById","updatedAt","fiscalYearEnd"]},"Act60DecreeUltimateOwnerPrefillEntity":{"type":"object","properties":{"id":{"type":"string"},"ownerType":{"anyOf":[{"$ref":"#/components/schemas/OwnerType"},{"type":"null"}]},"ssnOrEin":{"type":["string","null"]},"ownerEmail":{"type":["string","null"]},"ownerPhone":{"type":["string","null"]},"placeOfBirth":{"type":["string","null"]},"dateOfBirth":{"format":"date-time","type":["string","null"]},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"fullName":{"type":["string","null"]},"ownershipPercentage":{"type":["number","null"]}},"required":["id","ownerType","ssnOrEin","ownerEmail","ownerPhone","placeOfBirth","dateOfBirth","physicalAddress","fullName","ownershipPercentage"]},"Act60DecreeOwnerPrefillEntity":{"type":"object","properties":{"id":{"type":"string"},"ownerType":{"anyOf":[{"$ref":"#/components/schemas/OwnerType"},{"type":"null"}]},"ssnOrEin":{"type":["string","null"]},"ownerEmail":{"type":["string","null"]},"ownerPhone":{"type":["string","null"]},"placeOfBirth":{"type":["string","null"]},"dateOfBirth":{"format":"date-time","type":["string","null"]},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"fullName":{"type":"string"},"ownershipPercentage":{"type":"number"},"isParentCompany":{"type":"boolean"},"ultimateOwners":{"type":"array","items":{"$ref":"#/components/schemas/Act60DecreeUltimateOwnerPrefillEntity"}}},"required":["id","ownerType","ssnOrEin","ownerEmail","ownerPhone","placeOfBirth","dateOfBirth","physicalAddress","fullName","ownershipPercentage","isParentCompany","ultimateOwners"]},"Act60ManufacturingPrefillDto":{"type":"object","properties":{"registrationLocations":{"type":"array","items":{"$ref":"#/components/schemas/ProspectRegistrationLocation"}},"registrationState":{"type":["string","null"]},"registrationCountry":{"type":["string","null"]},"dosRegistrationNumber":{"type":["string","null"],"description":"MD2 (BP7)"},"dosRegistrationDate":{"format":"date-time","type":["string","null"],"description":"MD3 (BP8)"},"isOperatingInPr":{"type":["boolean","null"],"description":"MD4 (BP9)"},"commencementOfOperationsDate":{"format":"date-time","type":["string","null"],"description":"MD5 (BP10)"},"fiscalYearEnd":{"type":["string","null"],"example":"Jun-30","description":"BP11 as `MMM-DD`, the day MD32's fiscal years end on."},"taxationMethod":{"anyOf":[{"$ref":"#/components/schemas/TaxationMethod"},{"type":"null"}]},"otherTaxationMethod":{"type":["string","null"]},"isSubsidiary":{"type":["boolean","null"],"description":"MD8 (BP15)"},"owners":{"description":"MD9 (BP17).","type":"array","items":{"$ref":"#/components/schemas/Act60DecreeOwnerPrefillEntity"}},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Act60ScreeningManufacturingActivity"}},"otherActivity":{"type":["string","null"]},"performsRnd":{"anyOf":[{"$ref":"#/components/schemas/Act60RndAnswer"},{"type":"null"}]}},"required":["registrationLocations","registrationState","registrationCountry","dosRegistrationNumber","dosRegistrationDate","isOperatingInPr","commencementOfOperationsDate","fiscalYearEnd","taxationMethod","otherTaxationMethod","isSubsidiary","owners","activities","otherActivity","performsRnd"]},"Act60InitBulkUploadDto":{"type":"object","properties":{"files":{"description":"Declared files. Any `.zip` in the selection is expanded server-side; anything else is treated as a loose file.","type":"array","items":{"$ref":"#/components/schemas/InitUploadFileDto"}}},"required":["files"]},"NothingToReviewReason":{"type":"string","enum":["empty","unsupported","too_large","not_uploaded","mixed"],"description":"Set when the upload finished with no document left for a person, so the server closed it without a review: why, to say instead of opening one."},"Act60BulkUploadStatusDto":{"type":"object","properties":{"batchId":{"type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/BulkUploadBatchStatus"}]},"phase":{"allOf":[{"$ref":"#/components/schemas/BulkUploadBatchPhase"}]},"totalFiles":{"type":"number","description":"Zero until the phase reaches `analyzing`."},"processedFiles":{"type":"number"},"errorMessage":{"type":["string","null"],"description":"Why the upload failed, written for the applicant. An internal fault is reported generically here and kept in the logs."},"needsReview":{"type":"boolean","description":"Processing has finished but the results have not been confirmed — open the review modal."},"nothingToReviewReason":{"description":"Set when the upload finished with no document left for a person, so the server closed it without a review: why, to say instead of opening one.","anyOf":[{"$ref":"#/components/schemas/NothingToReviewReason"},{"type":"null"}]},"isRunning":{"type":"boolean","description":"Still uploading or analysing; keep polling."},"createdById":{"type":["string","null"],"description":"The user who started this upload."}},"required":["batchId","status","phase","totalFiles","processedFiles","errorMessage","needsReview","nothingToReviewReason","isRunning","createdById"]},"Act60ActiveBulkUploadDto":{"type":"object","properties":{"batch":{"anyOf":[{"$ref":"#/components/schemas/Act60BulkUploadStatusDto"},{"type":"null"}]}},"required":["batch"]},"Act60BulkUploadReviewRowDto":{"type":"object","properties":{"documentId":{"type":"string"},"originalName":{"type":"string"},"archivePath":{"type":["string","null"],"description":"Full path inside the uploaded folder/archive, for telling same-named files apart."},"fileSize":{"type":["number","null"]},"previewUrl":{"type":["string","null"]},"suggestedCategory":{"description":"Null renders as \"Not identified\" and must be set by the user.","anyOf":[{"$ref":"#/components/schemas/ProductDocumentCategory"},{"type":"null"}]},"issue":{"description":"Why this file needs attention, as a bucket the client renders its own copy for. Where the pipeline has something more specific to say, that is in `detail`. For an archive, that covers which limit it tripped and how much of it was added.","anyOf":[{"$ref":"#/components/schemas/IngestedDocumentIssue"},{"type":"null"}]},"detail":{"type":["string","null"],"description":"What the pipeline can say about this file beyond its `issue`, written for the client. Prefer it over the issue's own copy when present; null when there is nothing to add."},"isAttachable":{"type":"boolean","description":"Whether this file may be attached to a target. False means the only action left is Remove — confirm rejects it."}},"required":["documentId","originalName","archivePath","fileSize","previewUrl","suggestedCategory","issue","detail","isAttachable"]},"Act60BulkUploadReviewDto":{"type":"object","properties":{"batch":{"$ref":"#/components/schemas/Act60BulkUploadStatusDto"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Act60BulkUploadReviewRowDto"}},"maxFilesPerCategory":{"type":"number","description":"How many files this decree accepts per category, counted across the files a category already holds plus the ones being confirmed."}},"required":["batch","rows","maxFilesPerCategory"]},"Act60SetDocumentCategoryDto":{"type":"object","properties":{"category":{"description":"Null clears the allocation, returning the file to unassigned.","anyOf":[{"$ref":"#/components/schemas/ProductDocumentCategory"},{"type":"null"}]}},"required":["category"]},"Act60ConfirmBulkUploadItemDto":{"type":"object","properties":{"documentId":{"type":"string"},"category":{"allOf":[{"$ref":"#/components/schemas/ProductDocumentCategory"}]}},"required":["documentId","category"]},"Act60ConfirmBulkUploadDto":{"type":"object","properties":{"items":{"description":"The files to attach and where. Files omitted here are left staged and are not attached.","type":"array","items":{"$ref":"#/components/schemas/Act60ConfirmBulkUploadItemDto"}},"removedStorageKeys":{"description":"Files on record that no card or Other Documents section holds any more — removed in the form but not yet saved. A category this confirm files into is written without them, as the form's next save would write it, and the cap is counted the same way; a category under review or approved keeps every file either way. Elsewhere they are left as they are. At most 305.","type":"array","items":{"type":"string"}}},"required":["items"]},"ProductDocumentSectionDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"documents":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentFileDto"}}},"required":["id","name","description","documents"]},"Act60UploadDocumentItemDto":{"type":"object","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/ProductDocumentCategory"}]},"storageKeys":{"type":"array","items":{"type":"string"}},"description":{"type":["string","null"],"description":"Omitted leaves the caption as it is; null clears it."}},"required":["category","storageKeys"]},"Act60OtherDocumentItemDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Minted by the client when the document is added, so sending it again updates it rather than adding another."},"name":{"type":"string","maxLength":255},"description":{"type":["string","null"],"description":"Omitted leaves the caption as it is; null clears it."},"storageKeys":{"type":"array","items":{"type":"string"}}},"required":["id","name","storageKeys"]},"Act60UploadDocumentsDto":{"type":"object","properties":{"documents":{"description":"One entry per document category (max 61), unique by category. Empty when the request carries only other documents.","type":"array","items":{"$ref":"#/components/schemas/Act60UploadDocumentItemDto"}},"otherDocuments":{"description":"Only the listed documents are written; the rest stay as they are. At most 20, unique by id.","type":"array","items":{"$ref":"#/components/schemas/Act60OtherDocumentItemDto"}},"sendForReview":{"type":"boolean"}},"required":["documents"]},"SetProductDocumentNotApplicableDto":{"type":"object","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/ProductDocumentCategory"}]},"notApplicable":{"type":"boolean"}},"required":["category","notApplicable"]},"Act60ManufacturingCompanyInformationSection":{"type":"object","properties":{"companyName":{"type":"string"},"ein":{"type":"string"},"email":{"type":"string"},"primaryPhoneNumber":{"type":"string"},"fax":{"type":"string"},"website":{"type":"string"}},"required":["companyName","ein","email","primaryPhoneNumber","fax","website"]},"Act60ReportAddressDto":{"type":"object","properties":{"addressLine1":{"type":"string"},"addressLine2":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}},"required":["addressLine1","addressLine2","city","region","postalCode","country"]},"Act60ManufacturingRepresentativeSection":{"type":"object","properties":{"representativeName":{"type":"string"},"representativeRelation":{"type":"string"},"representativeEmail":{"type":"string"},"contactName":{"type":"string"},"contactRelation":{"type":"string"},"contactEmail":{"type":"string"}},"required":["representativeName","representativeRelation","representativeEmail","contactName","contactRelation","contactEmail"]},"Act60ManufacturingBusinessOrganizationSection":{"type":"object","properties":{"showOrganizedUnderState":{"type":"boolean"},"showOrganizedUnderCountry":{"type":"boolean"},"organizationType":{"type":"string"},"taxationMethod":{"type":"string"},"typeOfBusiness":{"type":"string"},"yearsOfOperation":{"type":"string"},"commencementOfOperations":{"type":"string"},"companyRegisterNumber":{"type":"string"},"dateOfRegistry":{"type":"string"},"corporateResidency":{"type":"string"},"registrationPlaces":{"type":"string","description":"MD1"},"organizedUnderState":{"type":"string"},"organizedUnderCountry":{"type":"string"},"showAuthorizedToOperateInPr":{"type":"boolean"},"authorizedToOperateInPr":{"type":"string"}},"required":["showOrganizedUnderState","showOrganizedUnderCountry","organizationType","taxationMethod","typeOfBusiness","yearsOfOperation","commencementOfOperations","companyRegisterNumber","dateOfRegistry","corporateResidency","registrationPlaces","organizedUnderState","organizedUnderCountry","showAuthorizedToOperateInPr","authorizedToOperateInPr"]},"Act60ReportPreviousLocationDto":{"type":"object","properties":{"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"}},"required":["city","state","country"]},"Act60ReportStockholderRowDto":{"type":"object","properties":{"partnerName":{"type":"string"},"taxId":{"type":"string"},"birthplace":{"type":"string"},"birthdate":{"type":"string"},"participationPercentage":{"type":"string"},"address":{"type":"string"}},"required":["partnerName","taxId","birthplace","birthdate","participationPercentage","address"]},"Act60ManufacturingParentCompanySection":{"type":"object","properties":{"hasParentCompany":{"type":"string"},"parentCompanyName":{"type":"string"},"parentCompanyAddress":{"type":"string"}},"required":["hasParentCompany","parentCompanyName","parentCompanyAddress"]},"Act60ManufacturingProposedExemptBusinessSection":{"type":"object","properties":{"businessType":{"type":"string"},"businessClassification":{"type":"string"},"productNature":{"type":"string","description":"MD11"},"activityDescription":{"type":"string"},"hasOtherIncentives":{"type":"string"},"otherIncentivesDescription":{"type":"string"},"freeTradeZoneStatus":{"type":"string"}},"required":["businessType","businessClassification","productNature","activityDescription","hasOtherIncentives","otherIncentivesDescription","freeTradeZoneStatus"]},"Act60ManufacturingProductLineRow":{"type":"object","properties":{"naicsCode":{"type":"string"},"currentUnitsPerYear":{"type":"string"},"currentSalesValue":{"type":"string"},"projectedUnitsPerYear":{"type":"string"},"projectedSalesValue":{"type":"string"}},"required":["naicsCode","currentUnitsPerYear","currentSalesValue","projectedUnitsPerYear","projectedSalesValue"]},"Act60ManufacturingMachinerySection":{"type":"object","properties":{"showTotalProjectedAcquisitionCost":{"type":"boolean"},"hasMachineryAndEquipment":{"type":"string"},"totalProjectedAcquisitionCost":{"type":"string"}},"required":["showTotalProjectedAcquisitionCost","hasMachineryAndEquipment","totalProjectedAcquisitionCost"]},"Act60ManufacturingEquipmentRow":{"type":"object","properties":{"description":{"type":"string"},"cost":{"type":"string"},"currentValue":{"type":"string"},"inUse":{"type":"string"},"area":{"type":"string"},"acquisitionDate":{"type":"string"},"projectedAdditionalAcquisition":{"type":"string"}},"required":["description","cost","currentValue","inUse","area","acquisitionDate","projectedAdditionalAcquisition"]},"Act60ManufacturingWorkforceRow":{"type":"object","properties":{"category":{"type":"string"},"employees":{"type":"string"},"payroll":{"type":"string"},"projectedEmployees":{"type":"string","description":"MD26.3"},"projectedPayroll":{"type":"string","description":"MD26.4"}},"required":["category","employees","payroll","projectedEmployees","projectedPayroll"]},"Act60ManufacturingAdditionalQuestionsSection":{"type":"object","properties":{"shiftsCount":{"type":"string"},"hoursPerShift":{"type":"string"},"hasLaborDispute":{"type":"string"},"threeYearAverageEmployment":{"type":"string","description":"MD29"},"threeYearAverageYearlyCost":{"type":"string","description":"MD29"}},"required":["shiftsCount","hoursPerShift","hasLaborDispute","threeYearAverageEmployment","threeYearAverageYearlyCost"]},"Act60ManufacturingEmploymentHistoryRow":{"type":"object","properties":{"fiscalYear":{"type":"string"},"averageEmployment":{"type":"string"},"payrollAmount":{"type":"string"}},"required":["fiscalYear","averageEmployment","payrollAmount"]},"Act60ManufacturingRawMaterialsSection":{"type":"object","properties":{"hasRawMaterials":{"type":"string"},"totalAnnualCost":{"type":"string"}},"required":["hasRawMaterials","totalAnnualCost"]},"Act60ManufacturingInputSupplierRow":{"type":"object","properties":{"rawMaterial":{"type":"string"},"supplier":{"type":"string"},"cityCountry":{"type":"string"},"annualCost":{"type":"string"}},"required":["rawMaterial","supplier","cityCountry","annualCost"]},"Act60ManufacturingLandAndBuildingsSection":{"type":"object","properties":{"showFacilityDetails":{"type":"boolean"},"showSharedDetails":{"type":"boolean"},"showFacilityStatus":{"type":"boolean"},"facilityStatus":{"type":"string"},"propertyType":{"type":"string"},"zoneDescription":{"type":"string"},"isShared":{"type":"string"},"sharedEntityName":{"type":"string"},"isSharedEntityRelated":{"type":"string"},"sharedSpacePercentage":{"type":"string"}},"required":["showFacilityDetails","showSharedDetails","showFacilityStatus","facilityStatus","propertyType","zoneDescription","isShared","sharedEntityName","isSharedEntityRelated","sharedSpacePercentage"]},"Act60ManufacturingFacilityFigureRow":{"type":"object","properties":{"label":{"type":"string"},"current":{"type":"string"},"projected":{"type":"string"}},"required":["label","current","projected"]},"Act60ManufacturingPriorPrBusinessSection":{"type":"object","properties":{"isCurrentlyPerformingInPr":{"type":"string"}},"required":["isCurrentlyPerformingInPr"]},"Act60ManufacturingFinancialHistoryRow":{"type":"object","properties":{"fiscalYear":{"type":"string"},"netIncome":{"type":"string"},"incomeTaxPayments":{"type":"string"}},"required":["fiscalYear","netIncome","incomeTaxPayments"]},"Act60ManufacturingPreviousGrantSection":{"type":"object","properties":{"hasPriorGrant":{"type":"string"},"commencementOfOperations":{"type":"string"},"municipality":{"type":"string"},"decreeCaseNumber":{"type":"string"}},"required":["hasPriorGrant","commencementOfOperations","municipality","decreeCaseNumber"]},"Act60ManufacturingPredecessorSection":{"type":"object","properties":{"showSection2064Documents":{"type":"boolean"},"isRelatedToExemptBusiness":{"type":"string"},"grantNumber":{"type":"string"},"exemptionAct":{"type":"string"},"grantEffectiveDate":{"type":"string"},"exemptionPeriod":{"type":"string"},"isGrantActive":{"type":"string"},"averageEmploymentRequirement":{"type":"string"},"currentEmploymentLevel":{"type":"string"},"hasProprietaryInterest":{"type":"string"},"relatedEntityName":{"type":"string"},"relatedEntityGrantNumber":{"type":"string"},"relatedEntityExemptionAct":{"type":"string"},"relatedEntityOperationDetails":{"type":"string"},"acceptsSection2064":{"type":"string"},"section2064Documents":{"type":"string"}},"required":["showSection2064Documents","isRelatedToExemptBusiness","grantNumber","exemptionAct","grantEffectiveDate","exemptionPeriod","isGrantActive","averageEmploymentRequirement","currentEmploymentLevel","hasProprietaryInterest","relatedEntityName","relatedEntityGrantNumber","relatedEntityExemptionAct","relatedEntityOperationDetails","acceptsSection2064","section2064Documents"]},"Act60ManufacturingPredecessorProductionRow":{"type":"object","properties":{"fiscalYear":{"type":"string"},"annualProduction":{"type":"string"},"productionEmployment":{"type":"string"},"totalManHours":{"type":"string"},"unitsProduced":{"type":"string"},"annualSalesValue":{"type":"string"}},"required":["fiscalYear","annualProduction","productionEmployment","totalManHours","unitsProduced","annualSalesValue"]},"Act60ManufacturingCurrentValueRow":{"type":"object","properties":{"label":{"type":"string"},"current":{"type":"string"}},"required":["label","current"]},"Act60ManufacturingScientificRndSection":{"type":"object","properties":{"operationsRelatedToRnd":{"type":"string"}},"required":["operationsRelatedToRnd"]},"Act60ManufacturingRndSpecializationRow":{"type":"object","properties":{"specialization":{"type":"string"},"employees":{"type":"string"},"payroll":{"type":"string"},"projectedEmployees":{"type":"string"},"projectedPayroll":{"type":"string"}},"required":["specialization","employees","payroll","projectedEmployees","projectedPayroll"]},"Act60ManufacturingMarketingOutletRow":{"type":"object","properties":{"product":{"type":"string"},"purchaserMainOffice":{"type":"string"},"purchaserThirdParty":{"type":"string"},"cityCountry":{"type":"string"},"exportPercentage":{"type":"string"}},"required":["product","purchaserMainOffice","purchaserThirdParty","cityCountry","exportPercentage"]},"Act60ReportBackgroundInformationDto":{"type":"object","properties":{"showSupportingDocuments":{"type":"boolean"},"hasBeenInvestigated":{"type":"string"},"hasBeenConvicted":{"type":"string"},"hasBeenArrestedOrCharged":{"type":"string"},"hasBeenProhibited":{"type":"string"},"supportingDocuments":{"type":"string"}},"required":["showSupportingDocuments","hasBeenInvestigated","hasBeenConvicted","hasBeenArrestedOrCharged","hasBeenProhibited","supportingDocuments"]},"Act60ReportLeadSourceDto":{"type":"object","properties":{"showLeadSourceOther":{"type":"boolean"},"leadSource":{"type":"string"},"leadSourceOther":{"type":"string"}},"required":["showLeadSourceOther","leadSource","leadSourceOther"]},"Act60ManufacturingRndInformationSection":{"type":"object","properties":{"showRndDetail":{"type":"boolean"},"performsRnd":{"type":"string"},"totalJobsCreated":{"type":"string"},"capitalInvestment":{"type":"string"},"totalLocalPurchases":{"type":"string"},"taxableIncome":{"type":"string"},"foreignSales":{"type":"string"},"subcontractedLocalProviders":{"type":"string"},"hasMarketedRndProduct":{"type":"string"},"electsSuccessorTreatment":{"type":"string"}},"required":["showRndDetail","performsRnd","totalJobsCreated","capitalInvestment","totalLocalPurchases","taxableIncome","foreignSales","subcontractedLocalProviders","hasMarketedRndProduct","electsSuccessorTreatment"]},"Act60ManufacturingRndSubcontractorRow":{"type":"object","properties":{"providerName":{"type":"string"},"serviceDescription":{"type":"string"},"annualCost":{"type":"string"}},"required":["providerName","serviceDescription","annualCost"]},"Act60ReportDocumentStatus":{"type":"string","enum":["Attached","Not applicable","Pending"]},"Act60ReportDocumentDto":{"type":"object","properties":{"label":{"type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/Act60ReportDocumentStatus"}]},"files":{"type":"string"},"description":{"type":"string"}},"required":["label","status","files","description"]},"Act60ReportOtherDocumentDto":{"type":"object","properties":{"description":{"type":"string"},"file":{"type":"string"}},"required":["description","file"]},"Act60ManufacturingReportPreviewDto":{"type":"object","properties":{"companyName":{"type":"string"},"companyInformation":{"anyOf":[{"$ref":"#/components/schemas/Act60ManufacturingCompanyInformationSection"},{"type":"null"}]},"physicalAddress":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportAddressDto"},{"type":"null"}]},"postalAddress":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportAddressDto"},{"type":"null"}]},"representativeAndContact":{"anyOf":[{"$ref":"#/components/schemas/Act60ManufacturingRepresentativeSection"},{"type":"null"}]},"businessOrganization":{"anyOf":[{"$ref":"#/components/schemas/Act60ManufacturingBusinessOrganizationSection"},{"type":"null"}]},"previousLocation":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportPreviousLocationDto"},{"type":"null"}]},"stockholders":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ReportStockholderRowDto"}},"parentCompany":{"anyOf":[{"$ref":"#/components/schemas/Act60ManufacturingParentCompanySection"},{"type":"null"}]},"proposedExemptBusiness":{"anyOf":[{"$ref":"#/components/schemas/Act60ManufacturingProposedExemptBusinessSection"},{"type":"null"}]},"assignedSection":{"type":"string"},"productLines":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ManufacturingProductLineRow"}},"machineryAndEquipment":{"anyOf":[{"$ref":"#/components/schemas/Act60ManufacturingMachinerySection"},{"type":"null"}]},"showEquipment":{"type":"boolean"},"equipment":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ManufacturingEquipmentRow"}},"workforce":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ManufacturingWorkforceRow"}},"workforceTotal":{"anyOf":[{"$ref":"#/components/schemas/Act60ManufacturingWorkforceRow"},{"type":"null"}]},"additionalQuestions":{"anyOf":[{"$ref":"#/components/schemas/Act60ManufacturingAdditionalQuestionsSection"},{"type":"null"}]},"employmentHistory":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ManufacturingEmploymentHistoryRow"}},"rawMaterials":{"anyOf":[{"$ref":"#/components/schemas/Act60ManufacturingRawMaterialsSection"},{"type":"null"}]},"showInputSuppliers":{"type":"boolean"},"inputSuppliers":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ManufacturingInputSupplierRow"}},"landAndBuildings":{"anyOf":[{"$ref":"#/components/schemas/Act60ManufacturingLandAndBuildingsSection"},{"type":"null"}]},"showLandBuildingFeatures":{"type":"boolean"},"landBuildingFeatures":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ManufacturingFacilityFigureRow"}},"priorPrBusiness":{"anyOf":[{"$ref":"#/components/schemas/Act60ManufacturingPriorPrBusinessSection"},{"type":"null"}]},"financialHistory":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ManufacturingFinancialHistoryRow"}},"previousTaxIncentiveGrant":{"anyOf":[{"$ref":"#/components/schemas/Act60ManufacturingPreviousGrantSection"},{"type":"null"}]},"predecessorExemptBusiness":{"anyOf":[{"$ref":"#/components/schemas/Act60ManufacturingPredecessorSection"},{"type":"null"}]},"showPredecessorProduction":{"type":"boolean"},"predecessorProduction":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ManufacturingPredecessorProductionRow"}},"employeeEducation":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ManufacturingCurrentValueRow"}},"scientificRnd":{"anyOf":[{"$ref":"#/components/schemas/Act60ManufacturingScientificRndSection"},{"type":"null"}]},"showRndSpecializations":{"type":"boolean"},"rndSpecializations":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ManufacturingRndSpecializationRow"}},"marketingOutlets":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ManufacturingMarketingOutletRow"}},"backgroundInformation":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportBackgroundInformationDto"},{"type":"null"}]},"leadSourceInformation":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportLeadSourceDto"},{"type":"null"}]},"rndInformation":{"anyOf":[{"$ref":"#/components/schemas/Act60ManufacturingRndInformationSection"},{"type":"null"}]},"showRndSubcontractors":{"type":"boolean"},"rndSubcontractors":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ManufacturingRndSubcontractorRow"}},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Act60ReportDocumentDto"}},"otherDocuments":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ReportOtherDocumentDto"}}},"required":["companyName","companyInformation","physicalAddress","postalAddress","representativeAndContact","businessOrganization","previousLocation","stockholders","parentCompany","proposedExemptBusiness","assignedSection","productLines","machineryAndEquipment","showEquipment","equipment","workforce","workforceTotal","additionalQuestions","employmentHistory","rawMaterials","showInputSuppliers","inputSuppliers","landAndBuildings","showLandBuildingFeatures","landBuildingFeatures","priorPrBusiness","financialHistory","previousTaxIncentiveGrant","predecessorExemptBusiness","showPredecessorProduction","predecessorProduction","employeeEducation","scientificRnd","showRndSpecializations","rndSpecializations","marketingOutlets","backgroundInformation","leadSourceInformation","rndInformation","showRndSubcontractors","rndSubcontractors","documents","otherDocuments"]},"Act60NaicsCodeEntity":{"type":"object","properties":{"code":{"type":"string"},"title":{"type":"string"}},"required":["code","title"]},"Act60ExportGeneralInfoDto":{"type":"object","properties":{"registrationLocations":{"type":"array","items":{"$ref":"#/components/schemas/ProspectRegistrationLocation"}},"registrationState":{"example":"DE","description":"The registration follow-up for US mainland: a USPS state code.","anyOf":[{"$ref":"#/components/schemas/UsStateCode"},{"type":"null"}]},"registrationCountry":{"example":"CA","description":"ISO 3166-1 alpha-2 country code. Excludes \"US\" and \"PR\", which this app treats as domestic.","anyOf":[{"$ref":"#/components/schemas/ForeignCountryCode"},{"type":"null"}]},"isAuthorizedToOperateInPr":{"type":["boolean","null"],"description":"The registration follow-up, asked when the business is registered in the United States or Internationally and not in Puerto Rico. Yes asks the Department of State registration."},"dosRegistrationNumber":{"type":["string","null"],"description":"Asked when registered in Puerto Rico, or authorized to operate there."},"dosRegistrationDate":{"type":["string","null"],"example":"2019-03-14","description":"Asked when registered in Puerto Rico, or authorized to operate there."},"isOperatingInPr":{"type":"boolean"},"commencementOfOperationsDate":{"type":["string","null"],"example":"2019-03-14","description":"Asked when the business operates in Puerto Rico."},"taxationMethod":{"allOf":[{"$ref":"#/components/schemas/TaxationMethod"}]},"otherTaxationMethod":{"type":["string","null"]},"isSubsidiary":{"type":["boolean","null"],"description":"ES8; a submit with it blank is refused."}},"required":["registrationLocations","isOperatingInPr","taxationMethod"]},"ExportDocumentCategory":{"type":"string","enum":["act60_all_concepts_debt_certificate","act60_certificate_of_filing_income_tax","act60_certificate_of_good_standing","act60_certificate_of_registry","act60_certified_financial_statements","act60_criminal_record","act60_debt_certificate_social_security_chauffeurs","act60_debt_certificate_unemployment_disability","act60_employer_identification_number_letter","act60_merchants_registration_certificate","act60_negative_debt_certificate_treasury","act60_negative_debt_certificate_state_insurance","act60_entity_organizational_chart","act60_resume_or_curriculum_vitae","act60_commercial_reference","act60_other","act60_export_ownership_chart","act60_export_professionals_registry","act60_export_disclosure_tax_investigation","act60_export_disclosure_conviction","act60_export_disclosure_arrest_or_summons","act60_export_disclosure_business_prohibition","act60_export_base_period_income_support","act60_export_background_support"]},"Act60DocumentFileNameDto":{"type":"object","properties":{"storageKey":{"type":"string"},"name":{"type":"string","description":"The file's new name. Its extension is kept: appended unless the name already ends with it or another spelling of it (.jpg for .jpeg). At most 200 characters with the extension."}},"required":["storageKey","name"]},"Act60ExportDocumentDto":{"type":"object","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/ExportDocumentCategory"}]},"storageKeys":{"type":"array","items":{"type":"string"}},"description":{"type":["string","null"],"description":"Omitted leaves the caption as it is; null clears it."},"fileNames":{"description":"The files renamed in this submit, one name each (up to 5); a file left out keeps its name. A file listed under two documents takes the same name in both.","type":"array","items":{"$ref":"#/components/schemas/Act60DocumentFileNameDto"}}},"required":["category","storageKeys"]},"Act60ScreeningExportActivity":{"type":"string","enum":["research_development","advertising_pr","consulting","business_industry_advisory","creative_industries","architecture_engineering_pm","professional_services","centralized_management_hq","electronic_data_processing","software_development","software_distribution_licensing","telecommunications","call_centers","shared_service_centers","education_training","healthcare_laboratory","investment_banking_financial","marketing_centers","export_trade","promoter_services","other"]},"Act60ExportActivitySubType":{"type":"string","enum":["consulting_auditing","consulting_computer","consulting_economic","consulting_environmental","consulting_human_resources","consulting_managerial","consulting_marketing","consulting_scientific","consulting_technological","consulting_other","professional_accounting","professional_legal","professional_tax","professional_other","financial_alternative_investment_management","financial_asset_management","financial_private_capital_management","financial_hedge_fund_management","financial_capital_pool_management","financial_trust_securitization_management","financial_escrow_account_management","financial_other","export_trade_assembly_bottling_packaging","export_trade_commercial_distribution","export_trade_sales_commissions","export_trade_sale_of_pr_products","export_trade_intangible_products","export_trade_resale_to_foreign_persons","export_trade_storage_and_distribution_hubs","export_trade_other"],"description":"Only the four sub-divided activities take a sub-category; the submit rules refuse one that does not belong to the activity."},"Act60ExportActivityDto":{"type":"object","properties":{"id":{"type":"string"},"activityType":{"allOf":[{"$ref":"#/components/schemas/Act60ScreeningExportActivity"}]},"otherActivityName":{"type":["string","null"],"description":"The name of an activity outside the catalogue; read only for `other`."},"subType":{"description":"Only the four sub-divided activities take a sub-category; the submit rules refuse one that does not belong to the activity.","anyOf":[{"$ref":"#/components/schemas/Act60ExportActivitySubType"},{"type":"null"}]},"percentOfBusiness":{"type":"number","example":50},"description":{"type":"string","example":"Operational and strategy consulting for U.S. mainland clients."},"naicsCode":{"type":"string","example":"332119","description":"Six-digit NAICS industry code."},"supportingDocumentStorageKeys":{"description":"The optional Documents column.","type":"array","items":{"type":"string"}}},"required":["activityType","percentOfBusiness","description","naicsCode"]},"Act60ExportEmploymentYear":{"type":"string","enum":["current_year","year_1","year_2","year_3"],"description":"The current year, or the first, second or third year after it."},"Act60ExportEmploymentYearDto":{"type":"object","properties":{"year":{"description":"The current year, or the first, second or third year after it.","allOf":[{"$ref":"#/components/schemas/Act60ExportEmploymentYear"}]},"fteEligible":{"type":"number","minimum":0,"maximum":3000000,"example":12,"description":"ES12"},"fteNonEligible":{"type":"number","minimum":0,"maximum":3000000,"example":3,"description":"ES13"},"payrollEligible":{"type":"number","example":840000,"description":"ES15"},"payrollNonEligible":{"type":"number","example":150000,"description":"ES16"},"payrollClerical":{"type":"number","example":120000,"description":"ES18 Clerical"},"payrollTechnical":{"type":"number","example":520000,"description":"ES18 Technical"},"payrollManagement":{"type":"number","example":350000,"description":"ES18 Management"}},"required":["year","fteEligible","fteNonEligible","payrollEligible","payrollNonEligible","payrollClerical","payrollTechnical","payrollManagement"]},"Act60ExportEmploymentDto":{"type":"object","properties":{"years":{"description":"Exactly one row per year: the current year and the next three.","type":"array","items":{"$ref":"#/components/schemas/Act60ExportEmploymentYearDto"}},"nonPrResidentsCount":{"type":"number","minimum":0,"maximum":3000000,"example":2,"description":"ES19"},"shareholderPositionsCount":{"type":"number","minimum":0,"maximum":3000000,"example":1,"description":"ES20"}},"required":["years","nonPrResidentsCount","shareholderPositionsCount"]},"Act60ExportInvestmentType":{"type":"string","enum":["buildings","machinery_equipment","land","other"]},"Act60ExportInvestmentItemDto":{"type":"object","properties":{"investmentType":{"allOf":[{"$ref":"#/components/schemas/Act60ExportInvestmentType"}]},"initialInvestment":{"type":"number","example":75000},"plannedExpansion":{"type":"number","example":25000}},"required":["investmentType","initialInvestment","plannedExpansion"]},"Act60ExportInvestmentDto":{"type":"object","properties":{"hasInitialInvestment":{"type":"boolean","description":"ES21"},"items":{"description":"ES22: one row per investment type when ES21 is Yes.","type":"array","items":{"$ref":"#/components/schemas/Act60ExportInvestmentItemDto"}},"commencementDate":{"type":["string","null"],"example":"2026-01-15","description":"ES24"},"completionDate":{"type":["string","null"],"example":"2027-06-30","description":"ES25, on or after ES24."}},"required":["hasInitialInvestment","items"]},"Act60ExportProjectionForecastYear":{"type":"string","enum":["year_1","year_2","year_3"],"description":"One of the three years after the current one."},"Act60ExportFinancialProjectionDto":{"type":"object","properties":{"year":{"description":"One of the three years after the current one.","allOf":[{"$ref":"#/components/schemas/Act60ExportProjectionForecastYear"}]},"isEligible":{"type":"boolean","description":"ES26 (export activities) when true, ES27 when false."},"revenues":{"type":"number","example":1200000},"expenses":{"type":"number","example":800000},"netIncome":{"type":"number","example":400000},"incomeTax":{"type":"number","example":40000},"payroll":{"type":"number","example":500000}},"required":["year","isEligible","revenues","expenses","netIncome","incomeTax","payroll"]},"Act60ExportBasePeriodIncomeDto":{"type":"object","properties":{"yearIndex":{"type":"number","example":1},"netIncome":{"type":"number","example":250000}},"required":["yearIndex","netIncome"]},"Act60ExportPriorGrantDto":{"type":"object","properties":{"id":{"type":"string"},"recipientName":{"type":"string"},"grantNumber":{"type":"string"},"isInEffect":{"type":"boolean"}},"required":["recipientName","grantNumber","isInEffect"]},"Act60ExportAdditionalInfoDto":{"type":"object","properties":{"hasBasePeriod":{"type":"boolean","description":"ES28"},"basePeriodCommencementDate":{"type":["string","null"],"example":"2021-03-01","description":"ES29"},"affiliatedEntityNames":{"type":["string","null"],"description":"ES30"},"basePeriodIncomes":{"description":"ES31: the three previous years when ES28 is Yes.","type":"array","items":{"$ref":"#/components/schemas/Act60ExportBasePeriodIncomeDto"}},"hasPriorGrant":{"type":"boolean","description":"ES34"},"priorGrants":{"description":"ES35: at least one grant when ES34 is Yes.","type":"array","items":{"$ref":"#/components/schemas/Act60ExportPriorGrantDto"}}},"required":["hasBasePeriod","basePeriodIncomes","hasPriorGrant","priorGrants"]},"Act60ExportRndDto":{"type":"object","properties":{"performsRnd":{"description":"Whether the business performs R&D in Puerto Rico.","allOf":[{"$ref":"#/components/schemas/Act60RndAnswer"}]},"jobsCreated":{"type":["number","null"],"minimum":0,"maximum":2147483647,"description":"Jobs the R&D activity creates."},"capitalInvestment":{"type":["number","null"],"description":"Capital invested in the R&D activity."},"localPurchases":{"type":["number","null"],"description":"Local purchases of the R&D activity."},"taxableIncomeContributions":{"type":["number","null"],"description":"Taxable income contributions of the R&D activity."},"foreignSales":{"type":["number","null"],"description":"Foreign sales of the R&D activity."},"subcontractors":{"description":"The subcontracted local providers; may stay empty when the business performs R&D.","type":"array","items":{"$ref":"#/components/schemas/Act60DecreeRndSubcontractorDto"}},"hasMarketedRndProduct":{"type":["boolean","null"],"description":"Whether an R&D product reached the market; optional."}},"required":["performsRnd","subcontractors"]},"Act60ExportBackgroundDto":{"type":"object","properties":{"hasTaxInvestigationOrPaymentPlan":{"type":"boolean","description":"The tax investigation or payment plan disclosure."},"hasConviction":{"type":"boolean","description":"The conviction disclosure."},"hasArrestOrSummons":{"type":"boolean","description":"The arrest or summons disclosure."},"hasBusinessProhibition":{"type":"boolean","description":"The business prohibition disclosure."}},"required":["hasTaxInvestigationOrPaymentPlan","hasConviction","hasArrestOrSummons","hasBusinessProhibition"]},"Act60SubmitExportDto":{"type":"object","properties":{"generalInfo":{"$ref":"#/components/schemas/Act60ExportGeneralInfoDto"},"owners":{"description":"ES9: 1 to 20 owners. Replaces the product's owners; a non-amendment submit also writes them to the Business Profile when they total 100%, or when the profile's owners under 10% make up the rest (those stay beside them), with the parent mark (where it is asked) and the ultimate owners, but not the birth details.","type":"array","items":{"$ref":"#/components/schemas/Act60DecreeOwnerDto"}},"documents":{"description":"ES10, ES33 and ES50, one entry per category.","type":"array","items":{"$ref":"#/components/schemas/Act60ExportDocumentDto"}},"activities":{"description":"ES11: each catalogue activity once, and any the client names (other), each name once.","type":"array","items":{"$ref":"#/components/schemas/Act60ExportActivityDto"}},"employment":{"$ref":"#/components/schemas/Act60ExportEmploymentDto"},"investment":{"$ref":"#/components/schemas/Act60ExportInvestmentDto"},"projections":{"description":"ES26 and ES27: the next three years of each.","type":"array","items":{"$ref":"#/components/schemas/Act60ExportFinancialProjectionDto"}},"additionalInfo":{"$ref":"#/components/schemas/Act60ExportAdditionalInfoDto"},"rnd":{"$ref":"#/components/schemas/Act60ExportRndDto"},"background":{"$ref":"#/components/schemas/Act60ExportBackgroundDto"}},"required":["generalInfo","owners","documents","activities","employment","investment","projections","additionalInfo","rnd","background"]},"Act60ExportGeneralInfoEntity":{"type":"object","properties":{"registrationLocations":{"type":"array","items":{"$ref":"#/components/schemas/ProspectRegistrationLocation"}},"registrationState":{"type":["string","null"]},"registrationCountry":{"type":["string","null"]},"isAuthorizedToOperateInPr":{"type":["boolean","null"]},"dosRegistrationNumber":{"type":["string","null"]},"dosRegistrationDate":{"format":"date-time","type":["string","null"]},"isOperatingInPr":{"type":["boolean","null"]},"commencementOfOperationsDate":{"format":"date-time","type":["string","null"]},"taxationMethod":{"allOf":[{"$ref":"#/components/schemas/TaxationMethod"}]},"otherTaxationMethod":{"type":["string","null"]},"isSubsidiary":{"type":["boolean","null"]}},"required":["registrationLocations","registrationState","registrationCountry","isAuthorizedToOperateInPr","dosRegistrationNumber","dosRegistrationDate","isOperatingInPr","commencementOfOperationsDate","taxationMethod","otherTaxationMethod","isSubsidiary"]},"Act60ExportActivityEntity":{"type":"object","properties":{"id":{"type":"string"},"activityType":{"allOf":[{"$ref":"#/components/schemas/Act60ScreeningExportActivity"}]},"otherActivityName":{"type":["string","null"]},"subType":{"anyOf":[{"$ref":"#/components/schemas/Act60ExportActivitySubType"},{"type":"null"}]},"percentOfBusiness":{"type":"number"},"description":{"type":"string"},"naicsCode":{"type":"string"},"supportingDocuments":{"type":"array","items":{"$ref":"#/components/schemas/FileUploadResultEntity"}}},"required":["id","activityType","otherActivityName","subType","percentOfBusiness","description","naicsCode","supportingDocuments"]},"Act60ExportEmploymentYearEntity":{"type":"object","properties":{"id":{"type":"string"},"year":{"allOf":[{"$ref":"#/components/schemas/Act60ExportEmploymentYear"}]},"fteEligible":{"type":"number"},"fteNonEligible":{"type":"number"},"payrollEligible":{"type":"number"},"payrollNonEligible":{"type":"number"},"payrollClerical":{"type":"number"},"payrollTechnical":{"type":"number"},"payrollManagement":{"type":"number"}},"required":["id","year","fteEligible","fteNonEligible","payrollEligible","payrollNonEligible","payrollClerical","payrollTechnical","payrollManagement"]},"Act60ExportEmploymentEntity":{"type":"object","properties":{"years":{"type":"array","items":{"$ref":"#/components/schemas/Act60ExportEmploymentYearEntity"}},"nonPrResidentsCount":{"type":"number"},"shareholderPositionsCount":{"type":"number"}},"required":["years","nonPrResidentsCount","shareholderPositionsCount"]},"Act60ExportInvestmentItemEntity":{"type":"object","properties":{"id":{"type":"string"},"investmentType":{"allOf":[{"$ref":"#/components/schemas/Act60ExportInvestmentType"}]},"initialInvestment":{"type":["number","null"]},"plannedExpansion":{"type":["number","null"]}},"required":["id","investmentType","initialInvestment","plannedExpansion"]},"Act60ExportInvestmentEntity":{"type":"object","properties":{"hasInitialInvestment":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Act60ExportInvestmentItemEntity"}},"commencementDate":{"format":"date-time","type":["string","null"]},"completionDate":{"format":"date-time","type":["string","null"]}},"required":["hasInitialInvestment","items","commencementDate","completionDate"]},"Act60ExportFinancialProjectionEntity":{"type":"object","properties":{"id":{"type":"string"},"year":{"allOf":[{"$ref":"#/components/schemas/Act60ExportProjectionForecastYear"}]},"isEligible":{"type":"boolean"},"revenues":{"type":"number"},"expenses":{"type":"number"},"netIncome":{"type":"number"},"incomeTax":{"type":"number"},"payroll":{"type":"number"}},"required":["id","year","isEligible","revenues","expenses","netIncome","incomeTax","payroll"]},"Act60ExportBasePeriodIncomeEntity":{"type":"object","properties":{"id":{"type":"string"},"yearIndex":{"type":"number","description":"1 is the oldest of the three."},"netIncome":{"type":"number"}},"required":["id","yearIndex","netIncome"]},"Act60ExportPriorGrantEntity":{"type":"object","properties":{"id":{"type":"string"},"recipientName":{"type":"string"},"grantNumber":{"type":"string"},"isInEffect":{"type":"boolean"}},"required":["id","recipientName","grantNumber","isInEffect"]},"Act60ExportAdditionalInfoEntity":{"type":"object","properties":{"hasBasePeriod":{"type":"boolean"},"basePeriodCommencementDate":{"format":"date-time","type":["string","null"]},"affiliatedEntityNames":{"type":["string","null"]},"basePeriodIncomes":{"type":"array","items":{"$ref":"#/components/schemas/Act60ExportBasePeriodIncomeEntity"}},"hasPriorGrant":{"type":"boolean"},"priorGrants":{"type":"array","items":{"$ref":"#/components/schemas/Act60ExportPriorGrantEntity"}}},"required":["hasBasePeriod","basePeriodCommencementDate","affiliatedEntityNames","basePeriodIncomes","hasPriorGrant","priorGrants"]},"Act60ExportRndSubcontractorEntity":{"type":"object","properties":{"id":{"type":"string"},"providerName":{"type":"string"},"serviceDescription":{"type":["string","null"]},"annualCost":{"type":["number","null"]}},"required":["id","providerName","serviceDescription","annualCost"]},"Act60ExportRndEntity":{"type":"object","properties":{"performsRnd":{"anyOf":[{"$ref":"#/components/schemas/Act60RndAnswer"},{"type":"null"}]},"jobsCreated":{"type":["number","null"]},"capitalInvestment":{"type":["number","null"]},"localPurchases":{"type":["number","null"]},"taxableIncomeContributions":{"type":["number","null"]},"foreignSales":{"type":["number","null"]},"subcontractors":{"type":"array","items":{"$ref":"#/components/schemas/Act60ExportRndSubcontractorEntity"}},"hasMarketedRndProduct":{"type":["boolean","null"]}},"required":["performsRnd","jobsCreated","capitalInvestment","localPurchases","taxableIncomeContributions","foreignSales","subcontractors","hasMarketedRndProduct"]},"Act60ExportBackgroundEntity":{"type":"object","properties":{"hasTaxInvestigationOrPaymentPlan":{"type":"boolean"},"hasConviction":{"type":"boolean"},"hasArrestOrSummons":{"type":"boolean"},"hasBusinessProhibition":{"type":"boolean"}},"required":["hasTaxInvestigationOrPaymentPlan","hasConviction","hasArrestOrSummons","hasBusinessProhibition"]},"Act60ExportDataEntity":{"type":"object","properties":{"generalInfo":{"$ref":"#/components/schemas/Act60ExportGeneralInfoEntity"},"owners":{"type":"array","items":{"$ref":"#/components/schemas/Act60DecreeOwnerEntity"}},"documents":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}},"otherDocuments":{"description":"An earlier form's named other documents, which ES10.17 lists; the submit leaves them as they are.","type":"array","items":{"$ref":"#/components/schemas/ProductDocumentSectionDto"}},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Act60ExportActivityEntity"}},"employment":{"$ref":"#/components/schemas/Act60ExportEmploymentEntity"},"investment":{"$ref":"#/components/schemas/Act60ExportInvestmentEntity"},"projections":{"type":"array","items":{"$ref":"#/components/schemas/Act60ExportFinancialProjectionEntity"}},"additionalInfo":{"$ref":"#/components/schemas/Act60ExportAdditionalInfoEntity"},"rnd":{"$ref":"#/components/schemas/Act60ExportRndEntity"},"background":{"$ref":"#/components/schemas/Act60ExportBackgroundEntity"}},"required":["generalInfo","owners","documents","otherDocuments","activities","employment","investment","projections","additionalInfo","rnd","background"]},"Act60ExportEntity":{"type":"object","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/OrgProductStatus"}]},"clientStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentClientStatus"},{"type":"null"}]},"locked":{"type":"boolean"},"id":{"type":["string","null"]},"orgProductId":{"type":"string"},"data":{"anyOf":[{"$ref":"#/components/schemas/Act60ExportDataEntity"},{"type":"null"}]},"submittedAt":{"format":"date-time","type":["string","null"]},"submittedById":{"type":["string","null"]},"updatedAt":{"format":"date-time","type":["string","null"]}},"required":["status","clientStatus","locked","id","orgProductId","data","submittedAt","submittedById","updatedAt"]},"Act60ExportPrefillDto":{"type":"object","properties":{"registrationLocations":{"type":"array","items":{"$ref":"#/components/schemas/ProspectRegistrationLocation"}},"registrationState":{"type":["string","null"]},"registrationCountry":{"type":["string","null"]},"dosRegistrationNumber":{"type":["string","null"],"description":"ES2 (BP7)"},"dosRegistrationDate":{"format":"date-time","type":["string","null"],"description":"ES3 (BP8)"},"isOperatingInPr":{"type":["boolean","null"],"description":"ES4 (BP9)"},"commencementOfOperationsDate":{"format":"date-time","type":["string","null"],"description":"ES5 (BP10)"},"taxationMethod":{"anyOf":[{"$ref":"#/components/schemas/TaxationMethod"},{"type":"null"}]},"otherTaxationMethod":{"type":["string","null"]},"isSubsidiary":{"type":["boolean","null"],"description":"ES8 (BP15)"},"owners":{"description":"ES9 (BP17).","type":"array","items":{"$ref":"#/components/schemas/Act60DecreeOwnerPrefillEntity"}},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Act60ScreeningExportActivity"}},"otherActivity":{"type":["string","null"],"description":"IA18's Other text, which ES11 opens as a named activity."},"performsRnd":{"anyOf":[{"$ref":"#/components/schemas/Act60RndAnswer"},{"type":"null"}]}},"required":["registrationLocations","registrationState","registrationCountry","dosRegistrationNumber","dosRegistrationDate","isOperatingInPr","commencementOfOperationsDate","taxationMethod","otherTaxationMethod","isSubsidiary","owners","activities","otherActivity","performsRnd"]},"Act60ExportCompanyInformationSection":{"type":"object","properties":{"companyName":{"type":"string"},"tradeName":{"type":"string"},"companyEmail":{"type":"string"},"companyPhoneNumber":{"type":"string"},"companyFax":{"type":"string"},"companyWebsite":{"type":"string"},"ein":{"type":"string"}},"required":["companyName","tradeName","companyEmail","companyPhoneNumber","companyFax","companyWebsite","ein"]},"Act60ExportRepresentativeSection":{"type":"object","properties":{"representativeName":{"type":"string"},"representativeEmail":{"type":"string"},"representativePhoneNumber":{"type":"string"},"contactRelation":{"type":"string"},"contactName":{"type":"string"},"contactEmail":{"type":"string"}},"required":["representativeName","representativeEmail","representativePhoneNumber","contactRelation","contactName","contactEmail"]},"Act60ExportBusinessOrganizationSection":{"type":"object","properties":{"showOtherOrganizationType":{"type":"boolean"},"showOtherTaxationMethod":{"type":"boolean"},"showAuthorizedToOperateInPr":{"type":"boolean"},"organizationType":{"type":"string"},"otherOrganizationType":{"type":"string"},"taxationMethod":{"type":"string"},"otherTaxationMethod":{"type":"string"},"typeOfBusiness":{"type":"string"},"yearsOfOperation":{"type":"string"},"commencementOfOperations":{"type":"string"},"companyRegisterNumber":{"type":"string"},"dateOfRegistry":{"type":"string"},"corporateResidency":{"type":"string"},"organizedUnderState":{"type":"string"},"organizedUnderCountry":{"type":"string"},"authorizedToOperateInPr":{"type":"string"}},"required":["showOtherOrganizationType","showOtherTaxationMethod","showAuthorizedToOperateInPr","organizationType","otherOrganizationType","taxationMethod","otherTaxationMethod","typeOfBusiness","yearsOfOperation","commencementOfOperations","companyRegisterNumber","dateOfRegistry","corporateResidency","organizedUnderState","organizedUnderCountry","authorizedToOperateInPr"]},"Act60ExportParentCompanyRow":{"type":"object","properties":{"name":{"type":"string"},"ownershipPercentage":{"type":"string"},"corporateNumberId":{"type":"string"},"address":{"type":"string"}},"required":["name","ownershipPercentage","corporateNumberId","address"]},"Act60ExportBasePeriodSection":{"type":"object","properties":{"showBasePeriodDetail":{"type":"boolean"},"showSupportingDocuments":{"type":"boolean"},"isPerformingEligibleActivities":{"type":"string"},"commencementOfOperations":{"type":"string"},"affiliatedEntityNames":{"type":"string"},"yearOneNetIncome":{"type":"string"},"yearTwoNetIncome":{"type":"string"},"yearThreeNetIncome":{"type":"string"},"averageNetIncome":{"type":"string"},"supportingDocuments":{"type":"string"}},"required":["showBasePeriodDetail","showSupportingDocuments","isPerformingEligibleActivities","commencementOfOperations","affiliatedEntityNames","yearOneNetIncome","yearTwoNetIncome","yearThreeNetIncome","averageNetIncome","supportingDocuments"]},"Act60ExportPriorGrantRow":{"type":"object","properties":{"businessOrIndividualName":{"type":"string"},"grantNumber":{"type":"string"},"isStillInEffect":{"type":"string"}},"required":["businessOrIndividualName","grantNumber","isStillInEffect"]},"Act60ExportActivityRow":{"type":"object","properties":{"activity":{"type":"string"},"subType":{"type":"string"},"percentOfBusiness":{"type":"string"},"description":{"type":"string"},"naicsCode":{"type":"string"},"supportingDocuments":{"type":"string"}},"required":["activity","subType","percentOfBusiness","description","naicsCode","supportingDocuments"]},"Act60ExportYearGridRow":{"type":"object","properties":{"label":{"type":"string"},"currentYear":{"type":"string"},"firstYear":{"type":"string"},"secondYear":{"type":"string"},"thirdYear":{"type":"string"}},"required":["label","currentYear","firstYear","secondYear","thirdYear"]},"Act60ExportAdditionalEmploymentSection":{"type":"object","properties":{"nonPrResidentsCount":{"type":"string"},"shareholderPositionsCount":{"type":"string"}},"required":["nonPrResidentsCount","shareholderPositionsCount"]},"Act60ExportInvestmentSection":{"type":"object","properties":{"hasInitialInvestment":{"type":"string"},"proposedInitialInvestment":{"type":"string"},"commencementOfInvestment":{"type":"string"},"completionOfInvestment":{"type":"string"}},"required":["hasInitialInvestment","proposedInitialInvestment","commencementOfInvestment","completionOfInvestment"]},"Act60ExportInvestmentItemRow":{"type":"object","properties":{"investmentType":{"type":"string"},"initialInvestment":{"type":"string"},"plannedExpansion":{"type":"string"}},"required":["investmentType","initialInvestment","plannedExpansion"]},"Act60ExportProjectionRow":{"type":"object","properties":{"label":{"type":"string"},"firstYear":{"type":"string"},"secondYear":{"type":"string"},"thirdYear":{"type":"string"}},"required":["label","firstYear","secondYear","thirdYear"]},"Act60ReportRndInformationDto":{"type":"object","properties":{"showRndDetail":{"type":"boolean"},"performsRnd":{"type":"string"},"totalJobsCreated":{"type":"string"},"capitalInvestment":{"type":"string"},"totalLocalPurchases":{"type":"string"},"taxableIncome":{"type":"string"},"foreignSales":{"type":"string"},"subcontractedLocalProviders":{"type":"string"},"hasMarketedRndProduct":{"type":"string"}},"required":["showRndDetail","performsRnd","totalJobsCreated","capitalInvestment","totalLocalPurchases","taxableIncome","foreignSales","subcontractedLocalProviders","hasMarketedRndProduct"]},"Act60ExportReportPreviewDto":{"type":"object","properties":{"companyName":{"type":"string"},"companyInformation":{"anyOf":[{"$ref":"#/components/schemas/Act60ExportCompanyInformationSection"},{"type":"null"}]},"physicalAddress":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportAddressDto"},{"type":"null"}]},"postalAddress":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportAddressDto"},{"type":"null"}]},"representativeAndContact":{"anyOf":[{"$ref":"#/components/schemas/Act60ExportRepresentativeSection"},{"type":"null"}]},"businessOrganization":{"anyOf":[{"$ref":"#/components/schemas/Act60ExportBusinessOrganizationSection"},{"type":"null"}]},"relocation":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportPreviousLocationDto"},{"type":"null"}]},"stockholders":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ReportStockholderRowDto"}},"hasParentCompany":{"type":"string"},"parentCompanies":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ExportParentCompanyRow"}},"basePeriodIncome":{"anyOf":[{"$ref":"#/components/schemas/Act60ExportBasePeriodSection"},{"type":"null"}]},"hasPriorGrant":{"type":"string"},"priorGrants":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ExportPriorGrantRow"}},"eligibleActivities":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ExportActivityRow"}},"totalActivityPercentage":{"type":"string"},"employmentAndPayroll":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ExportYearGridRow"}},"payrollByPosition":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ExportYearGridRow"}},"additionalEmployment":{"anyOf":[{"$ref":"#/components/schemas/Act60ExportAdditionalEmploymentSection"},{"type":"null"}]},"investment":{"anyOf":[{"$ref":"#/components/schemas/Act60ExportInvestmentSection"},{"type":"null"}]},"investmentItems":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ExportInvestmentItemRow"}},"eligibleProjections":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ExportProjectionRow"}},"nonEligibleProjections":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ExportProjectionRow"}},"backgroundInformation":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportBackgroundInformationDto"},{"type":"null"}]},"leadSourceInformation":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportLeadSourceDto"},{"type":"null"}]},"rndInformation":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportRndInformationDto"},{"type":"null"}]},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Act60ReportDocumentDto"}},"otherDocuments":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ReportOtherDocumentDto"}}},"required":["companyName","companyInformation","physicalAddress","postalAddress","representativeAndContact","businessOrganization","relocation","stockholders","hasParentCompany","parentCompanies","basePeriodIncome","hasPriorGrant","priorGrants","eligibleActivities","totalActivityPercentage","employmentAndPayroll","payrollByPosition","additionalEmployment","investment","investmentItems","eligibleProjections","nonEligibleProjections","backgroundInformation","leadSourceInformation","rndInformation","documents","otherDocuments"]},"Act60DecreeRegistrationDto":{"type":"object","properties":{"registrationLocations":{"type":"array","items":{"$ref":"#/components/schemas/ProspectRegistrationLocation"}},"registrationState":{"example":"DE","description":"The registration follow-up for US mainland: a USPS state code.","anyOf":[{"$ref":"#/components/schemas/UsStateCode"},{"type":"null"}]},"registrationCountry":{"example":"CA","description":"ISO 3166-1 alpha-2 country code. Excludes \"US\" and \"PR\", which this app treats as domestic.","anyOf":[{"$ref":"#/components/schemas/ForeignCountryCode"},{"type":"null"}]},"isAuthorizedToOperateInPr":{"type":["boolean","null"],"description":"The registration follow-up, asked when the business is registered in the United States or Internationally and not in Puerto Rico. Yes asks the Department of State registration."},"dosRegistrationNumber":{"type":["string","null"],"description":"Asked when registered in Puerto Rico, or authorized to operate there."},"dosRegistrationDate":{"type":["string","null"],"example":"2019-03-14","description":"Asked when registered in Puerto Rico, or authorized to operate there."},"isOperatingInPr":{"type":"boolean"},"commencementOfOperationsDate":{"type":["string","null"],"example":"2019-03-14","description":"Asked when the business operates in Puerto Rico."},"taxationMethod":{"allOf":[{"$ref":"#/components/schemas/TaxationMethod"}]},"otherTaxationMethod":{"type":["string","null"]}},"required":["registrationLocations","isOperatingInPr","taxationMethod"]},"Act60TourismMajorityOwnerDto":{"type":"object","properties":{"fullName":{"type":["string","null"]},"ssnOrNationalId":{"type":["string","null"],"description":"An SSN or a national ID. Stored encrypted."},"dateOfBirth":{"type":["string","null"],"example":"1971-05-02"},"ownershipPercentage":{"type":["number","null"],"minimum":0.01,"maximum":100,"example":50.5},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"physicalAddress":{"anyOf":[{"$ref":"#/components/schemas/OptionalAddressDto"},{"type":"null"}]},"isPostalSameAsPhysical":{"type":["boolean","null"]},"postalAddress":{"description":"Dropped when the postal address is the physical one.","anyOf":[{"$ref":"#/components/schemas/OptionalAddressDto"},{"type":"null"}]}}},"Act60TourismOwnerDto":{"type":"object","properties":{"id":{"type":"string","description":"Existing row id. Omit to create new."},"ownerType":{"allOf":[{"$ref":"#/components/schemas/OwnerType"}]},"fullName":{"type":"string","example":"Isabel Cruz"},"ownerEmail":{"type":["string","null"]},"ownerPhone":{"type":["string","null"]},"ownershipPercentage":{"type":"number","minimum":0.01,"maximum":100,"example":50.5},"physicalAddress":{"anyOf":[{"$ref":"#/components/schemas/OptionalAddressDto"},{"type":"null"}]},"ssnOrEin":{"type":["string","null"],"description":"SSN for an individual or EIN for an entity, validated by ownerType. Stored encrypted."},"dateOfBirth":{"type":["string","null"],"example":"1984-07-22","description":"An individual’s; dropped for an entity."},"dateOfOrganization":{"type":["string","null"],"example":"2012-01-30","description":"Date of Formation, an entity’s; dropped for an individual."},"isPostalSameAsPhysical":{"type":["boolean","null"]},"postalAddress":{"description":"Dropped when the postal address is the physical one.","anyOf":[{"$ref":"#/components/schemas/OptionalAddressDto"},{"type":"null"}]},"organizationType":{"description":"Company details, an entity’s.","anyOf":[{"$ref":"#/components/schemas/OrganizationType"},{"type":"null"}]},"otherOrganizationType":{"type":["string","null"],"description":"Asked when organizationType is other."},"organizedUnderLaws":{"type":["string","null"],"description":"The state or country whose laws the company was formed under."},"isPubliclyTraded":{"type":["boolean","null"]},"majorityOwner":{"description":"Asked of an entity that is not publicly traded; dropped otherwise.","anyOf":[{"$ref":"#/components/schemas/Act60TourismMajorityOwnerDto"},{"type":"null"}]}},"required":["ownerType","fullName","ownershipPercentage"]},"Act60TourismSignerIdKind":{"type":"string","enum":["ssn","national_id"],"description":"TU22: which number `idNumber` is."},"Act60TourismSignerDto":{"type":"object","properties":{"signerContactId":{"type":["string","null"],"description":"TU16: one of the Business Profile's named Points of Contact. Submit refuses none while the profile names a contact, and takes none when it names none."},"fullName":{"type":"string","example":"Ana Rivera","description":"TU17"},"title":{"type":"string","example":"President","description":"TU18"},"email":{"type":"string","description":"TU19"},"phone":{"type":"string","description":"TU20"},"idKind":{"description":"TU22: which number `idNumber` is.","allOf":[{"$ref":"#/components/schemas/Act60TourismSignerIdKind"}]},"idNumber":{"type":"string","description":"TU22: an SSN as XXX-XX-XXXX, or a national ID number. Stored encrypted."},"physicalAddress":{"description":"TU24","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"isPostalSameAsPhysical":{"type":"boolean","description":"TU25"},"postalAddress":{"description":"TU26, asked unless TU25 is ticked.","anyOf":[{"$ref":"#/components/schemas/AddressDto"},{"type":"null"}]}},"required":["fullName","title","email","phone","idKind","idNumber","physicalAddress","isPostalSameAsPhysical"]},"Act60TourismProjectSubType":{"type":"string","enum":["agro_lodge","agrotourism","bed_and_breakfast","condo_hotel","esports_fantasy_leagues","golf_course","guest_house","hostelry_15_or_less","hostelry_more_than_15","leasing_property","posadas_de_puerto_rico","medical_tourism","nautical_tourism","puerto_rican_parador","sustainable_ecotourism","theme_park","timeshares_vacation_club","tourist_marina","other"],"description":"TU33"},"Act60TourismProjectDto":{"type":"object","properties":{"commercialName":{"type":"string","example":"Palma Beach Hotel","description":"TU10 Commercial or Hotel Name."},"projectTypes":{"type":"array","description":"TU32: every category that applies.","items":{"$ref":"#/components/schemas/Act60ScreeningTourismProjectType"}},"projectTypeOther":{"type":["string","null"],"description":"TU32 Other."},"projectSubType":{"description":"TU33","allOf":[{"$ref":"#/components/schemas/Act60TourismProjectSubType"}]},"projectSubTypeOther":{"type":["string","null"],"description":"TU33 Other."},"guestRoomCount":{"type":["number","null"],"minimum":0,"maximum":10000,"description":"TU34, asked of the TU33 options that let rooms."},"hasCasino":{"type":["boolean","null"],"description":"TU35, asked of a hostelry with more than 15 rooms."},"golfCourseOperator":{"type":["string","null"],"description":"TU36"},"golfCourseHoles":{"type":["number","null"],"minimum":1,"maximum":99,"description":"TU37"},"condoHotelOperator":{"type":["string","null"],"description":"TU38"},"hotelDeveloper":{"type":["string","null"],"description":"TU39"},"hotelOperator":{"type":["string","null"],"description":"TU40"},"hotelAdministrator":{"type":["string","null"],"description":"TU41"},"projectDescription":{"type":"string","minLength":50,"maxLength":1000,"description":"TU42"},"projectLocation":{"type":"string","example":"Calle Sol 10, Viejo San Juan","description":"TU43 Project Location: where the project is, on one line."},"propertyCadastralNumber":{"type":"string","example":"040-000-001-01","description":"TU44 Property Catastro Number."},"isSellingAlcoholicBeverages":{"type":"boolean","description":"TU46"},"basePeriodIncome":{"type":"number","example":0,"description":"TU47"},"isApplyingForTourismTaxCredits":{"type":"boolean","description":"TU48"}},"required":["commercialName","projectTypes","projectSubType","projectDescription","projectLocation","propertyCadastralNumber","isSellingAlcoholicBeverages","basePeriodIncome","isApplyingForTourismTaxCredits"]},"Act60TourismWorkforceRowDto":{"type":"object","properties":{"prResidents":{"type":"number","minimum":0,"maximum":3000000,"example":12},"nonPrResidents":{"type":"number","minimum":0,"maximum":3000000,"example":3}},"required":["prResidents","nonPrResidents"]},"Act60TourismWorkforceDto":{"type":"object","properties":{"management":{"$ref":"#/components/schemas/Act60TourismWorkforceRowDto"},"administrative":{"$ref":"#/components/schemas/Act60TourismWorkforceRowDto"},"operational":{"$ref":"#/components/schemas/Act60TourismWorkforceRowDto"}},"required":["management","administrative","operational"]},"Act60TourismTeamDto":{"type":"object","properties":{"hasConstruction":{"type":"boolean","description":"TU45"},"constructionWorkforce":{"description":"TU50, asked when TU45 is Yes: every cell, someone in it.","anyOf":[{"$ref":"#/components/schemas/Act60TourismWorkforceDto"},{"type":"null"}]},"operationalWorkforce":{"description":"TU52: every cell, someone in it.","allOf":[{"$ref":"#/components/schemas/Act60TourismWorkforceDto"}]}},"required":["hasConstruction","operationalWorkforce"]},"Act60TourismContractorDto":{"type":"object","properties":{"id":{"type":"string","description":"Existing contractor id. Omit to create new."},"businessName":{"type":"string","example":"Caribe Construction Inc."},"idNumber":{"type":"string","example":"66-7654321","description":"EIN, SSN or national identification number."},"workDescription":{"type":"string"},"contractTermYears":{"type":"number","example":2.5}},"required":["businessName","idNumber","workDescription","contractTermYears"]},"Act60TourismLocalCommitmentsDto":{"type":"object","properties":{"designPlanificationNarrative":{"type":"string","minLength":50,"maxLength":1000,"description":"TU54"},"localMaterialsNarrative":{"type":"string","minLength":50,"maxLength":1000,"description":"TU55"},"localAgriculturalNarrative":{"type":"string","minLength":50,"maxLength":1000,"description":"TU56"},"localProfessionalServicesNarrative":{"type":"string","minLength":50,"maxLength":1000,"description":"TU57"},"localFinancialInstitutionsNarrative":{"type":"string","minLength":50,"maxLength":1000,"description":"TU58"},"contractors":{"description":"TU59: at least one.","type":"array","items":{"$ref":"#/components/schemas/Act60TourismContractorDto"}},"constructionStartDate":{"type":["string","null"],"example":"2027-01-15","description":"TU60, asked when TU45 is Yes; may be in the future."},"operationStartDate":{"type":"string","example":"2027-09-01","description":"TU61; may be in the future."}},"required":["designPlanificationNarrative","localMaterialsNarrative","localAgriculturalNarrative","localProfessionalServicesNarrative","localFinancialInstitutionsNarrative","contractors","operationStartDate"]},"Act60TourismPriorDecreeType":{"type":"string","enum":["act_60","act_73","act_20","act_83","act_74","other"],"description":"TU65"},"Act60TourismPriorActivityDto":{"type":"object","properties":{"isCurrentlyOperatingInPr":{"type":"boolean","description":"TU62"},"hasPriorTaxIncentiveGrant":{"type":"boolean","description":"TU63"},"priorDecreeNumber":{"type":["string","null"],"example":"2019-TU-123","description":"TU64"},"priorDecreeType":{"description":"TU65","anyOf":[{"$ref":"#/components/schemas/Act60TourismPriorDecreeType"},{"type":"null"}]},"priorDecreeTypeOther":{"type":["string","null"],"description":"TU65 Other."},"isPriorDecreeInEffect":{"type":["boolean","null"],"description":"TU66"}},"required":["isCurrentlyOperatingInPr","hasPriorTaxIncentiveGrant"]},"TourismDocumentCategory":{"type":"string","enum":["act60_all_concepts_debt_certificate","act60_certificate_of_filing_income_tax","act60_certificate_of_good_standing","act60_certificate_of_registry","act60_certified_financial_statements","act60_criminal_record","act60_debt_certificate_social_security_chauffeurs","act60_debt_certificate_unemployment_disability","act60_employer_identification_number_letter","act60_merchants_registration_certificate","act60_negative_debt_certificate_treasury","act60_negative_debt_certificate_state_insurance","act60_entity_organizational_chart","act60_resume_or_curriculum_vitae","act60_commercial_reference","act60_other","act60_tourism_authorization_letter","act60_tourism_certificate_of_formation","act60_tourism_operating_agreements","act60_tourism_pre_application_letter","act60_tourism_endorsement_letter","act60_tourism_previous_concession_copy","act60_tourism_entity_income_tax_returns","act60_tourism_negative_debt_room_tax","act60_tourism_employee_compliance_asume","act60_tourism_detailed_description","act60_tourism_business_plan","act60_tourism_construction_permit","act60_tourism_project_blueprints","act60_tourism_conservation_environmental_plan","act60_tourism_locally_sourced_materials","act60_tourism_local_agricultural_products","act60_tourism_local_professional_services","act60_tourism_contractors_subcontractors","act60_tourism_vendor_contracts","act60_tourism_bank_account_evidence","act60_tourism_marketing_plan","act60_tourism_security_measures_plan","act60_tourism_personnel_training_plan","act60_tourism_ada_accessibility_plan","act60_tourism_sole_permit","act60_tourism_municipal_license","act60_tourism_alcoholic_beverages_license","act60_tourism_hacienda_registration","act60_tourism_public_liability_insurance","act60_tourism_real_personal_property_inventory","act60_tourism_financial_analysis_statement","act60_tourism_negative_debt_treasury","act60_tourism_economic_development_description","act60_tourism_design_planification","act60_tourism_fire_inspection_certificate","act60_tourism_public_establishment_certificate","act60_tourism_casino_license","act60_tourism_casino_endorsement","act60_tourism_golf_course_description","act60_tourism_nautical_permits","act60_tourism_nautical_registration","act60_tourism_nautical_vessel_info","act60_tourism_institutional_sworn_statement","act60_tourism_additional_information","act60_tourism_eligibility_report"]},"Act60TourismDocumentDto":{"type":"object","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/TourismDocumentCategory"}]},"storageKeys":{"type":"array","items":{"type":"string"}},"description":{"type":["string","null"],"description":"Omitted leaves the caption as it is; null clears it."},"fileNames":{"description":"The files renamed in this submit, one name each (up to 5); a file left out keeps its name. A file listed under two documents takes the same name in both.","type":"array","items":{"$ref":"#/components/schemas/Act60DocumentFileNameDto"}}},"required":["category","storageKeys"]},"Act60SubmitTourismDto":{"type":"object","properties":{"registration":{"$ref":"#/components/schemas/Act60DecreeRegistrationDto"},"owners":{"description":"TU9: 1 to 20 owners, each with 10% or more. Replaces the product's owners; a non-amendment submit also writes their shared columns to the Business Profile when they make 100% (with the profile's smaller owners, if need be). The Details stay on the decree.","type":"array","items":{"$ref":"#/components/schemas/Act60TourismOwnerDto"}},"signer":{"$ref":"#/components/schemas/Act60TourismSignerDto"},"project":{"$ref":"#/components/schemas/Act60TourismProjectDto"},"team":{"$ref":"#/components/schemas/Act60TourismTeamDto"},"localCommitments":{"$ref":"#/components/schemas/Act60TourismLocalCommitmentsDto"},"priorActivity":{"$ref":"#/components/schemas/Act60TourismPriorActivityDto"},"documents":{"description":"TU67, one entry per category (max 61).","type":"array","items":{"$ref":"#/components/schemas/Act60TourismDocumentDto"}}},"required":["registration","owners","signer","project","team","localCommitments","priorActivity","documents"]},"Act60DecreeRegistrationEntity":{"type":"object","properties":{"registrationLocations":{"type":"array","items":{"$ref":"#/components/schemas/ProspectRegistrationLocation"}},"registrationState":{"type":["string","null"]},"registrationCountry":{"type":["string","null"]},"isAuthorizedToOperateInPr":{"type":["boolean","null"]},"dosRegistrationNumber":{"type":["string","null"]},"dosRegistrationDate":{"format":"date-time","type":["string","null"]},"isOperatingInPr":{"type":["boolean","null"]},"commencementOfOperationsDate":{"format":"date-time","type":["string","null"]},"taxationMethod":{"anyOf":[{"$ref":"#/components/schemas/TaxationMethod"},{"type":"null"}]},"otherTaxationMethod":{"type":["string","null"]}},"required":["registrationLocations","registrationState","registrationCountry","isAuthorizedToOperateInPr","dosRegistrationNumber","dosRegistrationDate","isOperatingInPr","commencementOfOperationsDate","taxationMethod","otherTaxationMethod"]},"Act60TourismMajorityOwnerEntity":{"type":"object","properties":{"fullName":{"type":["string","null"]},"ssnOrNationalId":{"type":["string","null"]},"dateOfBirth":{"format":"date-time","type":["string","null"]},"ownershipPercentage":{"type":["number","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"isPostalSameAsPhysical":{"type":["boolean","null"]},"postalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"}},"required":["fullName","ssnOrNationalId","dateOfBirth","ownershipPercentage","email","phone","physicalAddress","isPostalSameAsPhysical","postalAddress"]},"Act60TourismOwnerEntity":{"type":"object","properties":{"id":{"type":"string"},"ownerType":{"anyOf":[{"$ref":"#/components/schemas/OwnerType"},{"type":"null"}]},"fullName":{"type":"string"},"ssnOrEin":{"type":["string","null"]},"ownerEmail":{"type":["string","null"]},"ownerPhone":{"type":["string","null"]},"ownershipPercentage":{"type":"number"},"dateOfBirth":{"format":"date-time","type":["string","null"]},"dateOfOrganization":{"format":"date-time","type":["string","null"]},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"isPostalSameAsPhysical":{"type":["boolean","null"]},"postalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"organizationType":{"anyOf":[{"$ref":"#/components/schemas/OrganizationType"},{"type":"null"}]},"otherOrganizationType":{"type":["string","null"]},"organizedUnderLaws":{"type":["string","null"]},"isPubliclyTraded":{"type":["boolean","null"]},"majorityOwner":{"anyOf":[{"$ref":"#/components/schemas/Act60TourismMajorityOwnerEntity"},{"type":"null"}]}},"required":["id","ownerType","fullName","ssnOrEin","ownerEmail","ownerPhone","ownershipPercentage","dateOfBirth","dateOfOrganization","physicalAddress","isPostalSameAsPhysical","postalAddress","organizationType","otherOrganizationType","organizedUnderLaws","isPubliclyTraded","majorityOwner"]},"Act60TourismSignerEntity":{"type":"object","properties":{"signerContactId":{"type":["string","null"]},"fullName":{"type":["string","null"]},"title":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"idKind":{"allOf":[{"$ref":"#/components/schemas/Act60TourismSignerIdKind"}]},"idNumber":{"type":["string","null"]},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"isPostalSameAsPhysical":{"type":["boolean","null"]},"postalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"}},"required":["signerContactId","fullName","title","email","phone","idKind","idNumber","physicalAddress","isPostalSameAsPhysical","postalAddress"]},"Act60TourismProjectEntity":{"type":"object","properties":{"commercialName":{"type":["string","null"],"description":"TU10"},"projectTypes":{"type":"array","items":{"$ref":"#/components/schemas/Act60ScreeningTourismProjectType"}},"projectTypeOther":{"type":["string","null"]},"projectSubType":{"anyOf":[{"$ref":"#/components/schemas/Act60TourismProjectSubType"},{"type":"null"}]},"projectSubTypeOther":{"type":["string","null"]},"guestRoomCount":{"type":["number","null"]},"hasCasino":{"type":["boolean","null"]},"golfCourseOperator":{"type":["string","null"]},"golfCourseHoles":{"type":["number","null"]},"condoHotelOperator":{"type":["string","null"]},"hotelDeveloper":{"type":["string","null"]},"hotelOperator":{"type":["string","null"]},"hotelAdministrator":{"type":["string","null"]},"projectDescription":{"type":["string","null"]},"projectLocation":{"type":["string","null"],"description":"TU43: the stored text, or the earlier form’s project address on one line when the text is blank."},"propertyCadastralNumber":{"type":["string","null"]},"isSellingAlcoholicBeverages":{"type":["boolean","null"]},"basePeriodIncome":{"type":["number","null"]},"isApplyingForTourismTaxCredits":{"type":["boolean","null"]}},"required":["commercialName","projectTypes","projectTypeOther","projectSubType","projectSubTypeOther","guestRoomCount","hasCasino","golfCourseOperator","golfCourseHoles","condoHotelOperator","hotelDeveloper","hotelOperator","hotelAdministrator","projectDescription","projectLocation","propertyCadastralNumber","isSellingAlcoholicBeverages","basePeriodIncome","isApplyingForTourismTaxCredits"]},"Act60TourismWorkforceGridRowDto":{"type":"object","properties":{"prResidents":{"type":"number"},"nonPrResidents":{"type":"number"}},"required":["prResidents","nonPrResidents"]},"Act60TourismWorkforceGridDto":{"type":"object","properties":{"management":{"$ref":"#/components/schemas/Act60TourismWorkforceGridRowDto"},"administrative":{"$ref":"#/components/schemas/Act60TourismWorkforceGridRowDto"},"operational":{"$ref":"#/components/schemas/Act60TourismWorkforceGridRowDto"}},"required":["management","administrative","operational"]},"Act60TourismTeamEntity":{"type":"object","properties":{"hasConstruction":{"type":["boolean","null"]},"constructionWorkforce":{"description":"Null when TU50 was not asked.","anyOf":[{"$ref":"#/components/schemas/Act60TourismWorkforceGridDto"},{"type":"null"}]},"operationalWorkforce":{"$ref":"#/components/schemas/Act60TourismWorkforceGridDto"}},"required":["hasConstruction","constructionWorkforce","operationalWorkforce"]},"Act60TourismContractorEntity":{"type":"object","properties":{"id":{"type":"string"},"businessName":{"type":"string"},"idNumber":{"type":"string"},"workDescription":{"type":"string"},"contractTermYears":{"type":"number"}},"required":["id","businessName","idNumber","workDescription","contractTermYears"]},"Act60TourismLocalCommitmentsEntity":{"type":"object","properties":{"designPlanificationNarrative":{"type":["string","null"]},"localMaterialsNarrative":{"type":["string","null"]},"localAgriculturalNarrative":{"type":["string","null"]},"localProfessionalServicesNarrative":{"type":["string","null"]},"localFinancialInstitutionsNarrative":{"type":["string","null"]},"contractors":{"type":"array","items":{"$ref":"#/components/schemas/Act60TourismContractorEntity"}},"constructionStartDate":{"format":"date-time","type":["string","null"]},"operationStartDate":{"format":"date-time","type":["string","null"]}},"required":["designPlanificationNarrative","localMaterialsNarrative","localAgriculturalNarrative","localProfessionalServicesNarrative","localFinancialInstitutionsNarrative","contractors","constructionStartDate","operationStartDate"]},"Act60TourismPriorActivityEntity":{"type":"object","properties":{"isCurrentlyOperatingInPr":{"type":["boolean","null"]},"hasPriorTaxIncentiveGrant":{"type":["boolean","null"]},"priorDecreeNumber":{"type":["string","null"]},"priorDecreeType":{"description":"An earlier form may hold an act TU65 no longer offers (Act 22).","anyOf":[{"$ref":"#/components/schemas/Act60ExemptionAct"},{"type":"null"}]},"priorDecreeTypeOther":{"type":["string","null"]},"isPriorDecreeInEffect":{"type":["boolean","null"]}},"required":["isCurrentlyOperatingInPr","hasPriorTaxIncentiveGrant","priorDecreeNumber","priorDecreeType","priorDecreeTypeOther","isPriorDecreeInEffect"]},"Act60TourismDataEntity":{"type":"object","properties":{"organizationType":{"description":"The Business Profile's BP13 as it stood at submit, which TU67.6 hangs on.","anyOf":[{"$ref":"#/components/schemas/OrganizationType"},{"type":"null"}]},"registration":{"$ref":"#/components/schemas/Act60DecreeRegistrationEntity"},"owners":{"type":"array","items":{"$ref":"#/components/schemas/Act60TourismOwnerEntity"}},"signer":{"$ref":"#/components/schemas/Act60TourismSignerEntity"},"project":{"$ref":"#/components/schemas/Act60TourismProjectEntity"},"team":{"$ref":"#/components/schemas/Act60TourismTeamEntity"},"localCommitments":{"$ref":"#/components/schemas/Act60TourismLocalCommitmentsEntity"},"priorActivity":{"$ref":"#/components/schemas/Act60TourismPriorActivityEntity"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}},"otherDocuments":{"description":"The earlier form's named other documents, which TU67.54 lists; the submit leaves them as they are.","type":"array","items":{"$ref":"#/components/schemas/ProductDocumentSectionDto"}}},"required":["organizationType","registration","owners","signer","project","team","localCommitments","priorActivity","documents","otherDocuments"]},"Act60TourismEntity":{"type":"object","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/OrgProductStatus"}]},"clientStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentClientStatus"},{"type":"null"}]},"locked":{"type":"boolean"},"id":{"type":["string","null"]},"orgProductId":{"type":"string"},"data":{"anyOf":[{"$ref":"#/components/schemas/Act60TourismDataEntity"},{"type":"null"}]},"submittedAt":{"format":"date-time","type":["string","null"]},"submittedById":{"type":["string","null"]},"updatedAt":{"format":"date-time","type":["string","null"]}},"required":["status","clientStatus","locked","id","orgProductId","data","submittedAt","submittedById","updatedAt"]},"Act60DecreeRegistrationPrefillDto":{"type":"object","properties":{"registrationLocations":{"type":"array","items":{"$ref":"#/components/schemas/ProspectRegistrationLocation"}},"registrationState":{"type":["string","null"]},"registrationCountry":{"type":["string","null"]},"dosRegistrationNumber":{"type":["string","null"],"description":"BP7"},"dosRegistrationDate":{"format":"date-time","type":["string","null"],"description":"BP8"},"isOperatingInPr":{"type":["boolean","null"],"description":"BP9"},"commencementOfOperationsDate":{"format":"date-time","type":["string","null"],"description":"BP10"},"taxationMethod":{"description":"BP14","anyOf":[{"$ref":"#/components/schemas/TaxationMethod"},{"type":"null"}]},"otherTaxationMethod":{"type":["string","null"]}},"required":["registrationLocations","registrationState","registrationCountry","dosRegistrationNumber","dosRegistrationDate","isOperatingInPr","commencementOfOperationsDate","taxationMethod","otherTaxationMethod"]},"Act60ProfileContactDto":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id","fullName","email","phone"]},"Act60TourismPrefillDto":{"type":"object","properties":{"registration":{"$ref":"#/components/schemas/Act60DecreeRegistrationPrefillDto"},"owners":{"description":"TU9 (BP17): every Business Profile owner, so one under 10% shows its warning.","type":"array","items":{"$ref":"#/components/schemas/Act60TourismOwnerEntity"}},"signerContacts":{"description":"TU16's options: every Business Profile contact with a name, in the profile's order. None leaves TU16 unasked: the signer is typed into TU17–TU20.","type":"array","items":{"$ref":"#/components/schemas/Act60ProfileContactDto"}},"commercialName":{"type":["string","null"],"description":"TU10 (BP2)"},"projectTypes":{"type":"array","description":"TU32 (IA20), every choice.","items":{"$ref":"#/components/schemas/Act60ScreeningTourismProjectType"}},"projectTypeOther":{"type":["string","null"],"description":"IA20's Other."},"projectDescription":{"type":["string","null"],"description":"TU42 (IA21)"},"basePeriodIncome":{"type":["number","null"],"description":"TU47: 0 when the business is not operating (BP9 No)."},"isCurrentlyOperatingInPr":{"type":["boolean","null"],"description":"TU62 (BP9)"},"hasPriorTaxIncentiveGrant":{"type":["boolean","null"],"description":"TU63: Yes only when BP22 says a decree was issued and accepted."},"priorDecreeNumber":{"type":["string","null"],"description":"TU64 (BP24)"},"priorDecreeType":{"description":"TU65 (BP23)","anyOf":[{"$ref":"#/components/schemas/Act60TourismPriorDecreeType"},{"type":"null"}]},"entityType":{"description":"BP13, which TU67.6 hangs on.","anyOf":[{"$ref":"#/components/schemas/OrganizationType"},{"type":"null"}]}},"required":["registration","owners","signerContacts","commercialName","projectTypes","projectTypeOther","projectDescription","basePeriodIncome","isCurrentlyOperatingInPr","hasPriorTaxIncentiveGrant","priorDecreeNumber","priorDecreeType","entityType"]},"Act60TourismAuthorizedOfficerSection":{"type":"object","properties":{"showSocialSecurityNumber":{"type":"boolean"},"showNationalIdNumber":{"type":"boolean"},"fullName":{"type":"string"},"socialSecurityNumber":{"type":"string"},"nationalIdNumber":{"type":"string"},"phoneNumber":{"type":"string"},"email":{"type":"string"}},"required":["showSocialSecurityNumber","showNationalIdNumber","fullName","socialSecurityNumber","nationalIdNumber","phoneNumber","email"]},"Act60TourismBusinessOrganizationSection":{"type":"object","properties":{"showHotelRoles":{"type":"boolean"},"showTaxExemptionDecreeNumber":{"type":"boolean"},"legalName":{"type":"string"},"commercialName":{"type":"string"},"hotelDeveloper":{"type":"string"},"hotelOperator":{"type":"string"},"hotelAdministrator":{"type":"string"},"organizationDateAndRegistrationNumber":{"type":"string"},"ein":{"type":"string"},"webpage":{"type":"string"},"basePeriodIncome":{"type":"string"},"businessCategory":{"type":"string"},"organizedUnderTheLawsOf":{"type":"string"},"taxTreatment":{"type":"string"},"taxExemptionDecreeNumber":{"type":"string"},"newApplicationOrAmendment":{"type":"string"},"domesticOrForeign":{"type":"string"}},"required":["showHotelRoles","showTaxExemptionDecreeNumber","legalName","commercialName","hotelDeveloper","hotelOperator","hotelAdministrator","organizationDateAndRegistrationNumber","ein","webpage","basePeriodIncome","businessCategory","organizedUnderTheLawsOf","taxTreatment","taxExemptionDecreeNumber","newApplicationOrAmendment","domesticOrForeign"]},"Act60TourismOwnerRepresentativeSection":{"type":"object","properties":{"name":{"type":"string"},"title":{"type":"string"},"phoneNumber":{"type":"string"}},"required":["name","title","phoneNumber"]},"Act60ReportAssociateRowDto":{"type":"object","properties":{"partnerName":{"type":"string"},"taxId":{"type":"string"},"birthdateOrOrganizationDate":{"type":"string"},"participationPercentage":{"type":"string"},"address":{"type":"string"}},"required":["partnerName","taxId","birthdateOrOrganizationDate","participationPercentage","address"]},"Act60TourismActivityDetailsSection":{"type":"object","properties":{"showGuestRoomCount":{"type":"boolean"},"showActivityTypeOther":{"type":"boolean"},"showSpecifiedCategoryOther":{"type":"boolean"},"showGolfCourseFields":{"type":"boolean"},"showCondoHotelOperator":{"type":"boolean"},"showCasino":{"type":"boolean"},"roomBand":{"type":"string"},"isApplyingForTaxCredits":{"type":"string"},"activityDescription":{"type":"string"},"activityTypes":{"type":"string"},"activityTypeOther":{"type":"string"},"specifiedCategory":{"type":"string"},"specifiedCategoryOther":{"type":"string"},"golfCourseOperator":{"type":"string"},"condoHotelOperator":{"type":"string"},"hasCasino":{"type":"string"},"golfCourseHoles":{"type":"string"},"guestRoomCount":{"type":"string"},"activityLocation":{"type":"string"},"propertyCadastralNumber":{"type":"string"}},"required":["showGuestRoomCount","showActivityTypeOther","showSpecifiedCategoryOther","showGolfCourseFields","showCondoHotelOperator","showCasino","roomBand","isApplyingForTaxCredits","activityDescription","activityTypes","activityTypeOther","specifiedCategory","specifiedCategoryOther","golfCourseOperator","condoHotelOperator","hasCasino","golfCourseHoles","guestRoomCount","activityLocation","propertyCadastralNumber"]},"Act60TourismWorkforceRow":{"type":"object","properties":{"role":{"type":"string"},"prResidents":{"type":"string"},"nonPrResidents":{"type":"string"},"total":{"type":"string"}},"required":["role","prResidents","nonPrResidents","total"]},"Act60TourismEconomicDevelopmentSection":{"type":"object","properties":{"designPlanification":{"type":"string"},"localMaterials":{"type":"string"},"localAgriculturalProducts":{"type":"string"},"localProfessionalServices":{"type":"string"},"localFinancialInstitutions":{"type":"string"}},"required":["designPlanification","localMaterials","localAgriculturalProducts","localProfessionalServices","localFinancialInstitutions"]},"Act60TourismContractorRow":{"type":"object","properties":{"businessName":{"type":"string"},"idNumber":{"type":"string"},"workDescription":{"type":"string"},"contractTermYears":{"type":"string"}},"required":["businessName","idNumber","workDescription","contractTermYears"]},"Act60TourismProjectDatesSection":{"type":"object","properties":{"constructionStartDate":{"type":"string"},"operationStartDate":{"type":"string"}},"required":["constructionStartDate","operationStartDate"]},"Act60TourismPriorOperationsSection":{"type":"object","properties":{"isCurrentlyOperatingInPr":{"type":"string"},"hasPriorTaxIncentiveGrant":{"type":"string"},"priorDecreeType":{"type":"string"}},"required":["isCurrentlyOperatingInPr","hasPriorTaxIncentiveGrant","priorDecreeType"]},"Act60TourismReportPreviewDto":{"type":"object","properties":{"companyName":{"type":"string"},"authorizedOfficer":{"anyOf":[{"$ref":"#/components/schemas/Act60TourismAuthorizedOfficerSection"},{"type":"null"}]},"officerPhysicalAddress":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportAddressDto"},{"type":"null"}]},"officerPostalAddress":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportAddressDto"},{"type":"null"}]},"businessOrganization":{"anyOf":[{"$ref":"#/components/schemas/Act60TourismBusinessOrganizationSection"},{"type":"null"}]},"physicalAddress":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportAddressDto"},{"type":"null"}]},"postalAddress":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportAddressDto"},{"type":"null"}]},"ownerRepresentative":{"anyOf":[{"$ref":"#/components/schemas/Act60TourismOwnerRepresentativeSection"},{"type":"null"}]},"associates":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ReportAssociateRowDto"}},"activityDetails":{"anyOf":[{"$ref":"#/components/schemas/Act60TourismActivityDetailsSection"},{"type":"null"}]},"constructionPhase":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60TourismWorkforceRow"}},"constructionPhaseTotal":{"anyOf":[{"$ref":"#/components/schemas/Act60TourismWorkforceRow"},{"type":"null"}]},"operationalPhase":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60TourismWorkforceRow"}},"operationalPhaseTotal":{"anyOf":[{"$ref":"#/components/schemas/Act60TourismWorkforceRow"},{"type":"null"}]},"economicDevelopment":{"anyOf":[{"$ref":"#/components/schemas/Act60TourismEconomicDevelopmentSection"},{"type":"null"}]},"contractors":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60TourismContractorRow"}},"projectDates":{"anyOf":[{"$ref":"#/components/schemas/Act60TourismProjectDatesSection"},{"type":"null"}]},"priorOperations":{"anyOf":[{"$ref":"#/components/schemas/Act60TourismPriorOperationsSection"},{"type":"null"}]},"leadSourceInformation":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportLeadSourceDto"},{"type":"null"}]},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Act60ReportDocumentDto"}},"otherDocuments":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ReportOtherDocumentDto"}}},"required":["companyName","authorizedOfficer","officerPhysicalAddress","officerPostalAddress","businessOrganization","physicalAddress","postalAddress","ownerRepresentative","associates","activityDetails","constructionPhase","constructionPhaseTotal","operationalPhase","operationalPhaseTotal","economicDevelopment","contractors","projectDates","priorOperations","leadSourceInformation","documents","otherDocuments"]},"Act60HardToRecruitGender":{"type":"string","enum":["male","female"]},"Act60HardToRecruitGeneralInfoDto":{"type":"object","properties":{"fullLegalName":{"type":"string"},"gender":{"allOf":[{"$ref":"#/components/schemas/Act60HardToRecruitGender"}]},"dateOfBirth":{"format":"date-time","type":"string"},"telephone":{"type":"string"},"fax":{"type":"string"},"email":{"type":"string"},"webpage":{"type":"string"},"nationality":{"example":"US","description":"ISO 3166-1 alpha-2 country code. \"PR\" is its own entry.","allOf":[{"$ref":"#/components/schemas/CountryCode"}]},"identificationType":{"type":"string","enum":["social_security_number","national_id"]},"ssn":{"type":"string"},"nationalIdNumber":{"type":"string"},"isPrResident":{"type":["boolean","null"]},"prResidentSince":{"format":"date-time","type":"string"},"physicalAddress":{"$ref":"#/components/schemas/AddressDto"},"isPostalSameAsPhysical":{"type":"boolean"},"postalAddress":{"$ref":"#/components/schemas/AddressDto"},"hasAuthorizedRepresentative":{"type":"boolean"},"representativeFullName":{"type":"string"},"representativeTelephone":{"type":"string"},"representativeFax":{"type":"string"},"representativeEmail":{"type":"string"},"representativeWebpage":{"type":"string"},"representativePhysicalAddress":{"$ref":"#/components/schemas/AddressDto"},"isRepresentativePostalSameAsPhysical":{"type":"boolean"},"representativePostalAddress":{"$ref":"#/components/schemas/AddressDto"}},"required":["fullLegalName","gender","telephone","email","nationality","identificationType","physicalAddress","isPostalSameAsPhysical","hasAuthorizedRepresentative"]},"Act60HardToRecruitProfessionalInfoDto":{"type":"object","properties":{"educationLevel":{"type":"string","enum":["bachelors_degree","masters_degree","doctoral_degree","other"]},"educationLevelOther":{"type":"string"},"highestDegreeLocation":{"type":"string"},"highestDegreeCompletionDate":{"format":"date-time","type":"string"},"professionalExpertise":{"type":"string"},"workExperience":{"type":"string"},"exemptBusinessEmployerName":{"type":"string"},"exemptBusinessDecreeCaseNumber":{"type":"string"},"employmentStartDate":{"format":"date-time","type":"string"},"hasStartedProvidingServices":{"type":"boolean"},"serviceCommencementDate":{"format":"date-time","type":"string"},"hasPriorTaxIncentiveGrant":{"type":"boolean"},"priorTaxIncentiveGrantDetails":{"type":"string"},"hasBeenSubjectToInvestigation":{"type":"boolean"},"investigationDetails":{"type":"string"},"hasBeenConvicted":{"type":"boolean"},"convictionDetails":{"type":"string"},"hasBeenArrested":{"type":"boolean"},"arrestDetails":{"type":"string"},"hasBeenProhibitedFromBusiness":{"type":"boolean"},"prohibitedFromBusinessDetails":{"type":"string"}},"required":["educationLevel","highestDegreeLocation","highestDegreeCompletionDate","professionalExpertise","workExperience","exemptBusinessEmployerName","exemptBusinessDecreeCaseNumber","employmentStartDate","hasStartedProvidingServices","hasPriorTaxIncentiveGrant","hasBeenSubjectToInvestigation","hasBeenConvicted","hasBeenArrested","hasBeenProhibitedFromBusiness"]},"Act60LeadSource":{"type":"string","enum":["afci","attorney_tax_advisor","business_contact","business_journal","conference_expo","discover_puerto_rico","invest_puerto_rico","newspaper_or_magazine","social_media","tax_consultant","website","other"]},"Act60LeadSourceDto":{"type":"object","properties":{"leadSource":{"allOf":[{"$ref":"#/components/schemas/Act60LeadSource"}]},"leadSourceOther":{"type":"string"}}},"HardToRecruitDocumentCategory":{"type":"string","enum":["act60_all_concepts_debt_certificate","act60_certificate_of_filing_income_tax","act60_certificate_of_good_standing","act60_certificate_of_registry","act60_certified_financial_statements","act60_criminal_record","act60_debt_certificate_social_security_chauffeurs","act60_debt_certificate_unemployment_disability","act60_employer_identification_number_letter","act60_merchants_registration_certificate","act60_negative_debt_certificate_treasury","act60_negative_debt_certificate_state_insurance","act60_entity_organizational_chart","act60_resume_or_curriculum_vitae","act60_commercial_reference","act60_other","act60_hard_to_recruit_all_concepts_debt_report","act60_hard_to_recruit_explanatory_letter_applicant","act60_hard_to_recruit_explanatory_letter_exempt_business","act60_hard_to_recruit_bachelors_degree_copy","act60_hard_to_recruit_resume_or_curriculum_vitae","act60_hard_to_recruit_institutional_sworn_statement","act60_hard_to_recruit_negative_certificate_child_support","act60_hard_to_recruit_returns_filing_certification","act60_hard_to_recruit_ssn_or_national_id","act60_hard_to_recruit_us_passport_or_resident_visa","act60_hard_to_recruit_criminal_record","act60_hard_to_recruit_negative_debt_certificate_treasury","act60_hard_to_recruit_other"]},"HardToRecruitInlineDocumentDto":{"type":"object","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/HardToRecruitDocumentCategory"}]},"storageKeys":{"type":"array","items":{"type":"string"}},"description":{"type":["string","null"],"description":"Omitted leaves the caption as it is; null clears it."}},"required":["category","storageKeys"]},"Act60SubmitHardToRecruitDto":{"type":"object","properties":{"generalInfo":{"$ref":"#/components/schemas/Act60HardToRecruitGeneralInfoDto"},"professionalInfo":{"$ref":"#/components/schemas/Act60HardToRecruitProfessionalInfoDto"},"leadSource":{"$ref":"#/components/schemas/Act60LeadSourceDto"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/HardToRecruitInlineDocumentDto"}},"otherDocuments":{"description":"The whole set: an unlisted document is removed. Omitted leaves them as they are. At most 20, unique by id.","type":"array","items":{"$ref":"#/components/schemas/Act60OtherDocumentItemDto"}}},"required":["generalInfo","professionalInfo","documents"]},"AddressEntity":{"type":"object","properties":{"addressLine1":{"type":"string"},"addressLine2":{"type":["string","null"]},"city":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}},"required":["addressLine1","addressLine2","city","region","postalCode","country"]},"Act60HardToRecruitGeneralInfoEntity":{"type":"object","properties":{"fullLegalName":{"type":"string"},"gender":{"allOf":[{"$ref":"#/components/schemas/Act60HardToRecruitGender"}]},"dateOfBirth":{"format":"date-time","type":["string","null"]},"telephone":{"type":"string"},"email":{"type":"string"},"webpage":{"type":["string","null"]},"nationality":{"type":"string"},"identificationType":{"type":"string","enum":["social_security_number","national_id"]},"ssn":{"type":["string","null"]},"nationalIdNumber":{"type":["string","null"]},"isPrResident":{"type":["boolean","null"]},"prResidentSince":{"format":"date-time","type":["string","null"]},"physicalAddress":{"$ref":"#/components/schemas/AddressEntity"},"isPostalSameAsPhysical":{"type":"boolean"},"postalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"hasAuthorizedRepresentative":{"type":"boolean"},"representativeFullName":{"type":["string","null"]},"representativeTelephone":{"type":["string","null"]},"representativeEmail":{"type":["string","null"]},"representativeWebpage":{"type":["string","null"]},"representativePhysicalAddress":{"anyOf":[{"$ref":"#/components/schemas/OptionalAddressEntity"},{"type":"null"}]},"isRepresentativePostalSameAsPhysical":{"type":"boolean"},"representativePostalAddress":{"anyOf":[{"$ref":"#/components/schemas/OptionalAddressEntity"},{"type":"null"}]}},"required":["fullLegalName","gender","dateOfBirth","telephone","email","webpage","nationality","identificationType","ssn","nationalIdNumber","isPrResident","prResidentSince","physicalAddress","isPostalSameAsPhysical","postalAddress","hasAuthorizedRepresentative","representativeFullName","representativeTelephone","representativeEmail","representativeWebpage","representativePhysicalAddress","isRepresentativePostalSameAsPhysical","representativePostalAddress"]},"Act60HardToRecruitProfessionalInfoEntity":{"type":"object","properties":{"educationLevel":{"type":"string","enum":["bachelors_degree","masters_degree","doctoral_degree","other"]},"educationLevelOther":{"type":["string","null"]},"highestDegreeLocation":{"type":"string"},"highestDegreeCompletionDate":{"format":"date-time","type":"string"},"professionalExpertise":{"type":"string"},"workExperience":{"type":"string"},"exemptBusinessEmployerName":{"type":"string"},"exemptBusinessDecreeCaseNumber":{"type":"string"},"employmentStartDate":{"format":"date-time","type":"string"},"hasStartedProvidingServices":{"type":"boolean"},"serviceCommencementDate":{"format":"date-time","type":["string","null"]},"hasPriorTaxIncentiveGrant":{"type":"boolean"},"priorTaxIncentiveGrantDetails":{"type":["string","null"]},"hasBeenSubjectToInvestigation":{"type":"boolean"},"investigationDetails":{"type":["string","null"]},"hasBeenConvicted":{"type":"boolean"},"convictionDetails":{"type":["string","null"]},"hasBeenArrested":{"type":"boolean"},"arrestDetails":{"type":["string","null"]},"hasBeenProhibitedFromBusiness":{"type":"boolean"},"prohibitedFromBusinessDetails":{"type":["string","null"]}},"required":["educationLevel","educationLevelOther","highestDegreeLocation","highestDegreeCompletionDate","professionalExpertise","workExperience","exemptBusinessEmployerName","exemptBusinessDecreeCaseNumber","employmentStartDate","hasStartedProvidingServices","serviceCommencementDate","hasPriorTaxIncentiveGrant","priorTaxIncentiveGrantDetails","hasBeenSubjectToInvestigation","investigationDetails","hasBeenConvicted","convictionDetails","hasBeenArrested","arrestDetails","hasBeenProhibitedFromBusiness","prohibitedFromBusinessDetails"]},"Act60HardToRecruitDataEntity":{"type":"object","properties":{"generalInfo":{"$ref":"#/components/schemas/Act60HardToRecruitGeneralInfoEntity"},"professionalInfo":{"$ref":"#/components/schemas/Act60HardToRecruitProfessionalInfoEntity"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}},"otherDocuments":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentSectionDto"}}},"required":["generalInfo","professionalInfo","documents","otherDocuments"]},"Act60HardToRecruitEntity":{"type":"object","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/OrgProductStatus"}]},"clientStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentClientStatus"},{"type":"null"}]},"locked":{"type":"boolean"},"id":{"type":["string","null"]},"orgProductId":{"type":"string"},"data":{"anyOf":[{"$ref":"#/components/schemas/Act60HardToRecruitDataEntity"},{"type":"null"}]},"submittedAt":{"format":"date-time","type":["string","null"]},"submittedById":{"type":["string","null"]},"updatedAt":{"format":"date-time","type":["string","null"]}},"required":["status","clientStatus","locked","id","orgProductId","data","submittedAt","submittedById","updatedAt"]},"Act60HardToRecruitPrefillDto":{"type":"object","properties":{"fullLegalName":{"type":["string","null"]},"dateOfBirth":{"format":"date-time","type":["string","null"]},"gender":{"anyOf":[{"$ref":"#/components/schemas/Act60HardToRecruitGender"},{"type":"null"}]},"telephone":{"type":["string","null"]},"email":{"type":["string","null"]},"nationality":{"type":["string","null"]},"identificationType":{"type":["string","null"],"enum":["social_security_number","national_id",null]},"ssn":{"type":["string","null"]},"nationalIdNumber":{"type":["string","null"]},"isPrResident":{"type":["boolean","null"]},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"postalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"professionalExpertise":{"type":["string","null"]},"workExperience":{"type":["string","null"]},"hasPriorTaxIncentiveGrant":{"type":["boolean","null"]},"priorTaxIncentiveGrantDetails":{"type":["string","null"]},"exemptBusinessEmployerName":{"type":["string","null"]},"exemptBusinessDecreeCaseNumber":{"type":["string","null"]}},"required":["fullLegalName","dateOfBirth","gender","telephone","email","nationality","identificationType","ssn","nationalIdNumber","isPrResident","physicalAddress","postalAddress","professionalExpertise","workExperience","hasPriorTaxIncentiveGrant","priorTaxIncentiveGrantDetails","exemptBusinessEmployerName","exemptBusinessDecreeCaseNumber"]},"Act60UpdateHardToRecruitDto":{"type":"object","properties":{"generalInfo":{"$ref":"#/components/schemas/Act60HardToRecruitGeneralInfoDto"},"professionalInfo":{"$ref":"#/components/schemas/Act60HardToRecruitProfessionalInfoDto"},"leadSource":{"$ref":"#/components/schemas/Act60LeadSourceDto"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/HardToRecruitInlineDocumentDto"}},"otherDocuments":{"description":"The whole set: an unlisted document is removed. Omitted leaves them as they are. At most 20, unique by id.","type":"array","items":{"$ref":"#/components/schemas/Act60OtherDocumentItemDto"}}}},"Act60HardToRecruitApplicantInformationSection":{"type":"object","properties":{"showPrResidentSince":{"type":"boolean"},"showSocialSecurityNumber":{"type":"boolean"},"showNationalIdNumber":{"type":"boolean"},"fullName":{"type":"string"},"gender":{"type":"string"},"dateOfBirth":{"type":"string"},"telephone":{"type":"string"},"fax":{"type":"string"},"email":{"type":"string"},"webpage":{"type":"string"},"nationality":{"type":"string"},"socialSecurityNumber":{"type":"string"},"nationalIdNumber":{"type":"string"},"isPrResident":{"type":"string"},"prResidentSince":{"type":"string"}},"required":["showPrResidentSince","showSocialSecurityNumber","showNationalIdNumber","fullName","gender","dateOfBirth","telephone","fax","email","webpage","nationality","socialSecurityNumber","nationalIdNumber","isPrResident","prResidentSince"]},"Act60HardToRecruitRepresentativeSection":{"type":"object","properties":{"fullName":{"type":"string"},"telephone":{"type":"string"},"fax":{"type":"string"},"email":{"type":"string"},"webpage":{"type":"string"}},"required":["fullName","telephone","fax","email","webpage"]},"Act60HardToRecruitBackgroundInformationSection":{"type":"object","properties":{"showPriorTaxIncentiveGrantDetails":{"type":"boolean"},"showInvestigationDetails":{"type":"boolean"},"showConvictionDetails":{"type":"boolean"},"showArrestDetails":{"type":"boolean"},"showProhibitedFromBusinessDetails":{"type":"boolean"},"showServiceCommencementDate":{"type":"boolean"},"educationLevel":{"type":"string"},"highestDegreeLocation":{"type":"string"},"highestDegreeCompletionDate":{"type":"string"},"professionalExpertise":{"type":"string"},"workExperience":{"type":"string"},"hasPriorTaxIncentiveGrant":{"type":"string"},"priorTaxIncentiveGrantDetails":{"type":"string"},"hasBeenSubjectToInvestigation":{"type":"string"},"investigationDetails":{"type":"string"},"hasBeenConvicted":{"type":"string"},"convictionDetails":{"type":"string"},"hasBeenArrested":{"type":"string"},"arrestDetails":{"type":"string"},"hasBeenProhibitedFromBusiness":{"type":"string"},"prohibitedFromBusinessDetails":{"type":"string"},"exemptBusinessEmployerName":{"type":"string"},"exemptBusinessDecreeCaseNumber":{"type":"string"},"employmentStartDate":{"type":"string"},"hasStartedProvidingServices":{"type":"string"},"serviceCommencementDate":{"type":"string"},"leadSource":{"type":"string"}},"required":["showPriorTaxIncentiveGrantDetails","showInvestigationDetails","showConvictionDetails","showArrestDetails","showProhibitedFromBusinessDetails","showServiceCommencementDate","educationLevel","highestDegreeLocation","highestDegreeCompletionDate","professionalExpertise","workExperience","hasPriorTaxIncentiveGrant","priorTaxIncentiveGrantDetails","hasBeenSubjectToInvestigation","investigationDetails","hasBeenConvicted","convictionDetails","hasBeenArrested","arrestDetails","hasBeenProhibitedFromBusiness","prohibitedFromBusinessDetails","exemptBusinessEmployerName","exemptBusinessDecreeCaseNumber","employmentStartDate","hasStartedProvidingServices","serviceCommencementDate","leadSource"]},"Act60HardToRecruitReportPreviewDto":{"type":"object","properties":{"companyName":{"type":"string"},"applicantInformation":{"anyOf":[{"$ref":"#/components/schemas/Act60HardToRecruitApplicantInformationSection"},{"type":"null"}]},"physicalAddress":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportAddressDto"},{"type":"null"}]},"postalAddress":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportAddressDto"},{"type":"null"}]},"representative":{"anyOf":[{"$ref":"#/components/schemas/Act60HardToRecruitRepresentativeSection"},{"type":"null"}]},"representativePhysicalAddress":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportAddressDto"},{"type":"null"}]},"representativePostalAddress":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportAddressDto"},{"type":"null"}]},"backgroundInformation":{"anyOf":[{"$ref":"#/components/schemas/Act60HardToRecruitBackgroundInformationSection"},{"type":"null"}]},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Act60ReportDocumentDto"}},"otherDocuments":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ReportOtherDocumentDto"}}},"required":["companyName","applicantInformation","physicalAddress","postalAddress","representative","representativePhysicalAddress","representativePostalAddress","backgroundInformation","documents","otherDocuments"]},"Act60PrivateEquityOwnerDto":{"type":"object","properties":{"id":{"type":"string","description":"Existing row id. Omit to create new."},"ownerType":{"allOf":[{"$ref":"#/components/schemas/OwnerType"}]},"fullName":{"type":"string","example":"Isabel Cruz"},"ownershipPercentage":{"type":"number","minimum":0.01,"maximum":100,"example":50.5},"physicalAddress":{"anyOf":[{"$ref":"#/components/schemas/OptionalAddressDto"},{"type":"null"}]},"ssnOrEin":{"type":["string","null"],"description":"SSN for an individual or EIN for an entity, validated by ownerType. Stored encrypted."},"dateOfBirth":{"type":["string","null"],"example":"1984-07-22","description":"An individual’s; dropped for an entity."},"dateOfOrganization":{"type":["string","null"],"example":"2012-01-30","description":"Date of Formation, an entity’s; dropped for an individual."}},"required":["ownerType","fullName","ownershipPercentage"]},"Act60PrivateEquityMailingAddressDto":{"type":"object","properties":{"addressLine1":{"type":"string","example":"123 Industrial Ave"},"addressLine2":{"type":"string","example":"Building 4"},"city":{"type":"string","example":"San Juan"},"country":{"example":"US","description":"ISO 3166-1 alpha-2 country code. \"PR\" is its own entry.","allOf":[{"$ref":"#/components/schemas/CountryCode"}]},"region":{"type":["string","null"],"example":"PR"},"postalCode":{"type":["string","null"],"example":"00901"}},"required":["addressLine1","city","country"]},"Act60PrivateEquityRepresentativeDto":{"type":"object","properties":{"contactId":{"type":["string","null"],"description":"PE15 or PE20: one of the Business Profile's named Points of Contact. Submit refuses none."},"fullName":{"type":"string","example":"Ana Rivera","description":"PE16 or PE21"},"email":{"type":"string","description":"PE17 or PE22"},"phone":{"type":"string","description":"PE18 or PE23"},"mailingAddress":{"description":"PE19 or PE24","allOf":[{"$ref":"#/components/schemas/Act60PrivateEquityMailingAddressDto"}]}},"required":["fullName","email","phone","mailingAddress"]},"Act60PrivateEquityLegalRepresentativeDto":{"type":"object","properties":{"contactId":{"type":["string","null"],"description":"PE20: one of the Business Profile's named Points of Contact; the signer's makes them the same person. Submit refuses none."},"fullName":{"type":["string","null"],"description":"PE21, asked unless PE20 picks the signer."},"email":{"type":["string","null"],"description":"PE22"},"phone":{"type":["string","null"],"description":"PE23"},"mailingAddress":{"description":"PE24","anyOf":[{"$ref":"#/components/schemas/Act60PrivateEquityMailingAddressDto"},{"type":"null"}]}}},"Act60PeFundClassification":{"type":"string","enum":["pef_pr","pef"],"description":"PE25"},"Act60PrivateEquityFundDto":{"type":"object","properties":{"fundClassification":{"description":"PE25","allOf":[{"$ref":"#/components/schemas/Act60PeFundClassification"}]},"termOfExistence":{"type":"string","example":"10 years","description":"PE26"}},"required":["fundClassification","termOfExistence"]},"Act60PrivateEquityManagerMemberDto":{"type":"object","properties":{"id":{"type":"string","description":"Existing row id. Omit to create new."},"ownerType":{"allOf":[{"$ref":"#/components/schemas/OwnerType"}]},"fullName":{"type":"string","example":"Atlas Advisory GP LLC"},"ssnOrEin":{"type":"string","example":"66-1234567","description":"SSN for an individual or EIN for an entity, validated by ownerType. Stored encrypted."},"dateOfBirthOrFormation":{"type":["string","null"],"example":"2018-01-10","description":"Date of Birth or Formation."},"participationPercentage":{"type":"number","minimum":0.01,"maximum":100,"example":50.5},"physicalAddress":{"anyOf":[{"$ref":"#/components/schemas/OptionalAddressDto"},{"type":"null"}]},"isPostalSameAsPhysical":{"type":"boolean"},"postalAddress":{"description":"Dropped when the postal address is the physical one.","anyOf":[{"$ref":"#/components/schemas/OptionalAddressDto"},{"type":"null"}]}},"required":["ownerType","fullName","ssnOrEin","participationPercentage","isPostalSameAsPhysical"]},"Act60PrivateEquityBackgroundDto":{"type":"object","properties":{"hasBeenInvestigated":{"type":"boolean","description":"PE29"},"hasBeenConvicted":{"type":"boolean","description":"PE30"},"hasBeenArrestedOrCharged":{"type":"boolean","description":"PE31"},"hasBeenProhibited":{"type":"boolean","description":"PE32"}},"required":["hasBeenInvestigated","hasBeenConvicted","hasBeenArrestedOrCharged","hasBeenProhibited"]},"PrivateEquityDocumentCategory":{"type":"string","enum":["act60_all_concepts_debt_certificate","act60_certificate_of_filing_income_tax","act60_certificate_of_good_standing","act60_certificate_of_registry","act60_certified_financial_statements","act60_criminal_record","act60_debt_certificate_social_security_chauffeurs","act60_debt_certificate_unemployment_disability","act60_employer_identification_number_letter","act60_merchants_registration_certificate","act60_negative_debt_certificate_treasury","act60_negative_debt_certificate_state_insurance","act60_entity_organizational_chart","act60_resume_or_curriculum_vitae","act60_commercial_reference","act60_other","act60_private_equity_background_document"]},"Act60PrivateEquityDocumentDto":{"type":"object","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/PrivateEquityDocumentCategory"}]},"storageKeys":{"type":"array","items":{"type":"string"}},"description":{"type":["string","null"],"description":"Omitted leaves the caption as it is; null clears it."},"fileNames":{"description":"The files renamed in this submit, one name each (up to 5); a file left out keeps its name. A file listed under two documents takes the same name in both.","type":"array","items":{"$ref":"#/components/schemas/Act60DocumentFileNameDto"}}},"required":["category","storageKeys"]},"Act60SubmitPrivateEquityDto":{"type":"object","properties":{"registration":{"$ref":"#/components/schemas/Act60DecreeRegistrationDto"},"owners":{"description":"PE8: 1 to 20 owners, each with 10% or more. Replaces the product's owners; a non-amendment submit also writes their shared columns to the Business Profile when they make 100% (with the profile's smaller owners, if need be). The dates stay on the decree.","type":"array","items":{"$ref":"#/components/schemas/Act60PrivateEquityOwnerDto"}},"signer":{"description":"PE15–PE19, the authorized signer.","allOf":[{"$ref":"#/components/schemas/Act60PrivateEquityRepresentativeDto"}]},"legalRepresentative":{"$ref":"#/components/schemas/Act60PrivateEquityLegalRepresentativeDto"},"fund":{"$ref":"#/components/schemas/Act60PrivateEquityFundDto"},"managerMembers":{"description":"PE27: 1 to 20 rows whose percentages total 100%.","type":"array","items":{"$ref":"#/components/schemas/Act60PrivateEquityManagerMemberDto"}},"background":{"$ref":"#/components/schemas/Act60PrivateEquityBackgroundDto"},"documents":{"description":"PE28 and PE33, one entry per category (max 17).","type":"array","items":{"$ref":"#/components/schemas/Act60PrivateEquityDocumentDto"}}},"required":["registration","owners","signer","legalRepresentative","fund","managerMembers","background","documents"]},"Act60PrivateEquityOwnerEntity":{"type":"object","properties":{"id":{"type":"string"},"ownerType":{"anyOf":[{"$ref":"#/components/schemas/OwnerType"},{"type":"null"}]},"fullName":{"type":"string"},"ssnOrEin":{"type":["string","null"]},"ownershipPercentage":{"type":"number"},"dateOfBirth":{"format":"date-time","type":["string","null"]},"dateOfOrganization":{"format":"date-time","type":["string","null"]},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"}},"required":["id","ownerType","fullName","ssnOrEin","ownershipPercentage","dateOfBirth","dateOfOrganization","physicalAddress"]},"Act60PrivateEquityRepresentativeEntity":{"type":"object","properties":{"contactId":{"type":["string","null"],"description":"The Business Profile contact picked; null on an earlier application none matched, or once the contact is removed."},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"mailingAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"}},"required":["contactId","fullName","email","phone","mailingAddress"]},"Act60PrivateEquityFundEntity":{"type":"object","properties":{"fundClassification":{"allOf":[{"$ref":"#/components/schemas/Act60PeFundClassification"}]},"termOfExistence":{"type":"string"}},"required":["fundClassification","termOfExistence"]},"Act60PrivateEquityManagerMemberEntity":{"type":"object","properties":{"id":{"type":"string"},"ownerType":{"description":"Null on a member saved before the form asked it.","anyOf":[{"$ref":"#/components/schemas/OwnerType"},{"type":"null"}]},"fullName":{"type":"string"},"ssnOrEin":{"type":"string"},"dateOfBirthOrFormation":{"format":"date-time","type":["string","null"]},"participationPercentage":{"type":"number"},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"isPostalSameAsPhysical":{"type":"boolean"},"postalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"}},"required":["id","ownerType","fullName","ssnOrEin","dateOfBirthOrFormation","participationPercentage","physicalAddress","isPostalSameAsPhysical","postalAddress"]},"Act60PrivateEquityBackgroundEntity":{"type":"object","properties":{"hasBeenInvestigated":{"type":"boolean"},"hasBeenConvicted":{"type":"boolean"},"hasBeenArrestedOrCharged":{"type":"boolean"},"hasBeenProhibited":{"type":"boolean"}},"required":["hasBeenInvestigated","hasBeenConvicted","hasBeenArrestedOrCharged","hasBeenProhibited"]},"Act60PrivateEquityDataEntity":{"type":"object","properties":{"registration":{"$ref":"#/components/schemas/Act60DecreeRegistrationEntity"},"owners":{"type":"array","items":{"$ref":"#/components/schemas/Act60PrivateEquityOwnerEntity"}},"signer":{"$ref":"#/components/schemas/Act60PrivateEquityRepresentativeEntity"},"legalRepresentative":{"$ref":"#/components/schemas/Act60PrivateEquityRepresentativeEntity"},"fund":{"$ref":"#/components/schemas/Act60PrivateEquityFundEntity"},"managerMembers":{"type":"array","items":{"$ref":"#/components/schemas/Act60PrivateEquityManagerMemberEntity"}},"background":{"$ref":"#/components/schemas/Act60PrivateEquityBackgroundEntity"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}},"otherDocuments":{"description":"The earlier form's named other documents, which PE28.8 lists; the submit leaves them as they are.","type":"array","items":{"$ref":"#/components/schemas/ProductDocumentSectionDto"}}},"required":["registration","owners","signer","legalRepresentative","fund","managerMembers","background","documents","otherDocuments"]},"Act60PrivateEquityEntity":{"type":"object","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/OrgProductStatus"}]},"clientStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentClientStatus"},{"type":"null"}]},"locked":{"type":"boolean"},"id":{"type":["string","null"]},"orgProductId":{"type":"string"},"data":{"anyOf":[{"$ref":"#/components/schemas/Act60PrivateEquityDataEntity"},{"type":"null"}]},"submittedAt":{"format":"date-time","type":["string","null"]},"submittedById":{"type":["string","null"]},"updatedAt":{"format":"date-time","type":["string","null"]}},"required":["status","clientStatus","locked","id","orgProductId","data","submittedAt","submittedById","updatedAt"]},"Act60PrivateEquityPrefillDto":{"type":"object","properties":{"registration":{"$ref":"#/components/schemas/Act60DecreeRegistrationPrefillDto"},"owners":{"description":"PE8 (BP17), the owners with 10% or more.","type":"array","items":{"$ref":"#/components/schemas/Act60PrivateEquityOwnerEntity"}},"contacts":{"description":"PE15's and PE20's options: every Business Profile contact with a name, in the profile's order. None leaves both unanswerable.","type":"array","items":{"$ref":"#/components/schemas/Act60ProfileContactDto"}},"fundClassification":{"description":"PE25 from IA22 (is the fund organized in Puerto Rico?): Yes suggests PEF-PR, No PEF.","anyOf":[{"$ref":"#/components/schemas/Act60PeFundClassification"},{"type":"null"}]}},"required":["registration","owners","contacts","fundClassification"]},"Act60PrivateEquityBusinessProfileSection":{"type":"object","properties":{"legalName":{"type":"string"},"ein":{"type":"string"}},"required":["legalName","ein"]},"Act60PrivateEquityRepresentativeSection":{"type":"object","properties":{"fullName":{"type":"string"},"email":{"type":"string"},"phoneNumber":{"type":"string"},"address":{"$ref":"#/components/schemas/Act60ReportAddressDto"}},"required":["fullName","email","phoneNumber","address"]},"Act60PrivateEquityBusinessInformationSection":{"type":"object","properties":{"organizationType":{"type":"string"},"taxationMethod":{"type":"string"},"typeOfBusiness":{"type":"string"},"fundClassification":{"type":"string"},"yearsOfOperation":{"type":"string"},"stateRegistrationNumber":{"type":"string"},"stateRegistrationDate":{"type":"string"},"corporateResidency":{"type":"string"},"organizedUnderLawsOf":{"type":"string"},"termOfExistence":{"type":"string"}},"required":["organizationType","taxationMethod","typeOfBusiness","fundClassification","yearsOfOperation","stateRegistrationNumber","stateRegistrationDate","corporateResidency","organizedUnderLawsOf","termOfExistence"]},"Act60PrivateEquityManagerMemberRow":{"type":"object","properties":{"fullName":{"type":"string"},"taxId":{"type":"string"},"organizationDate":{"type":"string"},"participationPercentage":{"type":"string"},"physicalAddress":{"type":"string"},"postalAddress":{"type":"string"}},"required":["fullName","taxId","organizationDate","participationPercentage","physicalAddress","postalAddress"]},"Act60PrivateEquityReportPreviewDto":{"type":"object","properties":{"companyName":{"type":"string"},"businessProfile":{"anyOf":[{"$ref":"#/components/schemas/Act60PrivateEquityBusinessProfileSection"},{"type":"null"}]},"physicalAddress":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportAddressDto"},{"type":"null"}]},"postalAddress":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportAddressDto"},{"type":"null"}]},"authorizedRepresentative":{"anyOf":[{"$ref":"#/components/schemas/Act60PrivateEquityRepresentativeSection"},{"type":"null"}]},"legalRepresentative":{"anyOf":[{"$ref":"#/components/schemas/Act60PrivateEquityRepresentativeSection"},{"type":"null"}]},"businessInformation":{"anyOf":[{"$ref":"#/components/schemas/Act60PrivateEquityBusinessInformationSection"},{"type":"null"}]},"managerMembers":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60PrivateEquityManagerMemberRow"}},"stockholders":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ReportAssociateRowDto"}},"backgroundInformation":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportBackgroundInformationDto"},{"type":"null"}]},"leadSourceInformation":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportLeadSourceDto"},{"type":"null"}]},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Act60ReportDocumentDto"}},"otherDocuments":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ReportOtherDocumentDto"}}},"required":["companyName","businessProfile","physicalAddress","postalAddress","authorizedRepresentative","legalRepresentative","businessInformation","managerMembers","stockholders","backgroundInformation","leadSourceInformation","documents","otherDocuments"]},"Act60YoungEntrepreneurAssociateDto":{"type":"object","properties":{"id":{"type":"string"},"ownerType":{"type":"string","enum":["individual","entity"],"example":"individual"},"fullName":{"type":"string","example":"John Smith","description":"For an entity, the legal name."},"ssnOrEin":{"type":"string","example":"123-45-6789","description":"SSN for individuals or EIN for entities, validated by ownerType. Stored encrypted."},"email":{"type":"string","example":"john@example.com"},"participationPercentage":{"type":"number","minimum":0.01,"maximum":100,"example":50.5,"description":"Participation percentage, up to 2 decimals. Must total 100% across all associates."},"physicalAddress":{"anyOf":[{"$ref":"#/components/schemas/OptionalAddressDto"},{"type":"null"}]}},"required":["ownerType","fullName","ssnOrEin","email","participationPercentage"]},"Act60YoungEntrepreneurBusinessInformationDto":{"type":"object","properties":{"legalName":{"type":"string"},"ein":{"type":"string","example":"99-9999999"},"webpage":{"type":"string"},"phone":{"type":"string","example":"+14155550198"},"email":{"type":"string"},"organizationType":{"type":"string","enum":["corporation","llc","partnership","other"]},"organizationTypeOther":{"type":"string"},"jurisdiction":{"type":"string"},"physicalAddress":{"$ref":"#/components/schemas/AddressDto"},"isPostalSameAsPhysical":{"type":"boolean"},"postalAddress":{"$ref":"#/components/schemas/AddressDto"},"associates":{"description":"Stockholders, members, partners, or associates of the business (max 20). Replaces the existing list. Owned by this decree — unlike the other Act 60 products' shareholders, associates are never shared with the Business Profile.","type":"array","items":{"$ref":"#/components/schemas/Act60YoungEntrepreneurAssociateDto"}}},"required":["legalName","ein","phone","email","organizationType","jurisdiction","physicalAddress","isPostalSameAsPhysical","associates"]},"Act60YoungEntrepreneurPersonalInformationDto":{"type":"object","properties":{"fullLegalName":{"type":"string"},"ssn":{"type":"string","example":"123-45-6789"},"phone":{"type":"string","example":"+14155550198"},"email":{"type":"string"},"dateOfBirth":{"format":"date-time","type":"string"},"physicalAddress":{"$ref":"#/components/schemas/AddressDto"},"isPostalSameAsPhysical":{"type":"boolean"},"postalAddress":{"$ref":"#/components/schemas/AddressDto"}},"required":["fullLegalName","ssn","phone","email","dateOfBirth","physicalAddress","isPostalSameAsPhysical"]},"Act60YoungEntrepreneurBusinessIdeaDto":{"type":"object","properties":{"productServiceDescription":{"type":"string","maxLength":20000},"operatingCity":{"type":"string"},"expectedJobsCreated":{"type":["number","null"],"minimum":0,"maximum":1000000},"hasPriorTaxIncentive":{"type":"boolean"},"hasCommencedOperations":{"type":"boolean"}},"required":["productServiceDescription","operatingCity","hasPriorTaxIncentive","hasCommencedOperations"]},"YoungEntrepreneurDocumentCategory":{"type":"string","enum":["act60_all_concepts_debt_certificate","act60_certificate_of_filing_income_tax","act60_certificate_of_good_standing","act60_certificate_of_registry","act60_certified_financial_statements","act60_criminal_record","act60_debt_certificate_social_security_chauffeurs","act60_debt_certificate_unemployment_disability","act60_employer_identification_number_letter","act60_merchants_registration_certificate","act60_negative_debt_certificate_treasury","act60_negative_debt_certificate_state_insurance","act60_entity_organizational_chart","act60_resume_or_curriculum_vitae","act60_commercial_reference","act60_other","act60_young_entrepreneur_all_concepts_debt_report","act60_young_entrepreneur_negative_debt_certificate_treasury","act60_young_entrepreneur_diploma","act60_young_entrepreneur_photo_identification","act60_young_entrepreneur_tax_return_filing_certification","act60_young_entrepreneur_birth_certificate","act60_young_entrepreneur_certificate_of_incorporation","act60_young_entrepreneur_child_support_compliance","act60_young_entrepreneur_other"]},"YoungEntrepreneurInlineDocumentDto":{"type":"object","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/YoungEntrepreneurDocumentCategory"}]},"storageKeys":{"type":"array","items":{"type":"string"}},"description":{"type":["string","null"],"description":"Omitted leaves the caption as it is; null clears it."}},"required":["category","storageKeys"]},"Act60SubmitYoungEntrepreneurDto":{"type":"object","properties":{"businessInformation":{"$ref":"#/components/schemas/Act60YoungEntrepreneurBusinessInformationDto"},"personalInformation":{"$ref":"#/components/schemas/Act60YoungEntrepreneurPersonalInformationDto"},"businessIdea":{"$ref":"#/components/schemas/Act60YoungEntrepreneurBusinessIdeaDto"},"leadSource":{"$ref":"#/components/schemas/Act60LeadSourceDto"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/YoungEntrepreneurInlineDocumentDto"}},"otherDocuments":{"description":"The whole set: an unlisted document is removed. Omitted leaves them as they are. At most 20, unique by id.","type":"array","items":{"$ref":"#/components/schemas/Act60OtherDocumentItemDto"}}},"required":["businessInformation","personalInformation","businessIdea","documents"]},"Act60YoungEntrepreneurAssociateEntity":{"type":"object","properties":{"id":{"type":"string"},"ownerType":{"type":"string","enum":["individual","entity"]},"fullName":{"type":"string"},"ssnOrEin":{"type":"string"},"email":{"type":"string"},"participationPercentage":{"type":"number"},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"}},"required":["id","ownerType","fullName","ssnOrEin","email","participationPercentage","physicalAddress"]},"Act60YoungEntrepreneurBusinessInformationEntity":{"type":"object","properties":{"legalName":{"type":"string"},"ein":{"type":"string"},"webpage":{"type":["string","null"]},"phone":{"type":"string"},"email":{"type":"string"},"organizationType":{"type":"string","enum":["corporation","llc","partnership","other"]},"organizationTypeOther":{"type":["string","null"]},"jurisdiction":{"type":"string"},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"isPostalSameAsPhysical":{"type":"boolean"},"postalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"associates":{"type":"array","items":{"$ref":"#/components/schemas/Act60YoungEntrepreneurAssociateEntity"}}},"required":["legalName","ein","webpage","phone","email","organizationType","organizationTypeOther","jurisdiction","physicalAddress","isPostalSameAsPhysical","postalAddress","associates"]},"Act60YoungEntrepreneurPersonalInformationEntity":{"type":"object","properties":{"fullLegalName":{"type":"string"},"ssn":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"dateOfBirth":{"format":"date-time","type":"string"},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"isPostalSameAsPhysical":{"type":"boolean"},"postalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"}},"required":["fullLegalName","ssn","phone","email","dateOfBirth","physicalAddress","isPostalSameAsPhysical","postalAddress"]},"Act60YoungEntrepreneurBusinessIdeaEntity":{"type":"object","properties":{"productServiceDescription":{"type":"string"},"operatingCity":{"type":"string"},"expectedJobsCreated":{"type":["number","null"]},"hasPriorTaxIncentive":{"type":"boolean"},"hasCommencedOperations":{"type":"boolean"}},"required":["productServiceDescription","operatingCity","expectedJobsCreated","hasPriorTaxIncentive","hasCommencedOperations"]},"Act60YoungEntrepreneurDataEntity":{"type":"object","properties":{"businessInformation":{"$ref":"#/components/schemas/Act60YoungEntrepreneurBusinessInformationEntity"},"personalInformation":{"$ref":"#/components/schemas/Act60YoungEntrepreneurPersonalInformationEntity"},"businessIdea":{"$ref":"#/components/schemas/Act60YoungEntrepreneurBusinessIdeaEntity"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentsByCategoryDto"}},"otherDocuments":{"type":"array","items":{"$ref":"#/components/schemas/ProductDocumentSectionDto"}}},"required":["businessInformation","personalInformation","businessIdea","documents","otherDocuments"]},"Act60YoungEntrepreneurEntity":{"type":"object","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/OrgProductStatus"}]},"clientStatus":{"anyOf":[{"$ref":"#/components/schemas/DepartmentClientStatus"},{"type":"null"}]},"locked":{"type":"boolean"},"id":{"type":["string","null"]},"orgProductId":{"type":"string"},"data":{"anyOf":[{"$ref":"#/components/schemas/Act60YoungEntrepreneurDataEntity"},{"type":"null"}]},"submittedAt":{"format":"date-time","type":["string","null"]},"submittedById":{"type":["string","null"]},"updatedAt":{"format":"date-time","type":["string","null"]}},"required":["status","clientStatus","locked","id","orgProductId","data","submittedAt","submittedById","updatedAt"]},"Act60YoungEntrepreneurPrefillDto":{"type":"object","properties":{"fullLegalName":{"type":["string","null"]},"ssn":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"dateOfBirth":{"format":"date-time","type":["string","null"]},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"postalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"businessDescription":{"type":["string","null"]},"projectedJobs":{"type":["number","null"]},"hasPriorTaxIncentive":{"type":["boolean","null"]}},"required":["fullLegalName","ssn","phone","email","dateOfBirth","physicalAddress","postalAddress","businessDescription","projectedJobs","hasPriorTaxIncentive"]},"Act60UpdateYoungEntrepreneurDto":{"type":"object","properties":{"businessInformation":{"$ref":"#/components/schemas/Act60YoungEntrepreneurBusinessInformationDto"},"personalInformation":{"$ref":"#/components/schemas/Act60YoungEntrepreneurPersonalInformationDto"},"businessIdea":{"$ref":"#/components/schemas/Act60YoungEntrepreneurBusinessIdeaDto"},"leadSource":{"$ref":"#/components/schemas/Act60LeadSourceDto"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/YoungEntrepreneurInlineDocumentDto"}},"otherDocuments":{"description":"The whole set: an unlisted document is removed. Omitted leaves them as they are. At most 20, unique by id.","type":"array","items":{"$ref":"#/components/schemas/Act60OtherDocumentItemDto"}}}},"Act60YoungEntrepreneurApplicantInformationSection":{"type":"object","properties":{"fullName":{"type":"string"},"socialSecurityNumber":{"type":"string"},"phoneNumber":{"type":"string"},"email":{"type":"string"},"dateOfBirth":{"type":"string"}},"required":["fullName","socialSecurityNumber","phoneNumber","email","dateOfBirth"]},"Act60YoungEntrepreneurBusinessInformationSection":{"type":"object","properties":{"name":{"type":"string"},"ein":{"type":"string"},"webpage":{"type":"string"},"phoneNumber":{"type":"string"},"email":{"type":"string"},"organizationType":{"type":"string"},"jurisdiction":{"type":"string"}},"required":["name","ein","webpage","phoneNumber","email","organizationType","jurisdiction"]},"Act60YoungEntrepreneurAssociateRow":{"type":"object","properties":{"ownerType":{"type":"string"},"fullName":{"type":"string"},"taxId":{"type":"string"},"email":{"type":"string"},"participationPercentage":{"type":"string"}},"required":["ownerType","fullName","taxId","email","participationPercentage"]},"Act60YoungEntrepreneurBusinessIdeaSection":{"type":"object","properties":{"productServiceDescription":{"type":"string"},"operatingCity":{"type":"string"},"expectedJobsCreated":{"type":"string"},"hasPriorTaxIncentive":{"type":"string"},"hasCommencedOperations":{"type":"string"}},"required":["productServiceDescription","operatingCity","expectedJobsCreated","hasPriorTaxIncentive","hasCommencedOperations"]},"Act60YoungEntrepreneurReportPreviewDto":{"type":"object","properties":{"companyName":{"type":"string"},"applicantInformation":{"anyOf":[{"$ref":"#/components/schemas/Act60YoungEntrepreneurApplicantInformationSection"},{"type":"null"}]},"applicantPhysicalAddress":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportAddressDto"},{"type":"null"}]},"applicantPostalAddress":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportAddressDto"},{"type":"null"}]},"businessInformation":{"anyOf":[{"$ref":"#/components/schemas/Act60YoungEntrepreneurBusinessInformationSection"},{"type":"null"}]},"businessPhysicalAddress":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportAddressDto"},{"type":"null"}]},"businessPostalAddress":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportAddressDto"},{"type":"null"}]},"associates":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60YoungEntrepreneurAssociateRow"}},"businessIdea":{"anyOf":[{"$ref":"#/components/schemas/Act60YoungEntrepreneurBusinessIdeaSection"},{"type":"null"}]},"leadSourceInformation":{"anyOf":[{"$ref":"#/components/schemas/Act60ReportLeadSourceDto"},{"type":"null"}]},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Act60ReportDocumentDto"}},"otherDocuments":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Act60ReportOtherDocumentDto"}}},"required":["companyName","applicantInformation","applicantPhysicalAddress","applicantPostalAddress","businessInformation","businessPhysicalAddress","businessPostalAddress","associates","businessIdea","leadSourceInformation","documents","otherDocuments"]},"ProductStatus":{"type":"string","enum":["draft","active","archived"]},"ProductDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"name":{"type":"string"},"description":{"type":["string","null"]},"department":{"allOf":[{"$ref":"#/components/schemas/ProductDepartment"}]},"status":{"allOf":[{"$ref":"#/components/schemas/ProductStatus"}]},"archivedFromStatus":{"description":"What Restore brings an archived product back to","anyOf":[{"$ref":"#/components/schemas/ProductStatus"},{"type":"null"}]},"periodicity":{"anyOf":[{"$ref":"#/components/schemas/ProductPeriodicity"},{"type":"null"}]},"periodYears":{"type":["number","null"],"description":"Length of one period, for `every_n_years` products"},"periodStart":{"type":["string","null"],"format":"date","description":"First day of the first period offered, moved one year on every 1 January"},"periodEnd":{"type":["string","null"],"format":"date","description":"Last day of the last period offered"},"requiresYear":{"type":"boolean"},"entityTypes":{"type":"array","items":{"$ref":"#/components/schemas/EntityType"}},"isMultiInstance":{"type":"boolean"},"hasCustomName":{"type":"boolean"},"hasTimeLog":{"type":"boolean"},"hasRates":{"type":"boolean"},"hasQuestionnaire":{"type":"boolean"},"isExtendable":{"type":"boolean"},"deadlineMonth":{"type":["number","null"],"description":"The Deadline rule's month (1–12); null for a monthly or quarterly rule, or no rule"},"deadlineDay":{"type":["number","null"],"description":"The Deadline rule's day; null for no rule. Each service's deadline is the first such day after its period ends"},"extendedDateMonth":{"type":["number","null"],"description":"The Extended date rule's month; same rule as `deadlineMonth`"},"extendedDateDay":{"type":["number","null"],"description":"The Extended date rule's day; each service's Extended date is the first such day after its deadline"},"organizations":{"description":"The first organizations holding the product, by name; `organizationCount` covers the rest. Set only on `GET /products/:productId` and `GET /products?withOrganizations=true`; null elsewhere","type":["array","null"],"items":{"$ref":"#/components/schemas/OrganizationRefDto"}},"organizationCount":{"type":["number","null"],"description":"How many organizations hold the product; null with `organizations`"},"hasFixedFlow":{"type":"boolean","description":"Its flow is built into the app: only the description, Time Log, Rates, Extended date and deadline rules can change, and it can be neither archived nor deleted"},"isPredefined":{"type":"boolean","description":"A built-in product: its predefined name, department, period and product type cannot change"},"isAssignmentSettingsLocked":{"type":"boolean","description":"Department, period and multi-instance can no longer change: organizations hold the product, a live agreement (not declined, voided or revoked) links it from its brief or proposes it, or its flow is built around them"},"isEntityTypeLocked":{"type":"boolean","description":"Organizations hold the product (archived ones included), so its product type can no longer change until it is unlinked from all of them"}},"required":["id","type","name","description","department","status","archivedFromStatus","periodicity","periodYears","periodStart","periodEnd","requiresYear","entityTypes","isMultiInstance","hasCustomName","hasTimeLog","hasRates","hasQuestionnaire","isExtendable","deadlineMonth","deadlineDay","extendedDateMonth","extendedDateDay","organizations","organizationCount","hasFixedFlow","isPredefined","isAssignmentSettingsLocked","isEntityTypeLocked"]},"PredefinedProductDto":{"type":"object","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/ProductType"}]},"name":{"type":"string"},"department":{"allOf":[{"$ref":"#/components/schemas/ProductDepartment"}]},"periodicity":{"description":"The period the product had, offered as the starting point","anyOf":[{"$ref":"#/components/schemas/ProductPeriodicity"},{"type":"null"}]},"isMultiInstance":{"type":"boolean"},"description":{"type":"string"},"entityTypes":{"type":"array","items":{"$ref":"#/components/schemas/EntityType"}},"hasTimeLog":{"type":"boolean"},"hasRates":{"type":"boolean"},"isExtendable":{"type":"boolean"}},"required":["type","name","department","periodicity","isMultiInstance","description","entityTypes","hasTimeLog","hasRates","isExtendable"]},"PendingAgreementProposalCountDto":{"type":"object","properties":{"count":{"type":"number","description":"Pending proposals of the product in agreements not declined, voided or revoked"}},"required":["count"]},"CreatableProductStatus":{"type":"string","enum":["draft","active"],"description":"A product is never created archived"},"CreateProductDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255},"description":{"type":["string","null"],"maxLength":5000,"description":"Shown to the client. Optional; blank is stored as none"},"periodicity":{"description":"Null for a product that is not periodic","anyOf":[{"$ref":"#/components/schemas/ProductPeriodicity"},{"type":"null"}]},"periodYears":{"type":["number","null"],"minimum":2,"maximum":10,"description":"Required for `every_n_years`, null otherwise"},"periodStart":{"type":["string","null"],"format":"date","description":"First period the product is offered for. Monthly, quarterly and yearly products only; null otherwise"},"periodEnd":{"type":["string","null"],"format":"date","description":"Last period the product is offered for; same rule as `periodStart`"},"isMultiInstance":{"type":"boolean","description":"An organization can hold several instances of the product. With no period, each is told apart by its own name; ad-hoc products require it"},"entityTypes":{"type":"array","description":"Product type: the organizations that can hold the product — business, individual or both","items":{"$ref":"#/components/schemas/EntityType"}},"hasTimeLog":{"type":"boolean"},"hasRates":{"type":"boolean","description":"Requires `hasTimeLog`"},"hasQuestionnaire":{"type":"boolean","description":"The product has a questionnaire"},"isExtendable":{"type":"boolean","description":"Its services can carry an Extended date past their deadline"},"deadlineMonth":{"type":["number","null"],"minimum":1,"maximum":12,"description":"The Deadline rule's month, for a yearly product; null for a monthly or quarterly one, which counts from the month after its period"},"deadlineDay":{"type":["number","null"],"minimum":1,"maximum":31,"description":"The Deadline rule's day; null for no rule. Each service's deadline is the first such day after its period ends, unless typed on the service. Products assigned per year, quarter or month only"},"extendedDateMonth":{"type":["number","null"],"minimum":1,"maximum":12,"description":"The Extended date rule's month; same rule as `deadlineMonth`"},"extendedDateDay":{"type":["number","null"],"minimum":1,"maximum":31,"description":"The Extended date rule's day: each service's Extended date is the first such day after its deadline. Requires `isExtendable` and a Deadline rule"},"status":{"description":"A product is never created archived","allOf":[{"$ref":"#/components/schemas/CreatableProductStatus"}]},"departments":{"type":"array","description":"One product is created per department. A predefined product takes its own department only","items":{"$ref":"#/components/schemas/ProductDepartment"}},"predefinedType":{"description":"Recreates a deleted built-in product under its predefined name (see `GET /products/predefined`). Omitted for a custom product","allOf":[{"$ref":"#/components/schemas/ProductType"}]},"questionnaireTabs":{"maxItems":20,"description":"The questionnaire template every created product gets. Required when `hasQuestionnaire` is on; organizations receive a copy on assignment","type":"array","items":{"$ref":"#/components/schemas/ProductQuestionnaireTabInputDto"}}},"required":["name","description","periodicity","periodYears","periodStart","periodEnd","isMultiInstance","entityTypes","hasTimeLog","hasRates","hasQuestionnaire","isExtendable","deadlineMonth","deadlineDay","extendedDateMonth","extendedDateDay","status","departments"]},"UpdateProductDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255},"department":{"allOf":[{"$ref":"#/components/schemas/ProductDepartment"}]},"status":{"allOf":[{"$ref":"#/components/schemas/ProductStatus"}]},"description":{"type":["string","null"],"maxLength":5000,"description":"Shown to the client. Optional; blank is stored as none"},"periodicity":{"description":"Null for a product that is not periodic","anyOf":[{"$ref":"#/components/schemas/ProductPeriodicity"},{"type":"null"}]},"periodYears":{"type":["number","null"],"minimum":2,"maximum":10,"description":"Required for `every_n_years`, null otherwise"},"periodStart":{"type":["string","null"],"format":"date","description":"First period the product is offered for. Monthly, quarterly and yearly products only; null otherwise"},"periodEnd":{"type":["string","null"],"format":"date","description":"Last period the product is offered for; same rule as `periodStart`"},"isMultiInstance":{"type":"boolean","description":"An organization can hold several instances of the product. With no period, each is told apart by its own name; ad-hoc products require it"},"entityTypes":{"type":"array","description":"Product type: the organizations that can hold the product — business, individual or both","items":{"$ref":"#/components/schemas/EntityType"}},"hasTimeLog":{"type":"boolean"},"hasRates":{"type":"boolean","description":"Requires `hasTimeLog`"},"hasQuestionnaire":{"type":"boolean","description":"The product has a questionnaire"},"isExtendable":{"type":"boolean","description":"Its services can carry an Extended date past their deadline"},"deadlineMonth":{"type":["number","null"],"minimum":1,"maximum":12,"description":"The Deadline rule's month, for a yearly product; null for a monthly or quarterly one, which counts from the month after its period"},"deadlineDay":{"type":["number","null"],"minimum":1,"maximum":31,"description":"The Deadline rule's day; null for no rule. Each service's deadline is the first such day after its period ends, unless typed on the service. Products assigned per year, quarter or month only"},"extendedDateMonth":{"type":["number","null"],"minimum":1,"maximum":12,"description":"The Extended date rule's month; same rule as `deadlineMonth`"},"extendedDateDay":{"type":["number","null"],"minimum":1,"maximum":31,"description":"The Extended date rule's day: each service's Extended date is the first such day after its deadline. Requires `isExtendable` and a Deadline rule"},"questionnaireTabs":{"maxItems":20,"description":"Replaces the questionnaire template; left out, it stays. Organizations already holding the product keep their copy","type":"array","items":{"$ref":"#/components/schemas/ProductQuestionnaireTabInputDto"}}}},"ProductQuestionnaireDto":{"type":"object","properties":{"tabs":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ProductQuestionnaireTabDto"}}},"required":["tabs"]},"ProductAssignmentDto":{"type":"object","properties":{"orgProductId":{"type":"string","format":"uuid"},"year":{"type":["number","null"]},"periodValue":{"type":["number","null"]},"instanceName":{"type":["string","null"]},"amendmentNumber":{"type":["number","null"],"minimum":1},"hourlyRate":{"type":["number","null"],"format":"decimal","description":"The organization's hourly rate; null when the product has no rates or none is set yet."},"hasTaskLeadsPerPart":{"type":"boolean","description":"A tax credit application: its task leads are set per part, and `taskLeads` lists every part's."},"taskLeads":{"type":"array","items":{"$ref":"#/components/schemas/AssignedUserEntity"}}},"required":["orgProductId","year","periodValue","instanceName","amendmentNumber","hourlyRate","hasTaskLeadsPerPart","taskLeads"]},"ProductOrganizationDto":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/OrganizationRefDto"},"assignments":{"type":"array","items":{"$ref":"#/components/schemas/ProductAssignmentDto"}}},"required":["organization","assignments"]},"ProductOrganizationAssignmentDto":{"type":"object","properties":{"year":{"type":"number"},"periodValue":{"type":"number","description":"Period selector: month (1-12) for monthly products, quarter (1-4) for quarterly products."},"name":{"type":"string","maxLength":255,"description":"Custom instance name (required for custom-named products); unique among the organization's services of the product, ignoring case."},"hourlyRate":{"type":"number","description":"Hourly rate in USD, required for a product with rates and dropped for any other (0 allowed)."},"orgId":{"type":"string","format":"uuid"},"taskLeadIds":{"minItems":1,"maxItems":2,"description":"Task leads: active or invited admins or super admins who are members of the organization.","type":"array","items":{"type":"string"}}},"required":["orgId","taskLeadIds"]},"AssignProductOrganizationsDto":{"type":"object","properties":{"assignments":{"minItems":1,"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/ProductOrganizationAssignmentDto"}}},"required":["assignments"]},"ProspectFileEntity":{"type":"object","properties":{"id":{"type":"string"},"storageKey":{"type":"string"},"originalName":{"type":"string","description":"The name the library lists, with the upload extension; follows a rename or Re-Upload there."},"contentType":{"type":["string","null"]},"fileSize":{"type":["number","null"]},"uploadedAt":{"format":"date-time","type":"string"}},"required":["id","storageKey","originalName","contentType","fileSize","uploadedAt"]},"ProspectStep":{"type":"string","enum":["prospect_created","initial_contact","mnda_request","documents_request","pricing_sheet","agreement","become_client"]},"ProspectEntity":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":["string","null"]},"companyName":{"type":["string","null"]},"nickname":{"$ref":"#/components/schemas/NicknameEntity"},"prospectType":{"type":"string","enum":["business","individual"]},"source":{"type":["string","null"],"enum":["referral","word_of_mouth","seo_organic_search","social_media","website_direct_inquiry","cold_email","cold_calling","linkedin_outreach","paid_advertising","strategic_partnership","trade_show_conference","webinar_virtual_event","lead_generation_tool","existing_customer","employee_introduction","other",null]},"sourceDetails":{"type":["string","null"]},"phase":{"type":"string","enum":["phase_1","phase_2","phase_3","phase_4","phase_5"]},"priority":{"type":"string","enum":["low","medium","high"]},"fitScore":{"type":"number","minimum":1,"maximum":5},"followUpDate":{"format":"date-time","type":["string","null"],"description":"The next scheduled follow-up reminder's send date; null when none is scheduled."},"upcomingCallsCount":{"type":"number"},"lastActivityDate":{"format":"date-time","type":"string"},"archiveReminderFlaggedAt":{"format":"date-time","type":["string","null"]},"autoReminderEnabled":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"archivedAt":{"format":"date-time","type":["string","null"]},"notMovingForwardAt":{"format":"date-time","type":["string","null"]},"orgId":{"type":["string","null"]},"files":{"type":"array","items":{"$ref":"#/components/schemas/ProspectFileEntity"}},"currentStep":{"allOf":[{"$ref":"#/components/schemas/ProspectStep"}]},"currentStepStatus":{"type":["string","null"],"description":"The current step's status value (per the step-specific status enums)."}},"required":["id","fullName","email","phone","companyName","nickname","prospectType","source","sourceDetails","phase","priority","fitScore","followUpDate","upcomingCallsCount","lastActivityDate","archiveReminderFlaggedAt","autoReminderEnabled","createdAt","updatedAt","archivedAt","notMovingForwardAt","orgId","files","currentStep","currentStepStatus"]},"ProspectGroupEntity":{"type":"object","properties":{"nickname":{"$ref":"#/components/schemas/NicknameEntity"},"prospects":{"type":"array","items":{"$ref":"#/components/schemas/ProspectEntity"}}},"required":["nickname","prospects"]},"ProspectPhaseCountsEntity":{"type":"object","properties":{"phase_1":{"type":"number"},"phase_2":{"type":"number"},"phase_3":{"type":"number"},"phase_4":{"type":"number"},"phase_5":{"type":"number"}},"required":["phase_1","phase_2","phase_3","phase_4","phase_5"]},"ProspectGroupListEntity":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProspectGroupEntity"}},"phaseCounts":{"$ref":"#/components/schemas/ProspectPhaseCountsEntity"}},"required":["meta","data","phaseCounts"]},"ProspectExportSection":{"type":"string","enum":["prospect","location","questionnaire","contacts"]},"ProspectExportRowDto":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":["string","null"]},"companyName":{"type":["string","null"]},"nickname":{"$ref":"#/components/schemas/NicknameEntity"},"prospectType":{"type":"string","enum":["business","individual"]},"source":{"type":["string","null"],"enum":["referral","word_of_mouth","seo_organic_search","social_media","website_direct_inquiry","cold_email","cold_calling","linkedin_outreach","paid_advertising","strategic_partnership","trade_show_conference","webinar_virtual_event","lead_generation_tool","existing_customer","employee_introduction","other",null]},"sourceDetails":{"type":["string","null"]},"phase":{"type":"string","enum":["phase_1","phase_2","phase_3","phase_4","phase_5"]},"priority":{"type":"string","enum":["low","medium","high"]},"fitScore":{"type":"number","minimum":1,"maximum":5},"followUpDate":{"format":"date-time","type":["string","null"],"description":"The next scheduled follow-up reminder's send date; null when none is scheduled."},"lastActivityDate":{"format":"date-time","type":"string"},"archiveReminderFlaggedAt":{"format":"date-time","type":["string","null"]},"autoReminderEnabled":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"archivedAt":{"format":"date-time","type":["string","null"]},"notMovingForwardAt":{"format":"date-time","type":["string","null"]},"orgId":{"type":["string","null"]},"currentStep":{"allOf":[{"$ref":"#/components/schemas/ProspectStep"}]},"currentStepStatus":{"type":["string","null"],"description":"The current step's status value (per the step-specific status enums)."}},"required":["id","fullName","email","phone","companyName","nickname","prospectType","source","sourceDetails","phase","priority","fitScore","followUpDate","lastActivityDate","archiveReminderFlaggedAt","autoReminderEnabled","createdAt","updatedAt","archivedAt","notMovingForwardAt","orgId","currentStep","currentStepStatus"]},"ProspectType":{"type":"string","enum":["business","individual"]},"ProspectQuestionnaireQuestionKey":{"type":"string","enum":["full_name","email","phone","legal_name","registered","registration_locations","description","industries","website","operating_in_pr","needs_setup_help","setup_items","decree_status","decree_type","decree_number","needs_decree_amendment","needs_decree_help","incentive_items","needs_tax_help","tax_matters","performed_rnd","rnd_spend_current","rnd_spend_next","tax_credits","federal_grants","capital_services","working_with_incentives_firm","working_with_tax_firm","has_additional_entities","additional_notes","how_learned","i_full_name","i_email","i_phone","i_date_of_birth","i_citizenship_country","i_pr_residency","i_address","i_description","i_decree_status","i_decree_type","i_decree_number","i_needs_decree_amendment","i_needs_incentives_help","i_incentive_items","i_needs_tax_help","i_tax_filings","i_working_with_incentives_firm","i_working_with_tax_firm","i_additional_notes","i_how_learned"]},"ProspectApplicantType":{"type":"string","enum":["business","individual","both"]},"ProspectBusinessSetupItem":{"type":"string","enum":["certificate_of_organization","ein_letter","pr_operating_agreement_bylaws","department_of_state_registration","treasury_suri_registration","state_insurance_fund_registration","labor_dept_registration","merchant_registration_certificate","single_permit_application","provisional_municipal_license_tax","family_dept_child_support_registration","crim_registration","incentives_portal_registration","cfse_workers_comp_policy","pr_bank_account_opening","manufacturers_id","non_withholding_waiver","pr_articles_of_incorporation"]},"ProspectPricingSheetComplianceItemStatus":{"type":"string","enum":["not_applicable","status_unknown","not_started","in_process_internally","in_process_third_party","completed"]},"SetupItemStatusEntity":{"type":"object","properties":{"item":{"allOf":[{"$ref":"#/components/schemas/ProspectBusinessSetupItem"}]},"status":{"allOf":[{"$ref":"#/components/schemas/ProspectPricingSheetComplianceItemStatus"}]}},"required":["item","status"]},"ProspectBusinessIncentiveItem":{"type":"string","enum":["act60_filing","municipal_decree","decree_amendment","tourism_pre_application"]},"ProspectBusinessTaxFiling":{"type":"string","enum":["sales_use_tax","professional_services_quarterly_returns","volume_of_business","incentive_income_tax_return","informative_returns","personal_property_tax","exempt_annual_report","annual_report","federal_income_tax_return"]},"ProspectCapitalGenerationService":{"type":"string","enum":["rnd_tax_credits","tourism_tax_credits","financing_loans","federal_grants","local_grants","other"]},"ProspectIndividualDecreeType":{"type":"string","enum":["act_60","act_22","act_20","other"]},"ProspectIndividualIncentiveItem":{"type":"string","enum":["act60_individual_filing","decree_amendment"]},"ProspectIndividualTaxFiling":{"type":"string","enum":["irs_form_8898","income_tax_return","exempt_annual_report","state_income_tax_return","federal_income_tax_return","filing_extension"]},"ProspectCustomQuestionType":{"type":"string","enum":["text","long_text","boolean","yes_no_unsure","email","phone","number","date","single_select","multi_select"]},"ProspectQuestionnaireSection":{"type":"string","enum":["about_you","about_business","services","closing"]},"CustomQuestionWithAnswerEntity":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"fieldType":{"allOf":[{"$ref":"#/components/schemas/ProspectCustomQuestionType"}]},"section":{"allOf":[{"$ref":"#/components/schemas/ProspectQuestionnaireSection"}]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string"}},"sortOrder":{"type":"number"},"answer":{"type":["object","null"],"description":"Answer value typed by fieldType; null when unanswered."}},"required":["id","title","fieldType","section","required","options","sortOrder","answer"]},"QuestionnaireEntity":{"type":"object","properties":{"id":{"type":"string"},"prospectId":{"type":"string"},"flow":{"allOf":[{"$ref":"#/components/schemas/ProspectType"}]},"disabledQuestionKeys":{"type":"array","items":{"$ref":"#/components/schemas/ProspectQuestionnaireQuestionKey"}},"email":{"type":["string","null"]},"fullName":{"type":["string","null"]},"phone":{"type":["string","null"]},"applicantType":{"anyOf":[{"$ref":"#/components/schemas/ProspectApplicantType"},{"type":"null"}]},"companyLegalName":{"type":["string","null"]},"businessIncorporated":{"type":["boolean","null"]},"businessRegistrationLocations":{"type":"array","items":{"$ref":"#/components/schemas/ProspectRegistrationLocation"}},"businessRegistrationState":{"type":["string","null"]},"businessRegistrationCountry":{"type":["string","null"]},"businessDescription":{"type":["string","null"]},"businessIndustries":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndustry"}},"businessWebsite":{"type":["string","null"]},"businessEstablishedInPr":{"type":["boolean","null"]},"businessNeedsSetupHelp":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"businessSetupItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectBusinessSetupItem"}},"setupItemStatuses":{"type":"array","items":{"$ref":"#/components/schemas/SetupItemStatusEntity"}},"businessAct60Status":{"anyOf":[{"$ref":"#/components/schemas/ProspectDecreeStatus"},{"type":"null"}]},"businessDecreeType":{"anyOf":[{"$ref":"#/components/schemas/ProspectBusinessDecreeType"},{"type":"null"}]},"businessDecreeNumber":{"type":["string","null"]},"needsDecreeAmendment":{"type":["boolean","null"]},"businessNeedsIncentivesHelp":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"businessIncentiveItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectBusinessIncentiveItem"}},"businessInterestedInTaxCompliance":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"businessTaxFilings":{"type":"array","items":{"$ref":"#/components/schemas/ProspectBusinessTaxFiling"}},"businessPerformedRnd":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"rndSpendCurrentYear":{"type":["number","null"]},"rndSpendNextYear":{"type":["number","null"]},"businessReceivedTaxCredits":{"type":["boolean","null"]},"businessTaxCreditsReceived":{"type":"array","items":{"$ref":"#/components/schemas/ProspectTaxCreditType"}},"businessFederalGrantFundingReceived":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"businessCapitalServices":{"type":"array","items":{"$ref":"#/components/schemas/ProspectCapitalGenerationService"}},"citizenshipCountry":{"type":["string","null"]},"dateOfBirth":{"format":"date-time","type":["string","null"]},"isPuertoRicoResident":{"type":["boolean","null"],"description":"IIQ6: whether the Individual lives in Puerto Rico."},"individualAddressLine1":{"type":["string","null"]},"individualAddressLine2":{"type":["string","null"]},"individualCity":{"type":["string","null"]},"individualRegion":{"type":["string","null"]},"individualPostalCode":{"type":["string","null"]},"individualCountry":{"type":["string","null"]},"individualDescription":{"type":["string","null"]},"individualAct60Status":{"anyOf":[{"$ref":"#/components/schemas/ProspectDecreeStatus"},{"type":"null"}]},"individualDecreeNumber":{"type":["string","null"]},"individualDecreeType":{"anyOf":[{"$ref":"#/components/schemas/ProspectIndividualDecreeType"},{"type":"null"}]},"individualNeedsIncentivesHelp":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"individualIncentiveItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndividualIncentiveItem"}},"individualNeedsTaxHelp":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"individualTaxFilings":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndividualTaxFiling"}},"workingWithIncentivesAdvisor":{"type":["boolean","null"]},"workingWithTaxAdvisor":{"type":["boolean","null"]},"hasAdditionalEntities":{"type":["boolean","null"]},"additionalNotes":{"type":["string","null"]},"howLearnedAboutDeca":{"type":["string","null"]},"howLearnedAboutDecaOther":{"type":["string","null"]},"customQuestions":{"type":"array","items":{"$ref":"#/components/schemas/CustomQuestionWithAnswerEntity"}},"sentAt":{"format":"date-time","type":["string","null"]},"submittedAt":{"format":"date-time","type":["string","null"]},"answersUpdatedAt":{"format":"date-time","type":["string","null"],"description":"When the answers last changed: set by every answer save and by a Setup that clears or removes an answered custom question, not by sending the link or approval. Null until the first save. Send it back as `questionnaireVersion`."},"approvedAt":{"format":"date-time","type":["string","null"]},"approvedById":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","prospectId","flow","disabledQuestionKeys","email","fullName","phone","applicantType","companyLegalName","businessIncorporated","businessRegistrationLocations","businessRegistrationState","businessRegistrationCountry","businessDescription","businessIndustries","businessWebsite","businessEstablishedInPr","businessNeedsSetupHelp","businessSetupItems","setupItemStatuses","businessAct60Status","businessDecreeType","businessDecreeNumber","needsDecreeAmendment","businessNeedsIncentivesHelp","businessIncentiveItems","businessInterestedInTaxCompliance","businessTaxFilings","businessPerformedRnd","rndSpendCurrentYear","rndSpendNextYear","businessReceivedTaxCredits","businessTaxCreditsReceived","businessFederalGrantFundingReceived","businessCapitalServices","citizenshipCountry","dateOfBirth","isPuertoRicoResident","individualAddressLine1","individualAddressLine2","individualCity","individualRegion","individualPostalCode","individualCountry","individualDescription","individualAct60Status","individualDecreeNumber","individualDecreeType","individualNeedsIncentivesHelp","individualIncentiveItems","individualNeedsTaxHelp","individualTaxFilings","workingWithIncentivesAdvisor","workingWithTaxAdvisor","hasAdditionalEntities","additionalNotes","howLearnedAboutDeca","howLearnedAboutDecaOther","customQuestions","sentAt","submittedAt","answersUpdatedAt","approvedAt","approvedById","createdAt","updatedAt"]},"ProspectContactEntity":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"prospectId":{"type":"string"}},"required":["id","fullName","email","phone","createdAt","updatedAt","prospectId"]},"ProspectsExportDto":{"type":"object","properties":{"prospects":{"description":"Every prospect matching the list filters.","type":"array","items":{"$ref":"#/components/schemas/ProspectExportRowDto"}},"questionnaires":{"description":"Each prospect's active questionnaire (the one matching its type), once submitted — in full or partially. Only for the location and questionnaire sections; empty otherwise.","type":"array","items":{"$ref":"#/components/schemas/QuestionnaireEntity"}},"contacts":{"description":"Points of contact of the exported prospects. Empty when the contacts section was not requested.","type":"array","items":{"$ref":"#/components/schemas/ProspectContactEntity"}}},"required":["prospects","questionnaires","contacts"]},"ProspectFileDto":{"type":"object","properties":{"storageKey":{"type":"string"},"originalName":{"type":"string"},"contentType":{"type":"string"},"fileSize":{"type":"number"}},"required":["storageKey","originalName","contentType","fileSize"]},"CreateProspectDto":{"type":"object","properties":{"fullName":{"type":"string"},"email":{"type":"string"},"prospectType":{"type":"string","enum":["business","individual"]},"phone":{"type":"string"},"companyName":{"type":"string"},"nicknameId":{"type":"string","description":"Nickname to link. Mandatory for every prospect, so it may be omitted only when `newNickname` is sent instead."},"newNickname":{"type":"string","minLength":1,"maxLength":255,"description":"Nickname to create and link, when `nicknameId` is omitted. Wins over `nicknameId` when both are sent."},"priority":{"type":"string","enum":["low","medium","high"],"default":"medium"},"fitScore":{"type":"number","minimum":1,"maximum":5,"default":3},"note":{"type":"string","maxLength":50000,"description":"Sanitised rich text: at most 5000 characters of visible text — markup does not count — and 50000 of HTML."},"files":{"type":"array","items":{"$ref":"#/components/schemas/ProspectFileDto"}},"autoReminderEnabled":{"type":"boolean","default":true}},"required":["fullName","email","prospectType"]},"ProspectListEntity":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProspectEntity"}},"phaseCounts":{"$ref":"#/components/schemas/ProspectPhaseCountsEntity"}},"required":["meta","data","phaseCounts"]},"ProspectPhase":{"type":"string","enum":["phase_1","phase_2","phase_3","phase_4","phase_5"]},"ProspectInitialContactStatus":{"type":"string","enum":["sent","completed"]},"ProspectMndaRequestStatus":{"type":"string","enum":["pending","sent","signed","canceled"]},"ProspectDocumentsRequestStatus":{"type":"string","enum":["pending","sent","under_internal_review","approved","additional_clarification"]},"ProspectPricingSheetStatus":{"type":"string","enum":["preparing","drafted","completed","approved","rejected"]},"ProspectAgreementStatus":{"type":"string","enum":["drafted","approved_internally","presentation_scheduled","presentation_taken","redlines_requested","approved_by_client","sent_to_client","signed"]},"ProspectWorkflowBypassDto":{"type":"object","properties":{"bypassedAt":{"format":"date-time","type":"string"},"bypassedByName":{"type":["string","null"],"description":"Null once that user is deleted."},"fromPhase":{"allOf":[{"$ref":"#/components/schemas/ProspectPhase"}]},"reason":{"type":["string","null"]}},"required":["bypassedAt","bypassedByName","fromPhase","reason"]},"ProspectWorkflowEntity":{"type":"object","properties":{"id":{"type":"string"},"prospectId":{"type":"string"},"currentStep":{"allOf":[{"$ref":"#/components/schemas/ProspectStep"}]},"initialContactStatus":{"anyOf":[{"$ref":"#/components/schemas/ProspectInitialContactStatus"},{"type":"null"}]},"mndaRequestStatus":{"anyOf":[{"$ref":"#/components/schemas/ProspectMndaRequestStatus"},{"type":"null"}]},"documentsRequestStatus":{"anyOf":[{"$ref":"#/components/schemas/ProspectDocumentsRequestStatus"},{"type":"null"}]},"pricingSheetStatus":{"anyOf":[{"$ref":"#/components/schemas/ProspectPricingSheetStatus"},{"type":"null"}]},"agreementStatus":{"anyOf":[{"$ref":"#/components/schemas/ProspectAgreementStatus"},{"type":"null"}]},"pricingSheetApprovedById":{"type":["string","null"]},"pricingSheetApprovedAt":{"format":"date-time","type":["string","null"]},"pricingSheetDeclinedById":{"type":["string","null"]},"pricingSheetDeclinedAt":{"format":"date-time","type":["string","null"]},"bypass":{"description":"The latest bypass. While it is set, a step that was never completed reads as skipped.","anyOf":[{"$ref":"#/components/schemas/ProspectWorkflowBypassDto"},{"type":"null"}]},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","prospectId","currentStep","initialContactStatus","mndaRequestStatus","documentsRequestStatus","pricingSheetStatus","agreementStatus","pricingSheetApprovedById","pricingSheetApprovedAt","pricingSheetDeclinedById","pricingSheetDeclinedAt","bypass","updatedAt"]},"ProspectQuestionnaireSummaryEntity":{"type":"object","properties":{"id":{"type":"string"},"sentAt":{"format":"date-time","type":["string","null"]},"submittedAt":{"format":"date-time","type":["string","null"]}},"required":["id","sentAt","submittedAt"]},"ProspectReminderEntity":{"type":"object","properties":{"id":{"type":"string"},"prospectId":{"type":"string"},"type":{"type":"string","enum":["questionnaire","mnda","documents_request","mnda_documents_request","agreement_presentation","agreement"]},"status":{"type":"string","enum":["scheduled","sent","canceled"]},"triggerType":{"type":"string","enum":["auto","manual"]},"scheduledFor":{"format":"date-time","type":"string"},"sentAt":{"format":"date-time","type":["string","null"]},"canceledAt":{"format":"date-time","type":["string","null"]},"cancelReason":{"type":["string","null"],"enum":["action_completed","prospect_archived","prospect_stage_changed","prospect_status_changed","prospect_not_found","resent","auto_reminder_disabled","manually_canceled","system_error",null]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","prospectId","type","status","triggerType","scheduledFor","sentAt","canceledAt","cancelReason","createdAt","updatedAt"]},"ProspectDetailEntity":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":["string","null"]},"companyName":{"type":["string","null"]},"nickname":{"$ref":"#/components/schemas/NicknameEntity"},"prospectType":{"type":"string","enum":["business","individual"]},"source":{"type":["string","null"],"enum":["referral","word_of_mouth","seo_organic_search","social_media","website_direct_inquiry","cold_email","cold_calling","linkedin_outreach","paid_advertising","strategic_partnership","trade_show_conference","webinar_virtual_event","lead_generation_tool","existing_customer","employee_introduction","other",null]},"sourceDetails":{"type":["string","null"]},"priority":{"type":"string","enum":["low","medium","high"]},"fitScore":{"type":"number","minimum":1,"maximum":5},"followUpDate":{"format":"date-time","type":["string","null"],"description":"The next scheduled follow-up reminder's send date; null when none is scheduled."},"upcomingCallsCount":{"type":"number"},"unreadEmailsCount":{"type":"number"},"lastActivityDate":{"format":"date-time","type":"string"},"archiveReminderFlaggedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"archivedAt":{"format":"date-time","type":["string","null"]},"notMovingForwardAt":{"format":"date-time","type":["string","null"]},"orgId":{"type":["string","null"]},"autoReminderEnabled":{"type":"boolean"},"phase":{"allOf":[{"$ref":"#/components/schemas/ProspectPhase"}]},"currentStep":{"allOf":[{"$ref":"#/components/schemas/ProspectStep"}]},"currentStepStatus":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/ProspectInitialContactStatus"},{"$ref":"#/components/schemas/ProspectMndaRequestStatus"},{"$ref":"#/components/schemas/ProspectDocumentsRequestStatus"},{"$ref":"#/components/schemas/ProspectPricingSheetStatus"},{"$ref":"#/components/schemas/ProspectAgreementStatus"}]},{"type":"null"}]},"availableStatuses":{"description":"Statuses the current step can be manually moved to via the editable status dropdown. Empty when no manual move is available.","type":"array","items":{"type":"string"}},"isPricingSheetLocked":{"type":"boolean","description":"True while the prospect is archived or the pricing sheet status is one of: completed, approved, rejected; the sheet and its draft are read-only."},"workflow":{"$ref":"#/components/schemas/ProspectWorkflowEntity"},"files":{"type":"array","items":{"$ref":"#/components/schemas/ProspectFileEntity"}},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/ProspectContactEntity"}},"questionnaire":{"anyOf":[{"$ref":"#/components/schemas/ProspectQuestionnaireSummaryEntity"},{"type":"null"}]},"latestReminder":{"anyOf":[{"$ref":"#/components/schemas/ProspectReminderEntity"},{"type":"null"}]}},"required":["id","fullName","email","phone","companyName","nickname","prospectType","source","sourceDetails","priority","fitScore","followUpDate","upcomingCallsCount","unreadEmailsCount","lastActivityDate","archiveReminderFlaggedAt","createdAt","updatedAt","archivedAt","notMovingForwardAt","orgId","autoReminderEnabled","phase","currentStep","currentStepStatus","availableStatuses","isPricingSheetLocked","workflow","files","contacts","questionnaire","latestReminder"]},"UpdateProspectDto":{"type":"object","properties":{"fullName":{"type":"string","minLength":1},"email":{"type":"string"},"nicknameId":{"type":"string","description":"Nickname to link. Mandatory for every prospect, so it can be reassigned but never cleared."},"newNickname":{"type":"string","minLength":1,"maxLength":255,"description":"Nickname to create and link, when `nicknameId` is omitted. Wins over `nicknameId` when both are sent."},"prospectType":{"type":"string","enum":["business","individual"]},"phone":{"type":["string","null"]},"companyName":{"type":["string","null"]},"source":{"type":["string","null"],"enum":["referral","word_of_mouth","seo_organic_search","social_media","website_direct_inquiry","cold_email","cold_calling","linkedin_outreach","paid_advertising","strategic_partnership","trade_show_conference","webinar_virtual_event","lead_generation_tool","existing_customer","employee_introduction","other",null]},"sourceDetails":{"type":["string","null"]},"priority":{"type":"string","enum":["low","medium","high"]},"fitScore":{"type":"number","minimum":1,"maximum":5},"addFiles":{"type":"array","items":{"$ref":"#/components/schemas/ProspectFileDto"}},"removeFileIds":{"type":"array","items":{"type":"string"}},"autoReminderEnabled":{"type":"boolean"}}},"SetProspectWorkflowStatusDto":{"type":"object","properties":{"step":{"description":"Step the status belongs to. A status the prospect already passed on an earlier step is a no-op rather than an error.","allOf":[{"$ref":"#/components/schemas/ProspectStep"}]},"status":{"type":"string","description":"Target status for the prospect's current workflow step. Must be one of the `availableStatuses` exposed on the prospect detail (a valid manual transition for the current step + status)."}},"required":["step","status"]},"CreateProspectContactDto":{"type":"object","properties":{"fullName":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["fullName"]},"UpdateProspectContactDto":{"type":"object","properties":{"fullName":{"type":"string","minLength":1},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}}},"SuggestedConversionUserDto":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"source":{"type":"string","enum":["prospect","point_of_contact","agreement_contact","agreement_signatory"]},"userType":{"type":"string","enum":["super_admin","admin","client","cpa_external"]}},"required":["name","email","source","userType"]},"ConversionBusinessInfoDto":{"type":"object","properties":{"entityType":{"type":"string","enum":["business","individual"]},"name":{"type":"string"},"legalName":{"type":["string","null"]},"webAddress":{"type":["string","null"]},"address":{"type":["string","null"],"description":"Read off a bypass agreement; null for every other prospect."},"nicknameId":{"type":"string"}},"required":["entityType","name","legalName","webAddress","address","nicknameId"]},"BusinessProfilePrefillDto":{"type":"object","properties":{"legalBusinessName":{"type":["string","null"]},"ein":{"type":["string","null"]},"incorporationCountry":{"type":["string","null"]},"incorporationState":{"type":["string","null"]},"organizationType":{"type":["string","null"],"enum":["corporation","limited_liability_company","partnership","sole_proprietor","other",null]},"otherOrganizationType":{"type":["string","null"]},"corporateResidency":{"type":["string","null"],"enum":["domestic_pr","foreign_usa","foreign_non_usa",null]},"decreeStatus":{"anyOf":[{"$ref":"#/components/schemas/ProspectDecreeStatus"},{"type":"null"}]},"taxExemptionGrantNumber":{"type":["string","null"]},"decreeType":{"anyOf":[{"$ref":"#/components/schemas/ProspectBusinessDecreeType"},{"type":"null"}]},"businessEmail":{"type":["string","null"]},"businessPhoneNumber":{"type":["string","null"]},"isDba":{"type":["boolean","null"]},"dbaName":{"type":["string","null"]},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"pocFullName":{"type":["string","null"]},"pocRelationWithCompany":{"type":["string","null"]},"pocEmail":{"type":["string","null"]},"pocPhoneNumber":{"type":["string","null"]},"isOperatingInPr":{"type":["boolean","null"]},"industries":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndustry"}},"taxCreditsReceived":{"type":"array","items":{"$ref":"#/components/schemas/ProspectTaxCreditType"}},"noTaxCreditsIssued":{"type":["boolean","null"]},"performsRnd":{"type":["boolean","null"]},"rndSpendCurrentYear":{"type":["number","null"]},"rndSpendNextYear":{"type":["number","null"]},"receivedFederalGrants":{"type":["boolean","null"]},"businessDescription":{"type":["string","null"]}},"required":["legalBusinessName","ein","incorporationCountry","incorporationState","organizationType","otherOrganizationType","corporateResidency","decreeStatus","taxExemptionGrantNumber","decreeType","businessEmail","businessPhoneNumber","isDba","dbaName","physicalAddress","pocFullName","pocRelationWithCompany","pocEmail","pocPhoneNumber","isOperatingInPr","industries","taxCreditsReceived","noTaxCreditsIssued","performsRnd","rndSpendCurrentYear","rndSpendNextYear","receivedFederalGrants","businessDescription"]},"IndividualProfilePrefillDto":{"type":"object","properties":{"legalName":{"type":["string","null"]},"citizenship":{"type":["string","null"]},"prResidency":{"type":["string","null"],"enum":["resident","planning_relocation","exploring_relocation",null]},"email":{"type":["string","null"]},"physicalAddress":{"$ref":"#/components/schemas/OptionalAddressEntity"},"decreeStatus":{"type":["string","null"],"enum":["issued_and_accepted","submitted_not_approved","none_filed",null]},"taxExemptionGrantNumber":{"type":["string","null"]},"decreeType":{"type":["string","null"],"enum":["act_60","act_22","act_20","other",null]},"birthdate":{"type":["string","null"],"description":"ISO date (YYYY-MM-DD)"},"phone":{"type":["string","null"],"description":"Suggestion only — client must confirm primary phone."}},"required":["legalName","citizenship","prResidency","email","physicalAddress","decreeStatus","taxExemptionGrantNumber","decreeType","birthdate","phone"]},"SuggestedConversionProductDto":{"type":"object","properties":{"productId":{"type":"string"},"productType":{"type":"string","enum":["rnd_tax_credit","rnd_tax_credit_amendment","act_60","act_60_amendment","certificate_of_organization","articles_of_incorporation","ein_letter","operating_agreement_bylaws","department_of_state_registrations","treasury_suri_registration","child_support_registration","crim_registration","state_insurance_fund_registration","labor_human_resources_registration","incentives_portal_registration","merchants_registration_certificate","single_permit_application","provisional_municipal_license_tax","local_pr_bank_account","manufacturers_id","non_withholding_waiver","municipal_decree","sales_use_tax","professional_services_rendered","volume_of_business","incentive_income_tax_return","informative_returns","personal_property_tax","annual_report","exempt_annual_report","federal_income_tax_return","irs_form_8898","income_tax_return","state_income_tax_return","filing_extension","tourism_tax_credit","financing","federal_grant","eif_grant","me_grant","other_grant","ad_hoc_foundational_services","ad_hoc_incentives","ad_hoc_tax_compliance","ad_hoc_tax_credits","ad_hoc_financing","ad_hoc_local_grants","ad_hoc_federal_grants","custom"]},"productName":{"type":"string"},"instanceName":{"type":["string","null"],"description":"The instance name a custom-named product is created with: an ad hoc product is named after its own department (\"Ad Hoc Foundational Services\"); null otherwise."},"hourlyRate":{"type":["number","null"],"description":"The hourly rate the agreement states for a product with rates; null otherwise."}},"required":["productId","productType","productName","instanceName","hourlyRate"]},"ProspectAgreementParsingStatus":{"type":"string","enum":["pending","processing","parsed","failed"],"description":"A read still in flight once it has lost its task reports `failed`."},"ProspectAgreementParsingDto":{"type":"object","properties":{"status":{"description":"A read still in flight once it has lost its task reports `failed`.","allOf":[{"$ref":"#/components/schemas/ProspectAgreementParsingStatus"}]}},"required":["status"]},"ConversionAgreementDto":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"}},"required":["name","url"]},"ConversionDraftEntity":{"type":"object","properties":{"data":{"type":"object","additionalProperties":true},"updatedAt":{"format":"date-time","type":"string"}},"required":["data","updatedAt"]},"ConversionPrefillDto":{"type":"object","properties":{"suggestedUsers":{"type":"array","items":{"$ref":"#/components/schemas/SuggestedConversionUserDto"}},"businessInfo":{"$ref":"#/components/schemas/ConversionBusinessInfoDto"},"businessProfile":{"anyOf":[{"$ref":"#/components/schemas/BusinessProfilePrefillDto"},{"type":"null"}]},"individualProfile":{"anyOf":[{"$ref":"#/components/schemas/IndividualProfilePrefillDto"},{"type":"null"}]},"suggestedProducts":{"type":"array","items":{"$ref":"#/components/schemas/SuggestedConversionProductDto"}},"unmatchedAgreementServices":{"description":"Services the AI found in a bypass agreement but could not match to a catalog product with confidence, each named once.","type":"array","items":{"type":"string"}},"agreementParsing":{"description":"The read of the agreement the prospect was bypassed with; null for a prospect never bypassed.","anyOf":[{"$ref":"#/components/schemas/ProspectAgreementParsingDto"},{"type":"null"}]},"agreement":{"anyOf":[{"$ref":"#/components/schemas/ConversionAgreementDto"},{"type":"null"}]},"draft":{"anyOf":[{"$ref":"#/components/schemas/ConversionDraftEntity"},{"type":"null"}]}},"required":["suggestedUsers","businessInfo","businessProfile","individualProfile","suggestedProducts","unmatchedAgreementServices","agreementParsing","agreement","draft"]},"EmailAvailabilityDto":{"type":"object","properties":{"available":{"type":"boolean"}},"required":["available"]},"UpsertConversionDraftDto":{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}},"required":["data"]},"ConvertOrganizationDto":{"type":"object","properties":{"name":{"type":"string"},"legalName":{"type":"string"},"domain":{"type":"string"},"address":{"type":"string"},"assignedAdminId":{"type":["string","null"],"description":"Primary key account manager. Must be an active or invited admin or super admin."},"nicknameId":{"type":"string","description":"Nickname to link. Mandatory for every organization, so it may be omitted only when `newNickname` is sent instead."},"newNickname":{"type":"string","minLength":1,"maxLength":255,"description":"Nickname to create and link, when `nicknameId` is omitted. Wins over `nicknameId` when both are sent."},"entityType":{"type":"string","enum":["business","individual"]}},"required":["name","entityType"]},"ConvertUserDto":{"type":"object","properties":{"permissionTemplateId":{"type":"string","description":"Permission template ID to assign to user. Mutually exclusive with permissions."},"permissions":{"type":"array","description":"Custom permissions to assign to user. Mutually exclusive with permissionTemplateId.","items":{"$ref":"#/components/schemas/Permission"}},"name":{"type":"string","example":"John Doe"},"email":{"type":"string","example":"john.doe@example.com"},"userType":{"type":"string","enum":["client"]}},"required":["name","email","userType"]},"ConvertProspectDto":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/ConvertOrganizationDto"},"businessProfile":{"$ref":"#/components/schemas/CreateBusinessProfileDto"},"individualProfile":{"$ref":"#/components/schemas/CreateIndividualProfileDto"},"users":{"type":"array","items":{"$ref":"#/components/schemas/ConvertUserDto"}},"products":{"type":"array","items":{"$ref":"#/components/schemas/AddProductDto"}}},"required":["organization","users"]},"ConversionResultDto":{"type":"object","properties":{"organizationId":{"type":"string"}},"required":["organizationId"]},"ProspectCustomQuestionnaireStatus":{"type":"string","enum":["draft","sent","submitted"]},"ProspectCustomQuestionnaireDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/ProspectCustomQuestionnaireStatus"}]},"tabs":{"type":"array","items":{"$ref":"#/components/schemas/ProductQuestionnaireTabDto"}},"answers":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]},"description":"The prospect's answers, keyed by question id; empty until submitted"},"sentAt":{"format":"date-time","type":["string","null"]},"submittedAt":{"format":"date-time","type":["string","null"]}},"required":["id","name","status","tabs","answers","sentAt","submittedAt"]},"SaveProspectCustomQuestionnaireDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255},"tabs":{"minItems":1,"maxItems":20,"description":"Questions tabs only, each with at least one field. Tab icons are kept as sent but not used; every tab is stored unlocked.","type":"array","items":{"$ref":"#/components/schemas/ProductQuestionnaireTabInputDto"}}},"required":["name","tabs"]},"SendProspectCustomQuestionnaireDto":{"type":"object","properties":{"subject":{"type":"string","maxLength":255},"bodyHtml":{"type":"string","maxLength":50000,"description":"Editor HTML, sanitized to paragraphs, line breaks and mention links; 1-5000 characters of visible text."},"toEmails":{"maxItems":50,"minItems":1,"type":"array","items":{"type":"string","format":"email"}},"ccEmails":{"maxItems":50,"description":"Up to 50 recipients (To and CC combined)","type":"array","items":{"type":"string","format":"email"}},"attachmentFileIds":{"maxItems":10,"description":"The `fileId` of each file uploaded through `POST /files/upload` or copied by `POST /email-attachments/:fileId/watermark`, together at most 7 MB. Files in the `email-attachments` folder are deleted once the email reaches a recipient, or a day after upload when no email takes them.","type":"array","items":{"type":"string"}}},"required":["subject","bodyHtml","toEmails","ccEmails"]},"PublicProspectCustomQuestionnaireDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The questionnaire's id; unlike the token, the same across resends"},"name":{"type":"string"},"tabs":{"type":"array","items":{"$ref":"#/components/schemas/ProductQuestionnaireTabDto"}},"questionnaireVersion":{"type":"string","format":"date-time","description":"The questionnaire's version, sent back on submit so a form an admin changed since is refused"}},"required":["id","name","tabs","questionnaireVersion"]},"SubmitProspectCustomQuestionnaireDto":{"type":"object","properties":{"answers":{"maxItems":2000,"description":"Answers to the questionnaire questions, one each; a required question needs one.","type":"array","items":{"$ref":"#/components/schemas/ProductQuestionnaireAnswerInputDto"}},"questionnaireVersion":{"type":"string","format":"date-time","description":"The `questionnaireVersion` the form was loaded at"}},"required":["answers","questionnaireVersion"]},"ProspectNoteEntity":{"type":"object","properties":{"id":{"type":"string"},"createdById":{"type":["string","null"]},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/NoteAuthorEntity"},{"type":"null"}]},"content":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"title":{"type":["string","null"]},"source":{"type":["string","null"],"enum":["scribe",null]},"meetingDate":{"format":"date-time","type":["string","null"]},"participants":{"type":"array","items":{"type":"string"}},"prospectId":{"type":"string"},"noteId":{"type":"string"}},"required":["id","createdById","createdBy","content","createdAt","updatedAt","title","source","meetingDate","participants","prospectId","noteId"]},"CreateProspectNoteDto":{"type":"object","properties":{"content":{"type":"string","maxLength":50000,"description":"Sanitised rich text: at most 5000 characters of visible text — markup does not count — and 50000 of HTML."}},"required":["content"]},"UpdateProspectNoteDto":{"type":"object","properties":{"content":{"type":"string","maxLength":50000,"description":"Sanitised rich text: at most 5000 characters of visible text — markup does not count — and 50000 of HTML."}},"required":["content"]},"ProspectNotesSummaryEntity":{"type":"object","properties":{"id":{"type":"string"},"prospectId":{"type":"string"},"kind":{"type":"string","enum":["note","meeting"]},"content":{"type":"string"},"generatedBy":{"anyOf":[{"$ref":"#/components/schemas/NoteAuthorEntity"},{"type":"null"}]},"generatedAt":{"format":"date-time","type":"string"}},"required":["id","prospectId","kind","content","generatedBy","generatedAt"]},"ProspectNotesSummaryResponseDto":{"type":"object","properties":{"summary":{"anyOf":[{"$ref":"#/components/schemas/ProspectNotesSummaryEntity"},{"type":"null"}]},"isStale":{"type":"boolean"}},"required":["summary","isStale"]},"ProspectNoteListEntity":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProspectNoteEntity"}}},"required":["meta","data"]},"CreateProspectMeetingNoteDto":{"type":"object","properties":{"content":{"type":"string","maxLength":75000}},"required":["content"]},"UpdateProspectMeetingNoteDto":{"type":"object","properties":{"content":{"type":"string","maxLength":75000}},"required":["content"]},"PricingSheetStatus":{"type":"string","enum":["draft","submitted"],"description":"Derived from persistence: 'submitted' when a pricing-sheet row exists, 'draft' otherwise."},"ProspectBusinessOperatingLocation":{"type":"string","enum":["puerto_rico_only","us_mainland_only","both_pr_and_us","outside_us","not_yet_operating"]},"ProspectBusinessPuertoRicoStatus":{"type":"string","enum":["operating","planning","exploring"]},"ProspectIntroductionMeetingEntity":{"type":"object","properties":{"prospectLegalName":{"type":["string","null"]},"prospectDbaName":{"type":["string","null"]},"prospectWebsite":{"type":["string","null"]},"incorporationJurisdiction":{"type":["string","null"]},"authorizedSignatoryName":{"type":["string","null"]},"primaryContactName":{"type":["string","null"]},"primaryContactEmail":{"type":["string","null"]},"primaryContactPhone":{"type":["string","null"]},"businessOperatingLocation":{"anyOf":[{"$ref":"#/components/schemas/ProspectBusinessOperatingLocation"},{"type":"null"}]},"businessPuertoRicoStatus":{"anyOf":[{"$ref":"#/components/schemas/ProspectBusinessPuertoRicoStatus"},{"type":"null"}]},"businessAct60Status":{"anyOf":[{"$ref":"#/components/schemas/ProspectDecreeStatus"},{"type":"null"}]},"businessIndustries":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndustry"}},"businessTaxCreditsReceived":{"type":"array","items":{"$ref":"#/components/schemas/ProspectTaxCreditType"}},"businessNoTaxCreditsIssued":{"type":["boolean","null"]},"rndSpendCurrentYear":{"type":["number","null"]},"rndSpendNextYear":{"type":["number","null"]},"businessReceivedFederalGrants":{"type":["boolean","null"]},"workingWithIncentivesAdvisor":{"type":["boolean","null"]},"workingWithTaxAdvisor":{"type":["boolean","null"]}},"required":["prospectLegalName","prospectDbaName","prospectWebsite","incorporationJurisdiction","authorizedSignatoryName","primaryContactName","primaryContactEmail","primaryContactPhone","businessOperatingLocation","businessPuertoRicoStatus","businessAct60Status","businessIndustries","businessTaxCreditsReceived","businessNoTaxCreditsIssued","rndSpendCurrentYear","rndSpendNextYear","businessReceivedFederalGrants","workingWithIncentivesAdvisor","workingWithTaxAdvisor"]},"ProspectPricingSheetComplianceItemType":{"type":"string","enum":["certificate_of_organization","ein_letter","pr_operating_agreement","pr_articles_of_incorporation","merchant_registration","manufacturers_id","department_of_state_registration","treasury_suri_registration","family_dept_registration","crim_registration","state_insurance_fund_registration","labor_dept_registration","incentives_portal_registration","single_permit_application","provisional_municipal_license_tax","cfse_workers_compensation","local_pr_bank_account"]},"ProspectServicesAssessmentComplianceItemEntity":{"type":"object","properties":{"itemType":{"allOf":[{"$ref":"#/components/schemas/ProspectPricingSheetComplianceItemType"}]},"status":{"allOf":[{"$ref":"#/components/schemas/ProspectPricingSheetComplianceItemStatus"}]}},"required":["itemType","status"]},"ProspectPricingSheetServiceType":{"type":"string","enum":["pr_entity_setup","pr_governmental_registrations","pr_permitting_banking","incentives_decree","municipal_decree","pr_corporate_tax_compliance","pr_individual_tax_compliance","pr_tax_credit_support","financing_support","renewable_energy_incentives","local_pr_cash_grants","federal_grants","job_creation_wioa"]},"ProspectServiceInterest":{"type":"string","enum":["service_needed","interested_in_exploring","not_currently_interested","unsure"]},"ProspectServicesAssessmentInterestEntity":{"type":"object","properties":{"serviceType":{"allOf":[{"$ref":"#/components/schemas/ProspectPricingSheetServiceType"}]},"interest":{"allOf":[{"$ref":"#/components/schemas/ProspectServiceInterest"}]}},"required":["serviceType","interest"]},"ProspectServicesAssessmentEntity":{"type":"object","properties":{"complianceItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectServicesAssessmentComplianceItemEntity"}},"serviceInterests":{"type":"array","items":{"$ref":"#/components/schemas/ProspectServicesAssessmentInterestEntity"}}},"required":["complianceItems","serviceInterests"]},"ProspectFoundationalServiceStatus":{"type":"string","enum":["n_a","completed_by_client","managed_by_client_review","managed_by_deca_new","managed_by_deca_amendment"]},"ProspectFoundationalItemEntity":{"type":"object","properties":{"id":{"type":["string","null"],"description":"Null for an entry the GET filled in from the first page, until the sheet is saved."},"itemType":{"anyOf":[{"$ref":"#/components/schemas/ProspectPricingSheetComplianceItemType"},{"type":"null"}]},"name":{"type":["string","null"]},"status":{"anyOf":[{"$ref":"#/components/schemas/ProspectFoundationalServiceStatus"},{"type":"null"}]},"pricingAdjustment":{"type":["number","null"]},"order":{"type":"number"}},"required":["id","itemType","name","status","pricingAdjustment","order"]},"ProspectIncentivesDecreeType":{"type":"string","enum":["n_a","manufacturing","manufacturing_and_rd","green_energy","visitors_economy","export_activities","agroindustry"]},"ProspectIncentivesDecreeStatus":{"type":"string","enum":["n_a","completed_no_review","managed_by_client_deca_review","new_decree","decree_amendment"]},"ProspectPuertoRicoMunicipality":{"type":"string","enum":["n_a","aguadilla","bayamon","caguas","carolina","dorado","guaynabo","humacao","ponce","san_juan","mayaguez","rincon"]},"ProspectIncentivesDecreeEntity":{"type":"object","properties":{"id":{"type":["string","null"],"description":"Null for an entry the GET filled in from the first page, until the sheet is saved."},"incentivesDecreeType":{"anyOf":[{"$ref":"#/components/schemas/ProspectIncentivesDecreeType"},{"type":"null"}]},"incentivesStatus":{"anyOf":[{"$ref":"#/components/schemas/ProspectIncentivesDecreeStatus"},{"type":"null"}]},"incentivesPricingAdjustment":{"type":["number","null"]},"incentivesDueAtSigning":{"type":["number","null"]},"incentivesDueAtSubmission":{"type":["number","null"]},"incentivesDueAtApproval":{"type":["number","null"]},"municipalDecreeMunicipality":{"anyOf":[{"$ref":"#/components/schemas/ProspectPuertoRicoMunicipality"},{"type":"null"}]},"municipalStatus":{"anyOf":[{"$ref":"#/components/schemas/ProspectIncentivesDecreeStatus"},{"type":"null"}]},"municipalPricingAdjustment":{"type":["number","null"]},"municipalDueAtSigning":{"type":["number","null"]},"municipalDueAtSubmission":{"type":["number","null"]},"municipalDueAtApproval":{"type":["number","null"]}},"required":["id","incentivesDecreeType","incentivesStatus","incentivesPricingAdjustment","incentivesDueAtSigning","incentivesDueAtSubmission","incentivesDueAtApproval","municipalDecreeMunicipality","municipalStatus","municipalPricingAdjustment","municipalDueAtSigning","municipalDueAtSubmission","municipalDueAtApproval"]},"ProspectCorpTaxComplexity":{"type":"string","enum":["basic","medium","advanced"]},"ProspectCorpTaxFilingType":{"type":"string","enum":["incentive_income_tax_return","volume_of_business","personal_property_tax","exempt_annual_report","annual_report","informative_returns","sales_and_use_tax","professional_service_rendered_quarterly_returns","cfse_policy","federal_income_tax_return","filing_extension"]},"ProspectTaxFilingStatus":{"type":"string","enum":["n_a","managed_by_client","managed_by_deca"]},"ProspectCorpTaxItemEntity":{"type":"object","properties":{"id":{"type":["string","null"],"description":"Null for an entry the GET filled in from the first page, until the sheet is saved."},"filingType":{"anyOf":[{"$ref":"#/components/schemas/ProspectCorpTaxFilingType"},{"type":"null"}]},"name":{"type":["string","null"]},"status":{"anyOf":[{"$ref":"#/components/schemas/ProspectTaxFilingStatus"},{"type":"null"}]},"pricingAdjustment":{"type":["number","null"]},"occurrence":{"anyOf":[{"$ref":"#/components/schemas/ProspectFilingOccurrence"},{"type":"null"}]},"annualCost":{"type":["number","null"]},"order":{"type":"number"}},"required":["id","filingType","name","status","pricingAdjustment","occurrence","annualCost","order"]},"ProspectCorpTaxEntity":{"type":"object","properties":{"id":{"type":["string","null"],"description":"Null for an entry the GET filled in from the first page, until the sheet is saved."},"complexityRanking":{"anyOf":[{"$ref":"#/components/schemas/ProspectCorpTaxComplexity"},{"type":"null"}]},"items":{"type":"array","items":{"$ref":"#/components/schemas/ProspectCorpTaxItemEntity"}}},"required":["id","complexityRanking","items"]},"ProspectIndividualTaxFilingType":{"type":"string","enum":["irs_form_8898","income_tax_return","exempt_annual_report","state_income_tax_return","federal_income_tax_return","filing_extension"]},"ProspectIndividualTaxItemEntity":{"type":"object","properties":{"id":{"type":"string"},"filingType":{"anyOf":[{"$ref":"#/components/schemas/ProspectIndividualTaxFilingType"},{"type":"null"}]},"name":{"type":["string","null"]},"status":{"anyOf":[{"$ref":"#/components/schemas/ProspectTaxFilingStatus"},{"type":"null"}]},"pricingAdjustment":{"type":["number","null"]},"occurrence":{"anyOf":[{"$ref":"#/components/schemas/ProspectFilingOccurrence"},{"type":"null"}]},"annualCost":{"type":["number","null"]},"order":{"type":"number"}},"required":["id","filingType","name","status","pricingAdjustment","occurrence","annualCost","order"]},"ProspectRdPricingType":{"type":"string","enum":["standard","multinational"]},"ProspectAccessToCapitalServiceType":{"type":"string","enum":["non_securities_financing","aup_fee","green_energy","wioa"]},"ProspectAccessToCapitalServiceStatus":{"type":"string","enum":["n_a","included"]},"ProspectAccessToCapitalItemEntity":{"type":"object","properties":{"id":{"type":["string","null"],"description":"Null for an entry the GET filled in from the first page, until the sheet is saved."},"serviceType":{"allOf":[{"$ref":"#/components/schemas/ProspectAccessToCapitalServiceType"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/ProspectAccessToCapitalServiceStatus"},{"type":"null"}]},"rate":{"type":["number","null"]}},"required":["id","serviceType","status","rate"]},"ProspectRdBracketEntity":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"bottomBracket":{"type":["number","null"]},"topBracket":{"type":["number","null"]},"successFeeRate":{"type":["number","null"]},"successFeeAmount":{"type":["number","null"]}},"required":["id","order","bottomBracket","topBracket","successFeeRate","successFeeAmount"]},"ProspectAccessToCapitalEntity":{"type":"object","properties":{"id":{"type":["string","null"],"description":"Null for an entry the GET filled in from the first page, until the sheet is saved."},"rdPricingType":{"anyOf":[{"$ref":"#/components/schemas/ProspectRdPricingType"},{"type":"null"}]},"rdEstimatedCashReceived":{"type":["number","null"]},"rdEstimatedSuccessFee":{"type":["number","null"],"description":"DECA Estimated Success Fee Generated."},"rdEffectiveRate":{"type":["number","null"],"description":"Effective Success Fee Rate."},"multinationalRdIncrementalRate":{"type":["number","null"]},"multinationalRdNewFilingsRate":{"type":["number","null"]},"multinationalRdEstimatedCashIncremental":{"type":["number","null"]},"multinationalRdEstimatedCashNewFilings":{"type":["number","null"]},"multinationalRdEstimatedSuccessFee":{"type":["number","null"],"description":"DECA Estimated Success Fee Generated (Multinational)."},"multinationalRdEffectiveRate":{"type":["number","null"],"description":"Effective Success Fee Rate (Multinational)."},"items":{"type":"array","items":{"$ref":"#/components/schemas/ProspectAccessToCapitalItemEntity"}},"brackets":{"type":"array","items":{"$ref":"#/components/schemas/ProspectRdBracketEntity"}}},"required":["id","rdPricingType","rdEstimatedCashReceived","rdEstimatedSuccessFee","rdEffectiveRate","multinationalRdIncrementalRate","multinationalRdNewFilingsRate","multinationalRdEstimatedCashIncremental","multinationalRdEstimatedCashNewFilings","multinationalRdEstimatedSuccessFee","multinationalRdEffectiveRate","items","brackets"]},"ProspectPricingSheetTotalsEntity":{"type":"object","properties":{"dueAtSigning":{"type":"number","description":"Sum of foundational item pricing adjustments — what is due at signing."},"corpTaxTotalAnnualCost":{"type":"number","description":"Sum of stored corp-tax item annual costs."},"individualTaxTotalAnnualCost":{"type":"number","description":"Sum of stored individual-tax item annual costs."}},"required":["dueAtSigning","corpTaxTotalAnnualCost","individualTaxTotalAnnualCost"]},"ProspectPricingSheetEntity":{"type":"object","properties":{"id":{"type":["string","null"],"description":"Null when the pricing sheet has not been persisted yet (virtual template shape)."},"prospectId":{"type":"string"},"status":{"description":"Derived from persistence: 'submitted' when a pricing-sheet row exists, 'draft' otherwise.","allOf":[{"$ref":"#/components/schemas/PricingSheetStatus"}]},"adHocHourlyRate":{"type":["number","null"]},"introductionMeeting":{"$ref":"#/components/schemas/ProspectIntroductionMeetingEntity"},"servicesAssessment":{"$ref":"#/components/schemas/ProspectServicesAssessmentEntity"},"foundationalItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectFoundationalItemEntity"}},"incentivesDecree":{"anyOf":[{"$ref":"#/components/schemas/ProspectIncentivesDecreeEntity"},{"type":"null"}]},"corpTax":{"anyOf":[{"$ref":"#/components/schemas/ProspectCorpTaxEntity"},{"type":"null"}]},"individualTaxItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndividualTaxItemEntity"}},"accessToCapital":{"anyOf":[{"$ref":"#/components/schemas/ProspectAccessToCapitalEntity"},{"type":"null"}]},"totals":{"$ref":"#/components/schemas/ProspectPricingSheetTotalsEntity"},"answersSubmittedAt":{"format":"date-time","type":["string","null"],"description":"When the prospect's Pricing Form answers this response read were submitted, whether or not the sheet takes the fill; null when none are submitted. The admin sends it back as the upsert's `answersSubmittedAt`."},"createdAt":{"format":"date-time","type":["string","null"]},"updatedAt":{"format":"date-time","type":["string","null"]}},"required":["id","prospectId","status","adHocHourlyRate","introductionMeeting","servicesAssessment","foundationalItems","incentivesDecree","corpTax","individualTaxItems","accessToCapital","totals","answersSubmittedAt","createdAt","updatedAt"]},"ProspectIntroductionMeetingDto":{"type":"object","properties":{"prospectLegalName":{"type":["string","null"]},"prospectDbaName":{"type":["string","null"]},"prospectWebsite":{"type":["string","null"]},"incorporationJurisdiction":{"type":["string","null"]},"authorizedSignatoryName":{"type":["string","null"]},"primaryContactName":{"type":["string","null"]},"primaryContactEmail":{"type":["string","null"]},"primaryContactPhone":{"type":["string","null"]},"businessOperatingLocation":{"anyOf":[{"$ref":"#/components/schemas/ProspectBusinessOperatingLocation"},{"type":"null"}]},"businessPuertoRicoStatus":{"anyOf":[{"$ref":"#/components/schemas/ProspectBusinessPuertoRicoStatus"},{"type":"null"}]},"businessAct60Status":{"anyOf":[{"$ref":"#/components/schemas/ProspectDecreeStatus"},{"type":"null"}]},"businessIndustries":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndustry"}},"businessTaxCreditsReceived":{"type":"array","items":{"$ref":"#/components/schemas/ProspectTaxCreditType"}},"businessNoTaxCreditsIssued":{"type":["boolean","null"]},"rndSpendCurrentYear":{"type":["number","null"]},"rndSpendNextYear":{"type":["number","null"]},"businessReceivedFederalGrants":{"type":["boolean","null"]},"workingWithIncentivesAdvisor":{"type":["boolean","null"]},"workingWithTaxAdvisor":{"type":["boolean","null"]}}},"ProspectServicesAssessmentComplianceItemDto":{"type":"object","properties":{"itemType":{"allOf":[{"$ref":"#/components/schemas/ProspectPricingSheetComplianceItemType"}]},"status":{"allOf":[{"$ref":"#/components/schemas/ProspectPricingSheetComplianceItemStatus"}]}},"required":["itemType","status"]},"ProspectServicesAssessmentInterestDto":{"type":"object","properties":{"serviceType":{"allOf":[{"$ref":"#/components/schemas/ProspectPricingSheetServiceType"}]},"interest":{"allOf":[{"$ref":"#/components/schemas/ProspectServiceInterest"}]}},"required":["serviceType","interest"]},"ProspectServicesAssessmentDto":{"type":"object","properties":{"complianceItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectServicesAssessmentComplianceItemDto"}},"serviceInterests":{"type":"array","items":{"$ref":"#/components/schemas/ProspectServicesAssessmentInterestDto"}}}},"ProspectFoundationalItemInputDto":{"type":"object","properties":{"itemType":{"description":"Identifies one of the 17 known foundational artifacts. Either `itemType` or `name` (or both) must be provided.","anyOf":[{"$ref":"#/components/schemas/ProspectPricingSheetComplianceItemType"},{"type":"null"}]},"name":{"type":["string","null"],"description":"Free-form label for custom rows that do not map to a known itemType. Required when `itemType` is not provided."},"status":{"anyOf":[{"$ref":"#/components/schemas/ProspectFoundationalServiceStatus"},{"type":"null"}]},"pricingAdjustment":{"type":["number","null"]},"order":{"type":"number"}},"required":["order"]},"ProspectIncentivesDecreeInputDto":{"type":"object","properties":{"incentivesDecreeType":{"anyOf":[{"$ref":"#/components/schemas/ProspectIncentivesDecreeType"},{"type":"null"}]},"incentivesStatus":{"anyOf":[{"$ref":"#/components/schemas/ProspectIncentivesDecreeStatus"},{"type":"null"}]},"incentivesPricingAdjustment":{"type":["number","null"]},"incentivesDueAtSigning":{"type":["number","null"]},"incentivesDueAtSubmission":{"type":["number","null"]},"incentivesDueAtApproval":{"type":["number","null"]},"municipalDecreeMunicipality":{"anyOf":[{"$ref":"#/components/schemas/ProspectPuertoRicoMunicipality"},{"type":"null"}]},"municipalStatus":{"anyOf":[{"$ref":"#/components/schemas/ProspectIncentivesDecreeStatus"},{"type":"null"}]},"municipalPricingAdjustment":{"type":["number","null"]},"municipalDueAtSigning":{"type":["number","null"]},"municipalDueAtSubmission":{"type":["number","null"]},"municipalDueAtApproval":{"type":["number","null"]}}},"ProspectCorpTaxItemInputDto":{"type":"object","properties":{"filingType":{"description":"Identifies a canonical corporate tax filing. Provide `filingType` for a canonical row or `name` for a custom row; when `filingType` is set, `name` is ignored.","anyOf":[{"$ref":"#/components/schemas/ProspectCorpTaxFilingType"},{"type":"null"}]},"name":{"type":["string","null"],"description":"Free-form label for custom rows that do not map to a known filingType. Required when `filingType` is not provided."},"status":{"anyOf":[{"$ref":"#/components/schemas/ProspectTaxFilingStatus"},{"type":"null"}]},"pricingAdjustment":{"type":["number","null"]},"occurrence":{"anyOf":[{"$ref":"#/components/schemas/ProspectFilingOccurrence"},{"type":"null"}]},"annualCost":{"type":["number","null"]},"order":{"type":"number"}},"required":["order"]},"ProspectCorpTaxInputDto":{"type":"object","properties":{"complexityRanking":{"anyOf":[{"$ref":"#/components/schemas/ProspectCorpTaxComplexity"},{"type":"null"}]},"items":{"type":"array","items":{"$ref":"#/components/schemas/ProspectCorpTaxItemInputDto"}}}},"ProspectIndividualTaxItemInputDto":{"type":"object","properties":{"filingType":{"description":"Identifies a canonical individual tax filing. Provide `filingType` for a canonical row or `name` for a custom row; when `filingType` is set, `name` is ignored.","anyOf":[{"$ref":"#/components/schemas/ProspectIndividualTaxFilingType"},{"type":"null"}]},"name":{"type":["string","null"],"description":"Free-form label for custom rows that do not map to a known filingType. Required when `filingType` is not provided."},"status":{"anyOf":[{"$ref":"#/components/schemas/ProspectTaxFilingStatus"},{"type":"null"}]},"pricingAdjustment":{"type":["number","null"]},"occurrence":{"anyOf":[{"$ref":"#/components/schemas/ProspectFilingOccurrence"},{"type":"null"}]},"annualCost":{"type":["number","null"]},"order":{"type":"number"}},"required":["order"]},"ProspectAccessToCapitalItemInputDto":{"type":"object","properties":{"serviceType":{"allOf":[{"$ref":"#/components/schemas/ProspectAccessToCapitalServiceType"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/ProspectAccessToCapitalServiceStatus"},{"type":"null"}]},"rate":{"type":["number","null"]}},"required":["serviceType"]},"ProspectRdBracketInputDto":{"type":"object","properties":{"order":{"type":"number"},"bottomBracket":{"type":["number","null"]},"topBracket":{"type":["number","null"]},"successFeeRate":{"type":["number","null"]},"successFeeAmount":{"type":["number","null"]}},"required":["order"]},"ProspectAccessToCapitalInputDto":{"type":"object","properties":{"rdPricingType":{"anyOf":[{"$ref":"#/components/schemas/ProspectRdPricingType"},{"type":"null"}]},"rdEstimatedCashReceived":{"type":["number","null"]},"rdEstimatedSuccessFee":{"type":["number","null"],"description":"DECA Estimated Success Fee Generated."},"rdEffectiveRate":{"type":["number","null"],"description":"Effective Success Fee Rate."},"multinationalRdIncrementalRate":{"type":["number","null"]},"multinationalRdNewFilingsRate":{"type":["number","null"]},"multinationalRdEstimatedCashIncremental":{"type":["number","null"]},"multinationalRdEstimatedCashNewFilings":{"type":["number","null"]},"multinationalRdEstimatedSuccessFee":{"type":["number","null"],"description":"DECA Estimated Success Fee Generated (Multinational)."},"multinationalRdEffectiveRate":{"type":["number","null"],"description":"Effective Success Fee Rate (Multinational)."},"items":{"type":"array","items":{"$ref":"#/components/schemas/ProspectAccessToCapitalItemInputDto"}},"brackets":{"type":"array","items":{"$ref":"#/components/schemas/ProspectRdBracketInputDto"}}}},"UpsertProspectPricingSheetDto":{"type":"object","properties":{"adHocHourlyRate":{"type":["number","null"]},"introductionMeeting":{"anyOf":[{"$ref":"#/components/schemas/ProspectIntroductionMeetingDto"},{"type":"null"}]},"servicesAssessment":{"anyOf":[{"$ref":"#/components/schemas/ProspectServicesAssessmentDto"},{"type":"null"}]},"foundationalItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectFoundationalItemInputDto"}},"incentivesDecree":{"anyOf":[{"$ref":"#/components/schemas/ProspectIncentivesDecreeInputDto"},{"type":"null"}]},"corpTax":{"anyOf":[{"$ref":"#/components/schemas/ProspectCorpTaxInputDto"},{"type":"null"}]},"individualTaxItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndividualTaxItemInputDto"}},"accessToCapital":{"anyOf":[{"$ref":"#/components/schemas/ProspectAccessToCapitalInputDto"},{"type":"null"}]},"answersSubmittedAt":{"format":"date-time","type":["string","null"],"description":"When the Pricing Form answers this form took in were submitted, or null when it took in none. The save is refused with 409 once the prospect has submitted after it."}}},"ProspectPricingSheetDraftEntity":{"type":"object","properties":{"data":{"type":"object","additionalProperties":true},"updatedAt":{"format":"date-time","type":"string"}},"required":["data","updatedAt"]},"UpsertProspectPricingSheetDraftDto":{"type":"object","properties":{"data":{"type":"object","additionalProperties":true,"description":"Wizard-state blob owned by the admin. The api reads only the first page under `values.prospectChecklist` and the `answersSubmittedAt` it records, to show business development's corrections on a resent Pricing Form link. Max 262144 bytes when serialized."}},"required":["data"]},"RejectProspectPricingSheetDto":{"type":"object","properties":{"subject":{"type":"string","maxLength":255},"bodyHtml":{"type":"string","maxLength":50000,"description":"Editor HTML, sanitized to paragraphs, line breaks and mention links; 1-5000 characters of visible text."},"toEmails":{"maxItems":50,"minItems":1,"type":"array","items":{"type":"string","format":"email"}},"ccEmails":{"maxItems":50,"description":"Up to 50 recipients (To and CC combined)","type":"array","items":{"type":"string","format":"email"}},"attachmentFileIds":{"maxItems":10,"description":"The `fileId` of each file uploaded through `POST /files/upload` or copied by `POST /email-attachments/:fileId/watermark`, together at most 7 MB. Files in the `email-attachments` folder are deleted once the email reaches a recipient, or a day after upload when no email takes them.","type":"array","items":{"type":"string"}}},"required":["subject","bodyHtml","toEmails","ccEmails"]},"ProspectTaxTeamNotificationResultDto":{"type":"object","properties":{"attemptedCount":{"type":"number","description":"Number of active users with the tax_complexity permission a notification email was attempted for. 0 means no tax team is set up."},"recipientCount":{"type":"number","description":"Number of users with the tax_complexity permission the notification email was successfully sent to."},"failedCount":{"type":"number","description":"Number of attempted recipients whose notification email failed to send."},"recipients":{"description":"Emails of the users the notification was successfully sent to.","type":"array","items":{"type":"string"}}},"required":["attemptedCount","recipientCount","failedCount","recipients"]},"ProspectFoundationalLookupItemEntity":{"type":"object","properties":{"itemType":{"allOf":[{"$ref":"#/components/schemas/ProspectPricingSheetComplianceItemType"}]},"priceNa":{"type":["number","null"]},"priceCompletedByClient":{"type":["number","null"]},"priceManagedByClientReview":{"type":["number","null"]},"priceManagedByDecaNew":{"type":["number","null"]},"priceManagedByDecaAmendment":{"type":["number","null"]}},"required":["itemType","priceNa","priceCompletedByClient","priceManagedByClientReview","priceManagedByDecaNew","priceManagedByDecaAmendment"]},"ProspectPricingSheetLookupDecreeRowType":{"type":"string","enum":["manufacturing","manufacturing_and_rd","green_energy","visitors_economy","export_activities","agroindustry","municipal_decree"]},"ProspectDecreeLookupItemEntity":{"type":"object","properties":{"rowType":{"allOf":[{"$ref":"#/components/schemas/ProspectPricingSheetLookupDecreeRowType"}]},"priceNa":{"type":["number","null"]},"priceCompletedNoReview":{"type":["number","null"]},"priceManagedByClientDecaReview":{"type":["number","null"]},"priceNewDecree":{"type":["number","null"]},"priceDecreeAmendment":{"type":["number","null"]}},"required":["rowType","priceNa","priceCompletedNoReview","priceManagedByClientDecaReview","priceNewDecree","priceDecreeAmendment"]},"ProspectCorpTaxLookupItemEntity":{"type":"object","properties":{"filingType":{"allOf":[{"$ref":"#/components/schemas/ProspectCorpTaxFilingType"}]},"priceNa":{"type":["number","null"]},"priceManagedByClient":{"type":["number","null"]},"priceManagedByDeca":{"type":["number","null"]},"basicComplexityMultiplier":{"type":["number","null"]},"mediumComplexityMultiplier":{"type":["number","null"]},"advancedComplexityMultiplier":{"type":["number","null"]}},"required":["filingType","priceNa","priceManagedByClient","priceManagedByDeca","basicComplexityMultiplier","mediumComplexityMultiplier","advancedComplexityMultiplier"]},"ProspectIndividualTaxLookupItemEntity":{"type":"object","properties":{"filingType":{"allOf":[{"$ref":"#/components/schemas/ProspectIndividualTaxFilingType"}]},"priceNa":{"type":["number","null"]},"priceManagedByClient":{"type":["number","null"]},"priceManagedByDeca":{"type":["number","null"]}},"required":["filingType","priceNa","priceManagedByClient","priceManagedByDeca"]},"ProspectAdHocRatesEntity":{"type":"object","properties":{"foundationalRate":{"type":"number"},"corpTaxRate":{"type":"number"},"individualTaxRate":{"type":"number"}},"required":["foundationalRate","corpTaxRate","individualTaxRate"]},"ProspectPricingSheetLookupEntity":{"type":"object","properties":{"prospectId":{"type":"string"},"foundationalItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectFoundationalLookupItemEntity"}},"decreeItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectDecreeLookupItemEntity"}},"corpTaxItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectCorpTaxLookupItemEntity"}},"individualTaxItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndividualTaxLookupItemEntity"}},"adHocRates":{"$ref":"#/components/schemas/ProspectAdHocRatesEntity"},"foundationalIsOverridden":{"type":"boolean","description":"True when at least one per-prospect override row exists for foundational items."},"decreeIsOverridden":{"type":"boolean","description":"True when at least one per-prospect override row exists for decree items."},"corpTaxIsOverridden":{"type":"boolean","description":"True when at least one per-prospect override row exists for corp-tax items."},"individualTaxIsOverridden":{"type":"boolean","description":"True when at least one per-prospect override row exists for individual-tax items."},"adHocRatesIsOverridden":{"type":"boolean","description":"True when an ad-hoc rates override row exists for the prospect."}},"required":["prospectId","foundationalItems","decreeItems","corpTaxItems","individualTaxItems","adHocRates","foundationalIsOverridden","decreeIsOverridden","corpTaxIsOverridden","individualTaxIsOverridden","adHocRatesIsOverridden"]},"ProspectFoundationalLookupItemInputDto":{"type":"object","properties":{"itemType":{"allOf":[{"$ref":"#/components/schemas/ProspectPricingSheetComplianceItemType"}]},"priceNa":{"type":["number","null"]},"priceCompletedByClient":{"type":["number","null"]},"priceManagedByClientReview":{"type":["number","null"]},"priceManagedByDecaNew":{"type":["number","null"]},"priceManagedByDecaAmendment":{"type":["number","null"]}},"required":["itemType"]},"ProspectDecreeLookupItemInputDto":{"type":"object","properties":{"rowType":{"allOf":[{"$ref":"#/components/schemas/ProspectPricingSheetLookupDecreeRowType"}]},"priceNa":{"type":["number","null"]},"priceCompletedNoReview":{"type":["number","null"]},"priceManagedByClientDecaReview":{"type":["number","null"]},"priceNewDecree":{"type":["number","null"]},"priceDecreeAmendment":{"type":["number","null"]}},"required":["rowType"]},"ProspectCorpTaxLookupItemInputDto":{"type":"object","properties":{"filingType":{"allOf":[{"$ref":"#/components/schemas/ProspectCorpTaxFilingType"}]},"priceNa":{"type":["number","null"]},"priceManagedByClient":{"type":["number","null"]},"priceManagedByDeca":{"type":["number","null"]},"basicComplexityMultiplier":{"type":["number","null"]},"mediumComplexityMultiplier":{"type":["number","null"]},"advancedComplexityMultiplier":{"type":["number","null"]}},"required":["filingType"]},"ProspectIndividualTaxLookupItemInputDto":{"type":"object","properties":{"filingType":{"allOf":[{"$ref":"#/components/schemas/ProspectIndividualTaxFilingType"}]},"priceNa":{"type":["number","null"]},"priceManagedByClient":{"type":["number","null"]},"priceManagedByDeca":{"type":["number","null"]}},"required":["filingType"]},"ProspectAdHocRatesInputDto":{"type":"object","properties":{"foundationalRate":{"type":["number","null"]},"corpTaxRate":{"type":["number","null"]},"individualTaxRate":{"type":["number","null"]}}},"UpsertProspectPricingSheetLookupDto":{"type":"object","properties":{"foundationalItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectFoundationalLookupItemInputDto"}},"decreeItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectDecreeLookupItemInputDto"}},"corpTaxItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectCorpTaxLookupItemInputDto"}},"individualTaxItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndividualTaxLookupItemInputDto"}},"adHocRates":{"$ref":"#/components/schemas/ProspectAdHocRatesInputDto"}}},"ProspectPricingFormContactEntity":{"type":"object","properties":{"fullName":{"type":"string"},"relationship":{"type":"string"},"isAuthorizedSigner":{"type":"boolean"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["fullName","relationship","isAuthorizedSigner","email","phone"]},"ProspectPricingFormServiceInterestEntity":{"type":"object","properties":{"serviceType":{"allOf":[{"$ref":"#/components/schemas/ProspectPricingSheetServiceType"}]},"interest":{"allOf":[{"$ref":"#/components/schemas/ProspectServiceInterest"}]}},"required":["serviceType","interest"]},"ProspectPricingFormAnswersEntity":{"type":"object","properties":{"id":{"type":"string"},"prospectId":{"type":"string"},"legalName":{"type":["string","null"]},"dbaName":{"type":["string","null"]},"registrationLocations":{"type":"array","items":{"$ref":"#/components/schemas/ProspectRegistrationLocation"}},"registrationState":{"type":["string","null"]},"registrationCountry":{"type":["string","null"]},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/ProspectPricingFormContactEntity"}},"setupItemStatuses":{"type":"array","items":{"$ref":"#/components/schemas/SetupItemStatusEntity"}},"serviceInterests":{"type":"array","items":{"$ref":"#/components/schemas/ProspectPricingFormServiceInterestEntity"}},"sentAt":{"format":"date-time","type":["string","null"]},"submittedAt":{"format":"date-time","type":["string","null"],"description":"Null until the prospect submits; the answers above are empty until then."}},"required":["id","prospectId","legalName","dbaName","registrationLocations","registrationState","registrationCountry","contacts","setupItemStatuses","serviceInterests","sentAt","submittedAt"]},"SendPricingFormLinkDto":{"type":"object","properties":{"subject":{"type":"string","maxLength":255},"bodyHtml":{"type":"string","maxLength":50000,"description":"Editor HTML, sanitized to paragraphs, line breaks and mention links; 1-5000 characters of visible text."},"toEmails":{"maxItems":50,"minItems":1,"type":"array","items":{"type":"string","format":"email"}},"ccEmails":{"maxItems":50,"description":"Up to 50 recipients (To and CC combined)","type":"array","items":{"type":"string","format":"email"}},"attachmentFileIds":{"maxItems":10,"description":"The `fileId` of each file uploaded through `POST /files/upload` or copied by `POST /email-attachments/:fileId/watermark`, together at most 7 MB. Files in the `email-attachments` folder are deleted once the email reaches a recipient, or a day after upload when no email takes them.","type":"array","items":{"type":"string"}}},"required":["subject","bodyHtml","toEmails","ccEmails"]},"PricingFormContactDto":{"type":"object","properties":{"fullName":{"type":["string","null"]},"relationship":{"type":["string","null"]},"isAuthorizedSigner":{"type":"boolean"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["fullName","relationship","isAuthorizedSigner","email","phone"]},"PricingFormAnswersDto":{"type":"object","properties":{"legalName":{"type":["string","null"]},"dbaName":{"type":["string","null"]},"registrationLocations":{"type":"array","items":{"$ref":"#/components/schemas/ProspectRegistrationLocation"}},"registrationState":{"type":["string","null"]},"registrationCountry":{"type":["string","null"]},"setupItemStatuses":{"type":"array","items":{"$ref":"#/components/schemas/SetupItemStatusEntity"}},"serviceInterests":{"type":"array","items":{"$ref":"#/components/schemas/ProspectPricingFormServiceInterestEntity"}},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/PricingFormContactDto"}}},"required":["legalName","dbaName","registrationLocations","registrationState","registrationCountry","setupItemStatuses","serviceInterests","contacts"]},"PublicPricingFormDto":{"type":"object","properties":{"isRegistrationAsked":{"type":"boolean","description":"Where the business is registered (PF3) is asked only when the Initial Questionnaire says it is registered (IQ5 Yes)."},"answers":{"$ref":"#/components/schemas/PricingFormAnswersDto"}},"required":["isRegistrationAsked","answers"]},"PricingFormContactInputDto":{"type":"object","properties":{"fullName":{"type":"string"},"relationship":{"type":"string"},"isAuthorizedSigner":{"type":"boolean"},"email":{"type":"string"},"phone":{"type":"string"}},"required":["fullName","relationship","isAuthorizedSigner"]},"PricingFormSetupItemStatusInputDto":{"type":"object","properties":{"status":{"description":"Accepts only status_unknown, not_started, in_process_internally, in_process_third_party, completed.","allOf":[{"$ref":"#/components/schemas/ProspectPricingSheetComplianceItemStatus"}]},"item":{"description":"Accepts only certificate_of_organization, ein_letter, pr_operating_agreement_bylaws, pr_articles_of_incorporation, department_of_state_registration, treasury_suri_registration, non_withholding_waiver, family_dept_child_support_registration, crim_registration, incentives_portal_registration, merchant_registration_certificate, single_permit_application, provisional_municipal_license_tax, manufacturers_id, state_insurance_fund_registration, labor_dept_registration, cfse_workers_comp_policy, pr_bank_account_opening.","allOf":[{"$ref":"#/components/schemas/ProspectBusinessSetupItem"}]}},"required":["status","item"]},"PricingFormServiceInterestInputDto":{"type":"object","properties":{"serviceType":{"allOf":[{"$ref":"#/components/schemas/ProspectPricingSheetServiceType"}]},"interest":{"allOf":[{"$ref":"#/components/schemas/ProspectServiceInterest"}]}},"required":["serviceType","interest"]},"SubmitPricingFormDto":{"type":"object","properties":{"legalName":{"type":"string"},"dbaName":{"type":"string"},"registrationLocations":{"type":"array","description":"Asked only when the Initial Questionnaire says the business is registered; dropped otherwise.","items":{"$ref":"#/components/schemas/ProspectRegistrationLocation"}},"registrationState":{"type":"string","description":"Kept only with `us_mainland` among the locations."},"registrationCountry":{"type":"string","description":"Kept only with `international` among the locations."},"contacts":{"description":"1 to 20 people, at least one of them authorized to sign, each with an email or a phone.","type":"array","items":{"$ref":"#/components/schemas/PricingFormContactInputDto"}},"setupItemStatuses":{"description":"A status for every PF5-PF7 row.","type":"array","items":{"$ref":"#/components/schemas/PricingFormSetupItemStatusInputDto"}},"serviceInterests":{"description":"An interest for every PF8 service area.","type":"array","items":{"$ref":"#/components/schemas/PricingFormServiceInterestInputDto"}}},"required":["contacts","setupItemStatuses","serviceInterests"]},"AdminAvailabilityBusyEntity":{"type":"object","properties":{"start":{"format":"date-time","type":"string"},"end":{"format":"date-time","type":"string"}},"required":["start","end"]},"SalesManagerEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"defaultSelected":{"type":"boolean","description":"Whether this sales manager is auto-selected when opening the booking modal. Super admins default to false."}},"required":["id","name","email","defaultSelected"]},"AdminAvailabilityEntity":{"type":"object","properties":{"slots":{"type":"array","items":{"format":"date-time","type":"string"}},"busy":{"type":"array","items":{"$ref":"#/components/schemas/AdminAvailabilityBusyEntity"}},"durationMinutes":{"type":"number"},"bufferMinutes":{"type":"number"},"timeZone":{"type":"string"},"lookaheadDays":{"type":"number"},"salesManagers":{"type":"array","items":{"$ref":"#/components/schemas/SalesManagerEntity"}}},"required":["slots","busy","durationMinutes","bufferMinutes","timeZone","lookaheadDays","salesManagers"]},"ProspectMeetingOrganizerEntity":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"]},"ProspectMeetingAttendeeEntity":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"displayName":{"type":["string","null"]},"userId":{"type":["string","null"],"format":"uuid"},"kind":{"type":"string","enum":["internal_required","internal_optional","external","prospect"]},"response":{"type":"string","enum":["needs_action","accepted","declined","tentative"]}},"required":["id","email","displayName","userId","kind","response"]},"ProspectMeetingEntity":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"prospectId":{"type":"string","format":"uuid"},"phase":{"type":"string","enum":["phase_1","phase_2","phase_3","phase_4","phase_5"]},"title":{"type":"string"},"description":{"type":"string"},"startAt":{"format":"date-time","type":"string"},"endAt":{"format":"date-time","type":"string"},"timeZone":{"type":"string"},"status":{"type":"string","enum":["scheduled","canceled","completed"]},"creationMethod":{"type":"string","enum":["admin_scheduled","booking_link"]},"googleHtmlLink":{"type":["string","null"]},"googleMeetLink":{"type":["string","null"]},"organizer":{"anyOf":[{"$ref":"#/components/schemas/ProspectMeetingOrganizerEntity"},{"type":"null"}]},"attendees":{"type":"array","items":{"$ref":"#/components/schemas/ProspectMeetingAttendeeEntity"}},"hasInternalDecline":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","prospectId","phase","title","description","startAt","endAt","timeZone","status","creationMethod","googleHtmlLink","googleMeetLink","organizer","attendees","hasInternalDecline","createdAt","updatedAt"]},"ProspectBookingLinkEntity":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"prospectId":{"type":"string","format":"uuid"},"phase":{"type":"string","enum":["phase_1","phase_2","phase_3","phase_4","phase_5"]},"status":{"type":"string","enum":["active","consumed","expired","revoked"]},"expiresAt":{"format":"date-time","type":"string"},"url":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"}},"required":["id","prospectId","phase","status","expiresAt","url","createdAt"]},"ProspectMeetingCardEntity":{"type":"object","properties":{"kind":{"type":"string","enum":["meeting","booking_link","none"]},"meeting":{"anyOf":[{"$ref":"#/components/schemas/ProspectMeetingEntity"},{"type":"null"}]},"bookingLink":{"anyOf":[{"$ref":"#/components/schemas/ProspectBookingLinkEntity"},{"type":"null"}]}},"required":["kind","meeting","bookingLink"]},"ScheduleMeetingDto":{"type":"object","properties":{"startAt":{"type":"string","format":"date-time"},"durationMinutes":{"type":"number","default":45,"minimum":15,"maximum":240},"externalAttendees":{"description":"External attendee emails","type":"array","items":{"type":"string"}},"salesManagerIds":{"description":"Sales manager user IDs to invite as optional attendees. Omit to use the default selection from the availability endpoint.","type":"array","items":{"type":"string"}},"overrideConflict":{"type":"boolean","default":false,"description":"Force scheduling even if the main sales manager is busy"}},"required":["startAt"]},"CreateBookingLinkDto":{"type":"object","properties":{"expiresAt":{"type":"string","format":"date-time","description":"When the booking link expires. Defaults to 7 days from creation. Must be within 30 days."},"toEmails":{"maxItems":50,"minItems":1,"description":"Who the link goes to. Defaults to the prospect's own address.","type":"array","items":{"type":"string","format":"email"}},"ccEmails":{"maxItems":50,"description":"Up to 50 recipients (To and CC combined)","type":"array","items":{"type":"string","format":"email"}}}},"PublicBookingProspectEntity":{"type":"object","properties":{"fullName":{"type":"string"},"phase":{"type":"string","enum":["phase_1","phase_2","phase_3","phase_4","phase_5"]}},"required":["fullName","phase"]},"PublicBookingPageEntity":{"type":"object","properties":{"prospect":{"$ref":"#/components/schemas/PublicBookingProspectEntity"},"title":{"type":"string"},"durationMinutes":{"type":"number"},"timeZone":{"type":"string"},"slots":{"type":"array","items":{"format":"date-time","type":"string"}},"expiresAt":{"format":"date-time","type":"string"}},"required":["prospect","title","durationMinutes","timeZone","slots","expiresAt"]},"ConfirmBookingDto":{"type":"object","properties":{"startAt":{"type":"string","format":"date-time"},"timeZone":{"type":"string","description":"IANA time zone of the prospect"}},"required":["startAt","timeZone"]},"PublicBookingConfirmationEntity":{"type":"object","properties":{"startAt":{"format":"date-time","type":"string"},"endAt":{"format":"date-time","type":"string"},"timeZone":{"type":"string"},"title":{"type":"string"},"googleHtmlLink":{"type":["string","null"]}},"required":["startAt","endAt","timeZone","title","googleHtmlLink"]},"ProspectMndaEntity":{"type":"object","properties":{"id":{"type":"string"},"signableDocumentId":{"type":"string"},"prospectId":{"type":"string"},"status":{"type":"string","enum":["pending","drafted","pending_deca_signature","sent_to_client","viewed","signed","declined","voided"]},"source":{"type":"string","enum":["generated","uploaded"]},"signingOrder":{"type":"string","enum":["deca_first_then_client","client_first_then_deca","client_only","deca_only"]},"recipientName":{"type":["string","null"]},"recipientEmail":{"type":["string","null"]},"ccEmails":{"type":"array","items":{"type":"string"}},"unsignedPdfUrl":{"type":["string","null"],"format":"uri"},"editableSourceUrl":{"type":["string","null"],"format":"uri","description":"Original source URL — rendered DOCX for generated MNDAs, or the original uploaded file for uploaded MNDAs."},"editableSourceFileName":{"type":["string","null"],"description":"Name to download the editable source under."},"sentPdfFileName":{"type":["string","null"],"description":"Name the PDF is sent under; null while the document has no name."},"signedPdfUrl":{"type":["string","null"],"format":"uri"},"senderViewCompletedAt":{"format":"date-time","type":["string","null"]},"sentAt":{"format":"date-time","type":["string","null"]},"viewedAt":{"format":"date-time","type":["string","null"]},"clientSignedAt":{"format":"date-time","type":["string","null"]},"decaSignedAt":{"format":"date-time","type":["string","null"]},"signedAt":{"format":"date-time","type":["string","null"]},"declinedAt":{"format":"date-time","type":["string","null"]},"cancelledAt":{"format":"date-time","type":["string","null"],"description":"Set when the MNDA is cancelled. Backed by the underlying SignableDocument.voidedAt column (DocuSign uses \"void\" terminology for the same concept)."},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"clientName":{"type":["string","null"]},"clientEntityDescriptor":{"type":["string","null"]},"effectiveDate":{"format":"date-time","type":["string","null"]},"clientNoticesName":{"type":["string","null"]},"clientNoticesTitle":{"type":["string","null"]},"clientNoticesAddress":{"type":["string","null"]},"clientNoticesEmail":{"type":["string","null"]},"clientNoticesPhone":{"type":["string","null"]},"clientNoticesCc":{"type":["string","null"]},"decaSignerName":{"type":["string","null"]},"decaSignerTitle":{"type":["string","null"]},"decaSignerEmail":{"type":["string","null"]},"latestReminder":{"description":"Most recent MNDA-type reminder for this prospect. Reflects schedule/sent/canceled state for the auto-reminder follow-up.","anyOf":[{"$ref":"#/components/schemas/ProspectReminderEntity"},{"type":"null"}]}},"required":["id","signableDocumentId","prospectId","status","source","signingOrder","recipientName","recipientEmail","ccEmails","unsignedPdfUrl","editableSourceUrl","editableSourceFileName","sentPdfFileName","signedPdfUrl","senderViewCompletedAt","sentAt","viewedAt","clientSignedAt","decaSignedAt","signedAt","declinedAt","cancelledAt","createdAt","updatedAt","clientName","clientEntityDescriptor","effectiveDate","clientNoticesName","clientNoticesTitle","clientNoticesAddress","clientNoticesEmail","clientNoticesPhone","clientNoticesCc","decaSignerName","decaSignerTitle","decaSignerEmail","latestReminder"]},"CreateMndaSenderViewDto":{"type":"object","properties":{"returnUrl":{"type":"string","description":"URL to redirect to after the user finishes in DocuSign."}},"required":["returnUrl"]},"MndaSenderViewResponseDto":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]},"SendProspectMndaDto":{"type":"object","properties":{"recipientEmail":{"type":"string","format":"email","maxLength":255,"description":"Retargets the client signer before sending. Only for generated MNDAs — uploaded ones are retargeted through the DocuSign sender view."},"ccEmails":{"maxItems":50,"description":"Envelope carbon copies: missing ones are added and ones DECA last recorded that are not listed are removed before sending; one added in the sender view since then stays. Up to 50 recipients (To and CC combined)","type":"array","items":{"type":"string","format":"email"}},"subject":{"type":"string","maxLength":255,"description":"Optional DocuSign envelope email subject, applied before sending. When both subject and bodyHtml are provided the envelope email is customized."},"bodyHtml":{"type":"string","maxLength":50000,"description":"Optional DocuSign envelope email body, sent as its plain text; with a subject it customizes the envelope email. Editor HTML, sanitized to paragraphs, line breaks and mention links; 1-5000 characters of visible text."}},"required":["ccEmails"]},"ProspectMndaSignUrlResponseDto":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Short-lived (~5 min) DocuSign recipient-view URL. Forward the browser to it immediately."}},"required":["url"]},"MndaSignErrorCode":{"type":"string","enum":["token_not_found","link_expired_or_used","already_finalized","unavailable"],"description":"Machine-readable reason the link is not actionable"},"ProspectMndaSignErrorResponseDto":{"type":"object","properties":{"code":{"description":"Machine-readable reason the link is not actionable","allOf":[{"$ref":"#/components/schemas/MndaSignErrorCode"}]},"message":{"type":"string"}},"required":["code","message"]},"ManualReminderTemplate":{"type":"string","enum":["initial_outreach","questionnaire_reminder","mnda_documents_request","mnda_documents_reminder","documents_only_reminder","agreement_presentation_invite","agreement_signature_reminder"]},"ManualReminderLatestRecipientsDto":{"type":"object","properties":{"template":{"allOf":[{"$ref":"#/components/schemas/ManualReminderTemplate"}]},"toEmails":{"type":"array","items":{"type":"string"}},"ccEmails":{"type":"array","items":{"type":"string"}}},"required":["template","toEmails","ccEmails"]},"ManualReminderContextEntity":{"type":"object","properties":{"prospectName":{"type":"string"},"senderName":{"type":"string"},"serverNow":{"format":"date-time","type":"string"},"contextText":{"type":"string"},"pendingDocuments":{"type":"array","items":{"type":"string"}},"timeOptions":{"type":"array","items":{"type":"string"}},"latestRecipients":{"type":"array","items":{"$ref":"#/components/schemas/ManualReminderLatestRecipientsDto"}}},"required":["prospectName","senderName","serverNow","contextText","pendingDocuments","timeOptions","latestRecipients"]},"SendManualReminderDto":{"type":"object","properties":{"subject":{"type":"string","maxLength":255},"bodyHtml":{"type":"string","maxLength":50000,"description":"Editor HTML, sanitized to paragraphs, line breaks and mention links; 1-5000 characters of visible text."},"toEmails":{"maxItems":50,"minItems":1,"type":"array","items":{"type":"string","format":"email"}},"ccEmails":{"maxItems":50,"description":"Up to 50 recipients (To and CC combined)","type":"array","items":{"type":"string","format":"email"}},"attachmentFileIds":{"maxItems":10,"description":"The `fileId` of each file uploaded through `POST /files/upload` or copied by `POST /email-attachments/:fileId/watermark`, together at most 7 MB. Files in the `email-attachments` folder are deleted once the email reaches a recipient, or a day after upload when no email takes them.","type":"array","items":{"type":"string"}},"template":{"type":"string","enum":["initial_outreach","questionnaire_reminder","mnda_documents_request","mnda_documents_reminder","documents_only_reminder","agreement_presentation_invite","agreement_signature_reminder"]}},"required":["subject","bodyHtml","toEmails","ccEmails","template"]},"ProspectAgreementEntity":{"type":"object","properties":{"id":{"type":"string"},"signableDocumentId":{"type":"string"},"prospectId":{"type":"string"},"kind":{"type":["string","null"],"enum":["hard_to_recruit","tourism","general",null]},"version":{"type":"number"},"status":{"type":"string","enum":["pending","drafted","pending_deca_signature","sent_to_client","viewed","signed","declined","voided"]},"source":{"type":"string","enum":["generated","uploaded"]},"signingOrder":{"type":"string","enum":["deca_first_then_client","client_first_then_deca","client_only","deca_only"]},"recipientName":{"type":["string","null"]},"recipientEmail":{"type":["string","null"]},"ccEmails":{"type":"array","items":{"type":"string"}},"unsignedPdfUrl":{"type":["string","null"],"format":"uri","description":"Unsigned PDF preview URL."},"editableSourceUrl":{"type":["string","null"],"format":"uri","description":"Original source URL — rendered DOCX for generated agreements, or the original uploaded file for uploaded agreements."},"editableSourceFileName":{"type":["string","null"],"description":"Name to download the editable source under."},"sentPdfFileName":{"type":["string","null"],"description":"Name the PDF is sent under; null while the document has no name."},"signedPdfUrl":{"type":["string","null"],"format":"uri"},"senderViewCompletedAt":{"format":"date-time","type":["string","null"]},"sentAt":{"format":"date-time","type":["string","null"]},"viewedAt":{"format":"date-time","type":["string","null"]},"clientSignedAt":{"format":"date-time","type":["string","null"]},"decaSignedAt":{"format":"date-time","type":["string","null"]},"signedAt":{"format":"date-time","type":["string","null"]},"declinedAt":{"format":"date-time","type":["string","null"]},"cancelledAt":{"format":"date-time","type":["string","null"],"description":"Set when the agreement is cancelled (envelope voided in DocuSign)."},"parsing":{"description":"The AI read of an agreement a bypass uploaded; null on every other agreement.","anyOf":[{"$ref":"#/components/schemas/ProspectAgreementParsingDto"},{"type":"null"}]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","signableDocumentId","prospectId","kind","version","status","source","signingOrder","recipientName","recipientEmail","ccEmails","unsignedPdfUrl","editableSourceUrl","editableSourceFileName","sentPdfFileName","signedPdfUrl","senderViewCompletedAt","sentAt","viewedAt","clientSignedAt","decaSignedAt","signedAt","declinedAt","cancelledAt","parsing","createdAt","updatedAt"]},"ProspectAgreementKind":{"type":"string","enum":["hard_to_recruit","tourism","general"]},"GenerateProspectAgreementDto":{"type":"object","properties":{"kind":{"allOf":[{"$ref":"#/components/schemas/ProspectAgreementKind"}]}},"required":["kind"]},"CreateSenderViewDto":{"type":"object","properties":{"returnUrl":{"type":"string","description":"URL to redirect to after the user finishes in DocuSign."}},"required":["returnUrl"]},"SenderViewResponseDto":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]},"SendProspectAgreementDto":{"type":"object","properties":{"subject":{"type":"string","maxLength":255},"bodyHtml":{"type":"string","maxLength":50000,"description":"Editor HTML, sanitized to paragraphs, line breaks and mention links; 1-5000 characters of visible text."},"recipientEmail":{"type":"string","format":"email","maxLength":255},"ccEmails":{"maxItems":50,"description":"Envelope carbon copies: missing ones are added and ones DECA last recorded that are not listed are removed before sending; one added in the sender view since then stays. Up to 50 recipients (To and CC combined)","type":"array","items":{"type":"string","format":"email"}},"attachmentFileIds":{"maxItems":10,"description":"The `fileId` of each file uploaded through `POST /files/upload` or copied by `POST /email-attachments/:fileId/watermark`, together at most 7 MB. Files in the `email-attachments` folder are deleted once the email reaches a recipient, or a day after upload when no email takes them. Sent in the DECA email beside the agreement PDF, which counts toward that cap too.","type":"array","items":{"type":"string"}}},"required":["subject","bodyHtml","recipientEmail","ccEmails"]},"SendProspectAgreementResultDto":{"type":"object","properties":{"isEmailSent":{"type":"boolean","description":"False when the envelope went out but the DECA email, the only one carrying the attachments, did not."}},"required":["isEmailSent"]},"SetupQuestionDto":{"type":"object","properties":{"key":{"allOf":[{"$ref":"#/components/schemas/ProspectQuestionnaireQuestionKey"}]},"section":{"allOf":[{"$ref":"#/components/schemas/ProspectQuestionnaireSection"}]},"label":{"type":"string"},"parentKey":{"anyOf":[{"$ref":"#/components/schemas/ProspectQuestionnaireQuestionKey"},{"type":"null"}]},"enabled":{"type":"boolean"}},"required":["key","section","label","parentKey","enabled"]},"CustomQuestionEntity":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"fieldType":{"allOf":[{"$ref":"#/components/schemas/ProspectCustomQuestionType"}]},"section":{"allOf":[{"$ref":"#/components/schemas/ProspectQuestionnaireSection"}]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string"}},"sortOrder":{"type":"number"}},"required":["id","title","fieldType","section","required","options","sortOrder"]},"QuestionnaireSetupDto":{"type":"object","properties":{"flow":{"allOf":[{"$ref":"#/components/schemas/ProspectType"}]},"questions":{"type":"array","items":{"$ref":"#/components/schemas/SetupQuestionDto"}},"customQuestions":{"type":"array","items":{"$ref":"#/components/schemas/CustomQuestionEntity"}}},"required":["flow","questions","customQuestions"]},"QuestionnaireLegacyAnswersDto":{"type":"object","properties":{"individualDescription":{"type":["string","null"]},"individualAct60Status":{"anyOf":[{"$ref":"#/components/schemas/ProspectDecreeStatus"},{"type":"null"}]},"individualDecreeNumber":{"type":["string","null"]},"individualNeedsTaxHelp":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"individualTaxFilings":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndividualTaxFiling"}},"workingWithIncentivesAdvisor":{"type":["boolean","null"]},"workingWithTaxAdvisor":{"type":["boolean","null"]},"additionalNotes":{"type":["string","null"]},"howLearnedAboutDeca":{"type":["string","null"]}},"required":["individualDescription","individualAct60Status","individualDecreeNumber","individualNeedsTaxHelp","individualTaxFilings","workingWithIncentivesAdvisor","workingWithTaxAdvisor","additionalNotes","howLearnedAboutDeca"]},"QuestionnairePrefillDto":{"type":"object","properties":{"flow":{"description":"The prospect's type now, which picks the questionnaire the form asks.","allOf":[{"$ref":"#/components/schemas/ProspectType"}]},"fullName":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"],"description":"The prospect's phone; for an Individual, the first contact's when the prospect has none."},"companyName":{"type":["string","null"]},"legacyAnswers":{"description":"Individual flow only: the answers its Business questionnaire gives the IIQ. Null for a Business prospect, and for an Individual with no Business answers saved.","anyOf":[{"$ref":"#/components/schemas/QuestionnaireLegacyAnswersDto"},{"type":"null"}]}},"required":["flow","fullName","email","phone","companyName","legacyAnswers"]},"CustomQuestionInputDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of an existing custom question to update. Omit to create a new one. Existing questions absent from the list are deleted."},"title":{"type":"string"},"fieldType":{"allOf":[{"$ref":"#/components/schemas/ProspectCustomQuestionType"}]},"section":{"allOf":[{"$ref":"#/components/schemas/ProspectQuestionnaireSection"}]},"required":{"type":"boolean","default":false},"options":{"type":"array","items":{"type":"string"}},"sortOrder":{"type":"number","minimum":0,"maximum":50,"default":0}},"required":["title","fieldType","section"]},"UpdateQuestionnaireSetupDto":{"type":"object","properties":{"disabledQuestionKeys":{"type":"array","items":{"$ref":"#/components/schemas/ProspectQuestionnaireQuestionKey"}},"customQuestions":{"description":"Full desired list of custom questions. Items with an id update the existing question; items without an id are created; existing questions omitted from the list are deleted.","type":"array","items":{"$ref":"#/components/schemas/CustomQuestionInputDto"}}},"required":["disabledQuestionKeys","customQuestions"]},"SendQuestionnaireLinkDto":{"type":"object","properties":{"subject":{"type":"string","maxLength":255},"bodyHtml":{"type":"string","maxLength":50000,"description":"Editor HTML, sanitized to paragraphs, line breaks and mention links; 1-5000 characters of visible text."},"toEmails":{"maxItems":50,"minItems":1,"type":"array","items":{"type":"string","format":"email"}},"ccEmails":{"maxItems":50,"description":"Up to 50 recipients (To and CC combined)","type":"array","items":{"type":"string","format":"email"}},"attachmentFileIds":{"maxItems":10,"description":"The `fileId` of each file uploaded through `POST /files/upload` or copied by `POST /email-attachments/:fileId/watermark`, together at most 7 MB. Files in the `email-attachments` folder are deleted once the email reaches a recipient, or a day after upload when no email takes them.","type":"array","items":{"type":"string"}}},"required":["subject","bodyHtml","toEmails","ccEmails"]},"SetupItemStatusInputDto":{"type":"object","properties":{"item":{"description":"Accepts only certificate_of_organization, ein_letter, pr_operating_agreement_bylaws, pr_articles_of_incorporation, department_of_state_registration, treasury_suri_registration, non_withholding_waiver, family_dept_child_support_registration, crim_registration, incentives_portal_registration, merchant_registration_certificate, single_permit_application, provisional_municipal_license_tax, manufacturers_id.","allOf":[{"$ref":"#/components/schemas/ProspectBusinessSetupItem"}]},"status":{"description":"Accepts only status_unknown, not_started, in_process_internally, in_process_third_party, completed.","allOf":[{"$ref":"#/components/schemas/ProspectPricingSheetComplianceItemStatus"}]}},"required":["item","status"]},"CustomAnswerInputDto":{"type":"object","properties":{"customQuestionId":{"type":"string","format":"uuid"},"value":{"type":"object","description":"Answer value; its type is validated server-side against the custom question fieldType."}},"required":["customQuestionId","value"]},"SubmitQuestionnaireDto":{"type":"object","properties":{"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"companyLegalName":{"type":"string"},"businessIncorporated":{"type":"boolean"},"businessRegistrationLocations":{"type":"array","items":{"$ref":"#/components/schemas/ProspectRegistrationLocation"}},"businessRegistrationState":{"type":"string"},"businessRegistrationCountry":{"type":"string"},"businessDescription":{"type":"string"},"businessIndustries":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndustry"}},"businessWebsite":{"type":"string"},"businessEstablishedInPr":{"type":"boolean"},"businessNeedsSetupHelp":{"allOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"}]},"businessSetupItems":{"type":"array","description":"Accepts only certificate_of_organization, ein_letter, pr_operating_agreement_bylaws, pr_articles_of_incorporation, department_of_state_registration, treasury_suri_registration, non_withholding_waiver, family_dept_child_support_registration, crim_registration, incentives_portal_registration, merchant_registration_certificate, single_permit_application, provisional_municipal_license_tax, manufacturers_id.","items":{"$ref":"#/components/schemas/ProspectBusinessSetupItem"}},"setupItemStatuses":{"type":"array","items":{"$ref":"#/components/schemas/SetupItemStatusInputDto"}},"businessAct60Status":{"allOf":[{"$ref":"#/components/schemas/ProspectDecreeStatus"}]},"businessDecreeType":{"allOf":[{"$ref":"#/components/schemas/ProspectBusinessDecreeType"}]},"businessDecreeNumber":{"type":"string"},"needsDecreeAmendment":{"type":"boolean"},"businessNeedsIncentivesHelp":{"allOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"}]},"businessIncentiveItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectBusinessIncentiveItem"}},"businessInterestedInTaxCompliance":{"allOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"}]},"businessTaxFilings":{"type":"array","items":{"$ref":"#/components/schemas/ProspectBusinessTaxFiling"}},"businessPerformedRnd":{"allOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"}]},"rndSpendCurrentYear":{"type":"number"},"rndSpendNextYear":{"type":"number"},"businessReceivedTaxCredits":{"type":"boolean"},"businessTaxCreditsReceived":{"type":"array","items":{"$ref":"#/components/schemas/ProspectTaxCreditType"}},"businessFederalGrantFundingReceived":{"allOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"}]},"businessCapitalServices":{"type":"array","description":"Accepts only rnd_tax_credits, tourism_tax_credits, financing_loans, federal_grants, local_grants.","items":{"$ref":"#/components/schemas/ProspectCapitalGenerationService"}},"dateOfBirth":{"type":"string","format":"date"},"citizenshipCountry":{"example":"US","description":"ISO 3166-1 alpha-2 country code. \"PR\" is its own entry.","allOf":[{"$ref":"#/components/schemas/CountryCode"}]},"isPuertoRicoResident":{"type":"boolean"},"individualAddressLine1":{"type":"string"},"individualAddressLine2":{"type":"string"},"individualCity":{"type":"string"},"individualRegion":{"type":"string"},"individualPostalCode":{"type":"string"},"individualCountry":{"example":"US","description":"ISO 3166-1 alpha-2 country code. \"PR\" is its own entry.","allOf":[{"$ref":"#/components/schemas/CountryCode"}]},"individualDescription":{"type":"string"},"individualAct60Status":{"allOf":[{"$ref":"#/components/schemas/ProspectDecreeStatus"}]},"individualDecreeNumber":{"type":"string"},"individualDecreeType":{"description":"Accepts only act_60, act_22, other.","allOf":[{"$ref":"#/components/schemas/ProspectIndividualDecreeType"}]},"individualNeedsIncentivesHelp":{"allOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"}]},"individualIncentiveItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndividualIncentiveItem"}},"individualNeedsTaxHelp":{"allOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"}]},"individualTaxFilings":{"type":"array","description":"Accepts only income_tax_return, federal_income_tax_return, irs_form_8898, state_income_tax_return, exempt_annual_report.","items":{"$ref":"#/components/schemas/ProspectIndividualTaxFiling"}},"workingWithIncentivesAdvisor":{"type":"boolean"},"workingWithTaxAdvisor":{"type":"boolean"},"hasAdditionalEntities":{"type":"boolean"},"additionalNotes":{"type":"string"},"howLearnedAboutDeca":{"type":"string"},"howLearnedAboutDecaOther":{"type":"string","description":"The \"Please specify\" text IIQ20 asks when `howLearnedAboutDeca` is Other."},"customAnswers":{"type":"array","items":{"$ref":"#/components/schemas/CustomAnswerInputDto"}}}},"PublicQuestionnaireAnswersDto":{"type":"object","properties":{"email":{"type":["string","null"]},"fullName":{"type":["string","null"]},"phone":{"type":["string","null"]},"companyLegalName":{"type":["string","null"]},"businessIncorporated":{"type":["boolean","null"]},"businessRegistrationLocations":{"type":"array","items":{"$ref":"#/components/schemas/ProspectRegistrationLocation"}},"businessRegistrationState":{"type":["string","null"]},"businessRegistrationCountry":{"type":["string","null"]},"businessDescription":{"type":["string","null"]},"businessIndustries":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndustry"}},"businessWebsite":{"type":["string","null"]},"businessEstablishedInPr":{"type":["boolean","null"]},"businessNeedsSetupHelp":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"businessSetupItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectBusinessSetupItem"}},"setupItemStatuses":{"type":"array","items":{"$ref":"#/components/schemas/SetupItemStatusEntity"}},"businessAct60Status":{"anyOf":[{"$ref":"#/components/schemas/ProspectDecreeStatus"},{"type":"null"}]},"businessDecreeType":{"anyOf":[{"$ref":"#/components/schemas/ProspectBusinessDecreeType"},{"type":"null"}]},"businessDecreeNumber":{"type":["string","null"]},"needsDecreeAmendment":{"type":["boolean","null"]},"businessNeedsIncentivesHelp":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"businessIncentiveItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectBusinessIncentiveItem"}},"businessInterestedInTaxCompliance":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"businessTaxFilings":{"type":"array","items":{"$ref":"#/components/schemas/ProspectBusinessTaxFiling"}},"businessPerformedRnd":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"rndSpendCurrentYear":{"type":["number","null"]},"rndSpendNextYear":{"type":["number","null"]},"businessReceivedTaxCredits":{"type":["boolean","null"]},"businessTaxCreditsReceived":{"type":"array","items":{"$ref":"#/components/schemas/ProspectTaxCreditType"}},"businessFederalGrantFundingReceived":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"businessCapitalServices":{"type":"array","items":{"$ref":"#/components/schemas/ProspectCapitalGenerationService"}},"citizenshipCountry":{"type":["string","null"]},"dateOfBirth":{"format":"date-time","type":["string","null"]},"isPuertoRicoResident":{"type":["boolean","null"],"description":"IIQ6: whether the Individual lives in Puerto Rico."},"individualAddressLine1":{"type":["string","null"]},"individualAddressLine2":{"type":["string","null"]},"individualCity":{"type":["string","null"]},"individualRegion":{"type":["string","null"]},"individualPostalCode":{"type":["string","null"]},"individualCountry":{"type":["string","null"]},"individualDescription":{"type":["string","null"]},"individualAct60Status":{"anyOf":[{"$ref":"#/components/schemas/ProspectDecreeStatus"},{"type":"null"}]},"individualDecreeNumber":{"type":["string","null"]},"individualDecreeType":{"anyOf":[{"$ref":"#/components/schemas/ProspectIndividualDecreeType"},{"type":"null"}]},"individualNeedsIncentivesHelp":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"individualIncentiveItems":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndividualIncentiveItem"}},"individualNeedsTaxHelp":{"anyOf":[{"$ref":"#/components/schemas/ProspectAssistanceAnswer"},{"type":"null"}]},"individualTaxFilings":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndividualTaxFiling"}},"workingWithIncentivesAdvisor":{"type":["boolean","null"]},"workingWithTaxAdvisor":{"type":["boolean","null"]},"hasAdditionalEntities":{"type":["boolean","null"]},"additionalNotes":{"type":["string","null"]},"howLearnedAboutDeca":{"type":["string","null"]},"howLearnedAboutDecaOther":{"type":["string","null"]},"customQuestions":{"type":"array","items":{"$ref":"#/components/schemas/CustomQuestionWithAnswerEntity"}}},"required":["email","fullName","phone","companyLegalName","businessIncorporated","businessRegistrationLocations","businessRegistrationState","businessRegistrationCountry","businessDescription","businessIndustries","businessWebsite","businessEstablishedInPr","businessNeedsSetupHelp","businessSetupItems","setupItemStatuses","businessAct60Status","businessDecreeType","businessDecreeNumber","needsDecreeAmendment","businessNeedsIncentivesHelp","businessIncentiveItems","businessInterestedInTaxCompliance","businessTaxFilings","businessPerformedRnd","rndSpendCurrentYear","rndSpendNextYear","businessReceivedTaxCredits","businessTaxCreditsReceived","businessFederalGrantFundingReceived","businessCapitalServices","citizenshipCountry","dateOfBirth","isPuertoRicoResident","individualAddressLine1","individualAddressLine2","individualCity","individualRegion","individualPostalCode","individualCountry","individualDescription","individualAct60Status","individualDecreeNumber","individualDecreeType","individualNeedsIncentivesHelp","individualIncentiveItems","individualNeedsTaxHelp","individualTaxFilings","workingWithIncentivesAdvisor","workingWithTaxAdvisor","hasAdditionalEntities","additionalNotes","howLearnedAboutDeca","howLearnedAboutDecaOther","customQuestions"]},"PublicQuestionnaireDto":{"type":"object","properties":{"flow":{"allOf":[{"$ref":"#/components/schemas/ProspectType"}]},"prefill":{"$ref":"#/components/schemas/QuestionnairePrefillDto"},"disabledQuestionKeys":{"type":"array","items":{"$ref":"#/components/schemas/ProspectQuestionnaireQuestionKey"}},"customQuestions":{"type":"array","items":{"$ref":"#/components/schemas/CustomQuestionEntity"}},"answers":{"description":"The answers saved so far, such as an admin's draft or an earlier submission; the form opens on them, and takes `prefill` only while this is null, before any answer is saved.","anyOf":[{"$ref":"#/components/schemas/PublicQuestionnaireAnswersDto"},{"type":"null"}]},"answersUpdatedAt":{"format":"date-time","type":["string","null"],"description":"When the answers last changed; send it back as the submit's `questionnaireVersion`. Null before any answer is saved."}},"required":["flow","prefill","disabledQuestionKeys","customQuestions","answers","answersUpdatedAt"]},"ProspectDocumentSectionType":{"type":"string","enum":["corporate_deck","financial_projections","rnd_expense","additional_supporting","custom"]},"DocumentSectionFileEntity":{"type":"object","properties":{"id":{"type":"string"},"sectionId":{"type":"string"},"storageKey":{"type":"string"},"url":{"type":"string"},"originalName":{"type":"string"},"contentType":{"type":"string"},"fileSize":{"type":"number"},"uploadedAt":{"format":"date-time","type":"string"}},"required":["id","sectionId","storageKey","url","originalName","contentType","fileSize","uploadedAt"]},"DocumentSectionEntity":{"type":"object","properties":{"id":{"type":"string"},"requestId":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"type":{"allOf":[{"$ref":"#/components/schemas/ProspectDocumentSectionType"}]},"isRequested":{"type":"boolean","description":"Whether the request asks the prospect for this section"},"files":{"type":"array","items":{"$ref":"#/components/schemas/DocumentSectionFileEntity"}},"notesCount":{"type":"number"},"unreadThreadCount":{"type":["number","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","requestId","name","description","type","isRequested","files","notesCount","unreadThreadCount","createdAt","updatedAt"]},"ProspectDocumentsRequestAction":{"type":"string","enum":["mark_submitted","mark_completed","prepare_pricing_sheet","flag_clarification","exit_clarification"],"description":"Workflow transitions allowed from the current state."},"DocumentsRequestEntity":{"type":"object","properties":{"id":{"type":"string"},"prospectId":{"type":"string"},"sentAt":{"format":"date-time","type":["string","null"]},"submittedAt":{"format":"date-time","type":["string","null"]},"sections":{"type":"array","items":{"$ref":"#/components/schemas/DocumentSectionEntity"}},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"allowedActions":{"type":"array","description":"Workflow transitions allowed from the current state.","items":{"$ref":"#/components/schemas/ProspectDocumentsRequestAction"}}},"required":["id","prospectId","sentAt","submittedAt","sections","createdAt","updatedAt","allowedActions"]},"AddSectionDto":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"UpdateProspectDocumentSectionDto":{"type":"object","properties":{"isRequested":{"type":"boolean","description":"Whether the request asks the prospect for this section. A section that already has files or a description stays requested."}},"required":["isRequested"]},"FileReferenceDto":{"type":"object","properties":{"storageKey":{"type":"string"}},"required":["storageKey"]},"SendDocumentsRequestLinkDto":{"type":"object","properties":{"subject":{"type":"string","maxLength":255},"bodyHtml":{"type":"string","maxLength":50000,"description":"Editor HTML, sanitized to paragraphs, line breaks and mention links; 1-5000 characters of visible text."},"toEmails":{"maxItems":50,"minItems":1,"type":"array","items":{"type":"string","format":"email"}},"ccEmails":{"maxItems":50,"description":"Up to 50 recipients (To and CC combined)","type":"array","items":{"type":"string","format":"email"}},"attachmentFileIds":{"maxItems":10,"description":"The `fileId` of each file uploaded through `POST /files/upload` or copied by `POST /email-attachments/:fileId/watermark`, together at most 7 MB. Files in the `email-attachments` folder are deleted once the email reaches a recipient, or a day after upload when no email takes them.","type":"array","items":{"type":"string"}}},"required":["subject","bodyHtml","toEmails","ccEmails"]},"TransitionDocumentsRequestDto":{"type":"object","properties":{"action":{"allOf":[{"$ref":"#/components/schemas/ProspectDocumentsRequestAction"}]},"targetStatus":{"type":"string","enum":["pending","sent","under_internal_review","approved"],"description":"Required when action is exit_clarification."}},"required":["action"]},"PublicDocumentSectionEntity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/ProspectDocumentSectionType"}]}},"required":["id","name","type"]},"PublicDocumentsRequestEntity":{"type":"object","properties":{"sections":{"type":"array","items":{"$ref":"#/components/schemas/PublicDocumentSectionEntity"}}},"required":["sections"]},"SubmitSectionDto":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":["string","null"],"description":"Optional note the recipient submits with the documents"},"files":{"type":"array","items":{"$ref":"#/components/schemas/FileReferenceDto"}}},"required":["id","files"]},"SubmitPublicDto":{"type":"object","properties":{"sections":{"type":"array","items":{"$ref":"#/components/schemas/SubmitSectionDto"}}},"required":["sections"]},"CreateDocumentReviewRequestDto":{"type":"object","properties":{"content":{"type":"string","maxLength":50000,"description":"Sanitised rich text: at most 5000 characters of visible text — markup does not count — and 50000 of HTML."},"reviewerIds":{"description":"The administrators asked to review, 1-50; each must be an internal administrator other than the caller, not suspended, who can view prospects.","type":"array","items":{"type":"string"}}},"required":["content","reviewerIds"]},"ProspectDocumentSectionNoteEntity":{"type":"object","properties":{"id":{"type":"string"},"createdById":{"type":["string","null"]},"createdBy":{"anyOf":[{"$ref":"#/components/schemas/NoteAuthorEntity"},{"type":"null"}]},"content":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"title":{"type":["string","null"]},"source":{"type":["string","null"],"enum":["scribe",null]},"meetingDate":{"format":"date-time","type":["string","null"]},"participants":{"type":"array","items":{"type":"string"}},"replyCount":{"type":"number"},"lastReplyAt":{"format":"date-time","type":["string","null"]},"lastRepliers":{"type":"array","items":{"$ref":"#/components/schemas/NoteAuthorEntity"}},"hasUnread":{"type":"boolean"},"sectionId":{"type":"string"},"reviewers":{"type":"array","items":{"$ref":"#/components/schemas/AssignedUserEntity"}},"files":{"type":"array","items":{"$ref":"#/components/schemas/DocumentSectionFileEntity"}}},"required":["id","createdById","createdBy","content","createdAt","updatedAt","title","source","meetingDate","participants","replyCount","lastReplyAt","lastRepliers","hasUnread","sectionId","reviewers","files"]},"DocumentReviewRequestResultDto":{"type":"object","properties":{"note":{"$ref":"#/components/schemas/ProspectDocumentSectionNoteEntity"},"undeliveredEmails":{"type":"array","items":{"type":"string"}}},"required":["note","undeliveredEmails"]},"UpdateNoteDto":{"type":"object","properties":{"content":{"type":"string","maxLength":50000,"description":"Sanitised rich text: at most 5000 characters of visible text — markup does not count — and 50000 of HTML."}},"required":["content"]},"ProspectStageDto":{"type":"object","properties":{"currentStep":{"allOf":[{"$ref":"#/components/schemas/ProspectStep"}]},"currentStepStatus":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/ProspectInitialContactStatus"},{"$ref":"#/components/schemas/ProspectMndaRequestStatus"},{"$ref":"#/components/schemas/ProspectDocumentsRequestStatus"},{"$ref":"#/components/schemas/ProspectPricingSheetStatus"},{"$ref":"#/components/schemas/ProspectAgreementStatus"}]},{"type":"null"}]}},"required":["currentStep","currentStepStatus"]},"ProspectDocumentStatusDto":{"type":"object","properties":{"requestSent":{"type":"boolean"},"completed":{"type":"number"},"total":{"type":"number"},"completedSectionNames":{"type":"array","items":{"type":"string"}},"outstandingSectionNames":{"type":"array","items":{"type":"string"}}},"required":["requestSent","completed","total","completedSectionNames","outstandingSectionNames"]},"ProspectSnapshotDto":{"type":"object","properties":{"prospect":{"type":"string"},"businessOrIndividual":{"allOf":[{"$ref":"#/components/schemas/ProspectApplicantType"}]},"prospectTypes":{"type":"array","items":{"type":"string","enum":["operating_company","startup","real_estate_hospitality_project","hnwi_individual","foreign_company","existing_puerto_rico_company","existing_decree_holder","tax_credit_candidate"]}},"industries":{"type":"array","items":{"$ref":"#/components/schemas/ProspectIndustry"}},"puertoRicoStatus":{"type":["string","null"]},"existingPrDecree":{"type":["string","null"]},"currentAdvisors":{"type":["string","null"]},"objectivesStatedGoals":{"type":["string","null"]},"leadReferralSource":{"type":["string","null"]}},"required":["prospect","businessOrIndividual","prospectTypes","industries","puertoRicoStatus","existingPrDecree","currentAdvisors","objectivesStatedGoals","leadReferralSource"]},"ProspectServiceLineMappingRowDto":{"type":"object","properties":{"serviceLine":{"type":"string","enum":["foundational_setup","act_60_filing","municipal_decree","incentives_decree_amendment","act_60_individual_filing","individual_decree_amendment","decree_compliance","corporate_tax_and_compliance","individual_tax_and_compliance","pr_rnd_tax_credit","tax_credit_monetization","ht_tax_credits","federal_grant_services","local_grant_services","financing","rnd_bridge_financing","aup_support"]},"status":{"type":"string","enum":["triggered","possible"]},"rationale":{"type":"string"}},"required":["serviceLine","status","rationale"]},"ScoreCategoryDto":{"type":"object","properties":{"score":{"type":"number"},"notes":{"type":"string"}},"required":["score","notes"]},"ProspectScoresDto":{"type":"object","properties":{"serviceFit":{"$ref":"#/components/schemas/ScoreCategoryDto"},"commercialPriority":{"$ref":"#/components/schemas/ScoreCategoryDto"},"strategicImportance":{"$ref":"#/components/schemas/ScoreCategoryDto"},"stageReadiness":{"$ref":"#/components/schemas/ScoreCategoryDto"},"complexity":{"$ref":"#/components/schemas/ScoreCategoryDto"},"documentationReadiness":{"$ref":"#/components/schemas/ScoreCategoryDto"},"compositeScore":{"type":"number"},"futurePotentialNote":{"type":"string"}},"required":["serviceFit","commercialPriority","strategicImportance","stageReadiness","complexity","documentationReadiness","compositeScore","futurePotentialNote"]},"ProspectRecommendationDto":{"type":"object","properties":{"recommendedPriority":{"type":"string","enum":["priority_a","priority_b","priority_c","priority_d"]},"recommendedResponseLevel":{"type":"string","enum":["level_0","level_1","level_2","level_3"]},"rationale":{"type":"string"},"missingInformation":{"type":"string"},"recommendedNextStep":{"type":"string","enum":["schedule_call","request_documents","prepare_simple_email","prepare_summary_memo","prepare_proposal","defer_short_email","transition_to_organization","no_action_added_to_system","no_action_not_moving_forward"]},"triageFlags":{"type":"array","items":{"type":"string"}}},"required":["recommendedPriority","recommendedResponseLevel","rationale","missingInformation","recommendedNextStep","triageFlags"]},"ProspectAiSummaryEntity":{"type":"object","properties":{"id":{"type":"string"},"prospectId":{"type":"string"},"generatedBy":{"anyOf":[{"$ref":"#/components/schemas/NoteAuthorEntity"},{"type":"null"}]},"generatedAt":{"format":"date-time","type":"string"},"headerBlock":{"type":"string"},"summary":{"type":"string"},"warningLine":{"type":["string","null"]},"stage":{"$ref":"#/components/schemas/ProspectStageDto"},"documentStatus":{"$ref":"#/components/schemas/ProspectDocumentStatusDto"},"snapshot":{"$ref":"#/components/schemas/ProspectSnapshotDto"},"serviceLineMapping":{"type":"array","items":{"$ref":"#/components/schemas/ProspectServiceLineMappingRowDto"}},"scores":{"$ref":"#/components/schemas/ProspectScoresDto"},"recommendation":{"$ref":"#/components/schemas/ProspectRecommendationDto"}},"required":["id","prospectId","generatedBy","generatedAt","headerBlock","summary","warningLine","stage","documentStatus","snapshot","serviceLineMapping","scores","recommendation"]},"ProspectAiSummaryResponseDto":{"type":"object","properties":{"summary":{"anyOf":[{"$ref":"#/components/schemas/ProspectAiSummaryEntity"},{"type":"null"}]},"isStale":{"type":"boolean"}},"required":["summary","isStale"]},"GoogleWorkspaceConnectionStatus":{"type":"string","enum":["not_connected","connected","error"]},"GoogleWorkspaceConnectionErrorReason":{"type":"string","enum":["invalid_grant","insufficient_scope"]},"GmailConnectionStatus":{"type":"string","enum":["not_enabled","active","error"]},"GmailSyncErrorReason":{"type":"string","enum":["invalid_grant","insufficient_scope","email_mismatch"]},"GmailConnectionDto":{"type":"object","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/GmailConnectionStatus"}]},"errorReason":{"anyOf":[{"$ref":"#/components/schemas/GmailSyncErrorReason"},{"type":"null"}]},"lastSyncedAt":{"format":"date-time","type":["string","null"]}},"required":["status","errorReason","lastSyncedAt"]},"GoogleWorkspaceConnectionDto":{"type":"object","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/GoogleWorkspaceConnectionStatus"}]},"errorReason":{"anyOf":[{"$ref":"#/components/schemas/GoogleWorkspaceConnectionErrorReason"},{"type":"null"}]},"providerAccountId":{"type":["string","null"]},"timeZone":{"type":["string","null"]},"connectedAt":{"format":"date-time","type":["string","null"]},"gmail":{"$ref":"#/components/schemas/GmailConnectionDto"}},"required":["status","errorReason","providerAccountId","timeZone","connectedAt","gmail"]},"AuthorizeUrlDto":{"type":"object","properties":{"authorizeUrl":{"type":"string"}},"required":["authorizeUrl"]},"StarfruitHuntStatus":{"type":"string","enum":["disabled","not_started","ended","active"],"description":"Resolved from `isEnabled`, `startsAt` and `endsAt`; only `active` accepts collects."},"StarfruitSpot":{"type":"string","enum":["organizations_list","organizations_page_size_max","organizations_global_search","organizations_nickname_search","organizations_row_expanded","org_products_tab","org_products_department_dragged","org_products_department_hidden","org_users_tab","org_users_tab_active_filter","org_client_service_redirect","tasks_create_task","tasks_closed_tab","tasks_organization_filter","profile_modal","profile_modal_name_edit","profile_modal_email_change","support_page","navigation_menu","navigation_menu_collapsed","support_page_privacy_link","support_page_terms_link","organizations_nickname_group_hidden","organizations_poc_sidebar","organizations_ai_summary","org_documents_tab","org_agreements_tab","org_product_sidebar_notes_preview","org_product_sidebar_notes_full_view","org_open_tasks","org_responsible_users_sidebar","tasks_edit_task","user_management_list","calendar_connected","leaderboard_fifth_place","organizations_list_mobile","organizations_nickname_search_mobile","organizations_row_expanded_mobile","org_products_tab_mobile","org_products_department_hidden_mobile","org_users_tab_mobile","org_users_tab_active_filter_mobile","org_rnd_sidebar_information_mobile","navigation_burger_menu","organizations_nickname_group_hidden_mobile","org_product_sidebar_notes_preview_mobile","org_product_sidebar_notes_full_view_mobile","org_open_tasks_mobile","org_responsible_users_sidebar_mobile","user_management_list_mobile"]},"StarfruitHuntStateDto":{"type":"object","properties":{"status":{"description":"Resolved from `isEnabled`, `startsAt` and `endsAt`; only `active` accepts collects.","allOf":[{"$ref":"#/components/schemas/StarfruitHuntStatus"}]},"round":{"type":"string","description":"The open round. Everything a client remembers per browser is scoped to it, so a new round starts clean."},"startsAt":{"format":"date-time","type":["string","null"],"description":"Null means the hunt is open as soon as it is enabled."},"endsAt":{"format":"date-time","type":"string"},"totalSpots":{"type":"number"},"collectedSpots":{"type":"array","items":{"$ref":"#/components/schemas/StarfruitSpot"}}},"required":["status","round","startsAt","endsAt","totalSpots","collectedSpots"]},"CollectStarfruitDto":{"type":"object","properties":{"spot":{"allOf":[{"$ref":"#/components/schemas/StarfruitSpot"}]}},"required":["spot"]},"StarfruitLeaderboardEntryDto":{"type":"object","properties":{"rank":{"type":"number","description":"One-based position in the standings; equal scores are separated by who reached the score first."},"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"image":{"type":["string","null"]},"collectedCount":{"type":"number"}},"required":["rank","userId","name","email","image","collectedCount"]},"StarfruitLeaderboardDto":{"type":"object","properties":{"round":{"type":"string","description":"The round these standings were computed for — compare against the `round` of `GET /starfruit-hunt/current` before trusting a cached response as up to date."},"totalSpots":{"type":"number"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/StarfruitLeaderboardEntryDto"}}},"required":["round","totalSpots","entries"]},"StarfruitHuntConfigDto":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"round":{"type":"string","description":"The open round."},"startsAt":{"type":["string","null"],"format":"date-time"},"endsAt":{"type":"string","format":"date-time"}},"required":["isEnabled","round","startsAt","endsAt"]},"UpdateStarfruitHuntConfigDto":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"round":{"type":"string","minLength":1,"maxLength":255,"description":"Switches the open round."},"startsAt":{"type":["string","null"],"format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"clearOtherRounds":{"type":"boolean","description":"Irreversibly deletes every other round's collections in the same transaction, keeping only the round this request leaves open. Defaults to false, which leaves them in place — switching round back to an earlier value brings that board back, scores included."}}},"HolidayGreetingConfigDto":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"startsOn":{"type":"string","format":"date","description":"The first day the greeting shows, by the browser’s local date."},"endsOn":{"type":"string","format":"date","description":"The last day the greeting shows (inclusive), by the browser’s local date."}},"required":["isEnabled","startsOn","endsOn"]},"UpdateHolidayGreetingConfigDto":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"startsOn":{"type":"string","format":"date"},"endsOn":{"type":"string","format":"date"}}},"EmailDraftTone":{"type":"string","enum":["diplomatic","dealmaker","visionary","custom"]},"GenerateEmailDraftDto":{"type":"object","properties":{"tone":{"allOf":[{"$ref":"#/components/schemas/EmailDraftTone"}]},"body":{"type":"string","maxLength":5000,"description":"Plain text to work from: the flow's predefined message for a preset tone, the admin's description or draft of the email for `custom`."},"predefinedBody":{"type":"string","maxLength":5000,"description":"Read for `custom` only: the flow's predefined message, whose `{{label}}` link placeholders the draft must keep."},"skipSignOff":{"type":"boolean","description":"The email adds its own sign-off below the message, so the draft ends without one."},"subject":{"type":"string","maxLength":255,"description":"The subject the email will go out with, for context."},"recipientNames":{"maxItems":50,"description":"The To recipients' names, so a draft can greet them. Their addresses are never sent.","type":"array","items":{"type":"string"}},"purpose":{"type":"string","maxLength":255,"description":"What the email is for, as the composer names it, e.g. \"Send Questionnaire Link\"."}},"required":["tone","body","purpose"]},"GeneratedEmailDraftDto":{"type":"object","properties":{"body":{"type":"string","description":"Plain text; paragraphs are separated by a blank line."}},"required":["body"]},"CreateBugReportDto":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":5000},"fileStorageKeys":{"description":"Storage keys of up to 5 uploaded files attached to the Jira issue","type":"array","items":{"type":"string"}},"userAgent":{"type":"string","description":"Truncated to 512 characters rather than rejected"}},"required":["title","description"]},"BugReportResultDto":{"type":"object","properties":{"issueKey":{"type":"string","description":"Key of the created Jira issue"},"failedAttachmentCount":{"type":"number","description":"How many attachments the issue was created without, so the reporter can be told what to re-send"}},"required":["issueKey","failedAttachmentCount"]},"SendAssistantMessageDto":{"type":"object","properties":{"message":{"type":"string","maxLength":1000}},"required":["message"]},"ServiceFinancialStatus":{"type":"string","enum":["in_progress","draft","deferred","sent","paid"]},"FinanceSection":{"type":"string","enum":["at_signing","milestones","tax_compliance","success_fee","ad_hoc","expense_reimbursement"],"description":"Where the row is listed. A fixed fee whose stage also carries a success fee percentage is listed twice, in Incentives and in Success Fee, under the same id."},"FinanceProductStatusDto":{"type":"object","properties":{"adminStatus":{"allOf":[{"$ref":"#/components/schemas/DepartmentAdminStatus"}]},"applicationStatus":{"description":"A tax credit application’s own status, which it shows instead of the department status; null for any other service.","anyOf":[{"$ref":"#/components/schemas/ProductApplicationStatus"},{"type":"null"}]},"financialAdminStatus":{"description":"An R&D Supplemental Amendment’s Financial status — its one status, shown instead of the others; null for any other service.","anyOf":[{"$ref":"#/components/schemas/TaxCreditFinancialAdminStatus"},{"type":"null"}]}},"required":["adminStatus","applicationStatus","financialAdminStatus"]},"FinanceTimeLogTotalsDto":{"type":"object","properties":{"totalMinutes":{"type":"number"},"hourlyRate":{"type":["number","null"],"format":"decimal","description":"The rate the record was billed at, frozen then; until then the service’s current one. Null while the service has none."},"amount":{"type":["number","null"],"format":"decimal","description":"The sum of the entries, each rounded to cents; null while the service has no rate."}},"required":["totalMinutes","hourlyRate","amount"]},"FinanceLineExpenseDto":{"type":"object","properties":{"id":{"type":"string","description":"The expense, which its files are added to and removed from through `/expenses/org-expenses/:expenseId/attachments`."},"description":{"type":"string"},"expenseDate":{"type":"string","format":"date","example":"2026-09-14","description":"When DECA spent the money — not when the client paid it back, which is the line’s payment date."},"submittedBy":{"description":"The admin who logged it, or who sent the application to government; null once their account is gone.","anyOf":[{"$ref":"#/components/schemas/UserSummaryEntity"},{"type":"null"}]},"paymentMethod":{"description":"How it was paid, when its author picked a payment method.","anyOf":[{"$ref":"#/components/schemas/ExpensePaymentMethodEntity"},{"type":"null"}]},"attachments":{"description":"Receipts and invoices, oldest first; none reads as a missing attachment.","type":"array","items":{"$ref":"#/components/schemas/ExpenseAttachmentDto"}}},"required":["id","description","expenseDate","submittedBy","paymentMethod","attachments"]},"FinanceSuccessFeeTermsDto":{"type":"object","properties":{"successFeeRate":{"type":["number","null"],"format":"decimal","description":"Percent of the expected tax credits: finance’s own figure, else the one success fee rate its agreement states for this service. Null when neither gives one — the agreement states no single rate (tiered, several or none), or there is none — so it needs entering."},"isSuccessFeeRateManual":{"type":"boolean"},"agreementSuccessFeeRate":{"type":["number","null"],"format":"decimal","description":"The rate its agreement states, which clearing finance’s own figure falls back to. Null when it states no single rate — a tiered fee, several, or none."},"aupTransactionRate":{"type":["number","null"],"format":"decimal","description":"Price per AUP transaction: finance’s own figure, else its agreement’s. Null when neither gives one."},"isAupTransactionRateManual":{"type":"boolean"},"agreementAupTransactionRate":{"type":["number","null"],"format":"decimal","description":"The price per AUP transaction its agreement states, which clearing finance’s own figure falls back to. Null when the agreement gives none."},"aupMinimumAmount":{"type":["number","null"],"format":"decimal","description":"The minimum total its agreement bills the AUP at; a worked-out AUP amount is never below it. Null when the agreement states none, or was read before it was."},"manualAupAmount":{"type":["number","null"],"format":"decimal","description":"The AUP amount finance typed; null works it out from the AUP transactions at their price, never below the agreement’s minimum (`FinanceSuccessFeeFiguresDto.aupAmount`)."}},"required":["successFeeRate","isSuccessFeeRateManual","agreementSuccessFeeRate","aupTransactionRate","isAupTransactionRateManual","agreementAupTransactionRate","aupMinimumAmount","manualAupAmount"]},"FinanceBillingLineDto":{"type":"object","properties":{"id":{"type":"string"},"section":{"description":"Where the row is listed. A fixed fee whose stage also carries a success fee percentage is listed twice, in Incentives and in Success Fee, under the same id.","allOf":[{"$ref":"#/components/schemas/FinanceSection"}]},"title":{"type":"string","description":"What the row reads as. A decree stage reads as its Incentives row, an amendment’s adding \" — <amendment>\"; a filing as its service and period; an at-signing fee as its At Signing group; an expense as \"<service> expense (<description>)\"; any other row as the agreement’s wording or the service, with its stage. A split part’s ends in \" (split)\"."},"serviceName":{"type":"string","description":"The service on its own, without the invoicing stage. Several lines of one service share it, which is what lets a consumer list services rather than stages."},"orgProductId":{"type":["string","null"],"description":"The service the line sits on. Null on an at-signing line that sits on the organization instead, and on the parts split off it."},"stageLabel":{"type":"string","description":"When this line becomes billable, in words — the agreement stage where it named one, otherwise the status that makes the service invoiceable; \"Expense\" on an expense row."},"productStatus":{"description":"Null on a line that sits on no service (`orgProductId`).","anyOf":[{"$ref":"#/components/schemas/FinanceProductStatusDto"},{"type":"null"}]},"financialStatus":{"allOf":[{"$ref":"#/components/schemas/ServiceFinancialStatus"}]},"amount":{"type":["number","null"],"format":"decimal","description":"What the row bills: its price; an ad hoc record’s hours at its rate unless finance typed a figure; an expense’s amount. Null on a Success Fee row, whose figures are `GET /finance/organizations/:orgId/success-fees`."},"isAmountCalculated":{"type":"boolean","description":"The amount is an ad hoc record’s hours at its rate; clearing a typed figure goes back to it."},"isAmountRequired":{"type":"boolean","description":"An amount edit cannot clear it: an expense’s is what was spent, and an R&D credit’s Incentives row without one would be its success fee."},"fee":{"type":["number","null"],"format":"decimal","description":"Null until set, and on a fixed fee’s added Success Fee row, whose fee is its Incentives row’s."},"completionDate":{"format":"date-time","type":["string","null"],"description":"When the line became billable — its stage was reached, it was created already past it, or finance moved it on by hand. Null until then, and again after a stage moves from Ready to be Billed back to Pending — an ad hoc service’s first record included, which is its stage line. An expense’s is the day it was spent and a later ad hoc record’s the day its time was first logged; neither moves with the status."},"signedAt":{"format":"date-time","type":["string","null"],"description":"When the agreement that priced the line was signed — for an at-signing fee, the agreement it bills, whoever priced it since; null for a line no agreement priced."},"billedAt":{"format":"date-time","type":["string","null"],"description":"The first time the line was billed; never cleared."},"paidOn":{"type":["string","null"],"format":"date","example":"2026-09-14","description":"When the client paid; set while the line is Paid."},"timeLogTotals":{"description":"An ad hoc record’s logged time; null on any other row.","anyOf":[{"$ref":"#/components/schemas/FinanceTimeLogTotalsDto"},{"type":"null"}]},"expense":{"description":"What an expense row reimburses; null on any other row.","anyOf":[{"$ref":"#/components/schemas/FinanceLineExpenseDto"},{"type":"null"}]},"successFee":{"description":"A Success Fee row’s terms; null on any other row.","anyOf":[{"$ref":"#/components/schemas/FinanceSuccessFeeTermsDto"},{"type":"null"}]},"deferralNote":{"type":["string","null"],"description":"Why the line is Deferred; null on any other line."},"isSplittable":{"type":"boolean","description":"Whether finance can split the row’s charge in two: true for a charge in At Signing, Incentives or Tax & Compliance of at least $0.02, Ready to be Billed or Deferred."},"fixedRowIndex":{"type":["number","null"],"description":"Where the row sits among its section’s fixed rows, as a placeholder row’s `fixedRowIndex` does: an At Signing row by the group it bills, an Incentives row by its decree row, a split part as its line. Null on any other row, which lists after them."},"taxGeneralRowKey":{"type":["string","null"],"description":"The `key` of the general Tax & Compliance row a filing lists under; null on any other row."},"periodLabel":{"type":["string","null"],"description":"The period a filing is for, as its row under the general row reads (\"January 2026\", \"2025\"; a split part’s ends in \" (split)\"); null on any other row."},"isNotApplicable":{"type":"boolean","description":"A decree stage line no agreement and nobody priced, on an organization with a signed agreement, still Pending or Ready to be Billed: it reads \"—\" and N/A, with no status to pick, as an unpriced decree row does (DECA-3426 ACC-02). False once finance prices it, puts a fee on it, defers or bills it."}},"required":["id","section","title","serviceName","orgProductId","stageLabel","productStatus","financialStatus","amount","isAmountCalculated","isAmountRequired","fee","completionDate","signedAt","billedAt","paidOn","timeLogTotals","expense","successFee","deferralNote","isSplittable","fixedRowIndex","taxGeneralRowKey","periodLabel","isNotApplicable"]},"AgreementTaxGroup":{"type":"string","enum":["corporate","individual"]},"FinanceTaxGeneralRowDto":{"type":"object","properties":{"key":{"type":"string"},"taxGroup":{"allOf":[{"$ref":"#/components/schemas/AgreementTaxGroup"}]},"name":{"type":"string","description":"The agreement row’s filing, or the product’s name where no signed agreement lists it."},"amount":{"type":["number","null"],"format":"decimal","description":"The agreement’s price per occurrence; null with no agreement price."},"isExcluded":{"type":"boolean","description":"The agreement marks the filing Excluded: no price, and nothing is billed for it."},"completionDate":{"format":"date-time","type":["string","null"],"description":"The latest completion date among its filings."},"financialStatus":{"description":"Worked out from all of its filings, whatever the filters show: any Deferred, else any Ready to be Billed, else any Billed, else any Paid, else Pending. Null with no filing.","anyOf":[{"$ref":"#/components/schemas/ServiceFinancialStatus"},{"type":"null"}]},"paidOn":{"type":["string","null"],"format":"date","description":"The latest payment date while the row is Paid."}},"required":["key","taxGroup","name","amount","isExcluded","completionDate","financialStatus","paidOn"]},"FinancePlaceholderRowDto":{"type":"object","properties":{"key":{"type":"string"},"section":{"allOf":[{"$ref":"#/components/schemas/FinanceSection"}]},"title":{"type":"string"},"fixedRowIndex":{"type":"number","description":"Where the row sits among its section’s fixed rows; a line filling a fixed row has the same `fixedRowIndex`."},"amount":{"type":["number","null"],"format":"decimal","description":"The row’s price in the newest signed agreement that prices it, though no line bills it yet. Null for a row no agreement prices."}},"required":["key","section","title","fixedRowIndex","amount"]},"FinanceOrganizationDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/OrganizationStatus"}]},"onHoldReason":{"type":["string","null"]},"label":{"description":"Null until someone tags the organization.","anyOf":[{"$ref":"#/components/schemas/OrganizationLabelEntity"},{"type":"null"}]},"primaryContact":{"description":"The default To and suggestion of a billing follow-up — the same point of contact DECA sends signable documents to. Null when none carries an email.","anyOf":[{"$ref":"#/components/schemas/OrgPrimaryContactDto"},{"type":"null"}]},"kams":{"type":"array","items":{"$ref":"#/components/schemas/AssignedUserEntity"}},"lines":{"description":"In card order: each section’s fixed rows first — the decree rows in Incentives, the general rows’ filings in Tax & Compliance, by group, row and period — and a split part right after its line.","type":"array","items":{"$ref":"#/components/schemas/FinanceBillingLineDto"}},"taxGeneralRows":{"description":"Tax & Compliance by filing type, Corporate first: every type the signed agreements list or a filing has, or, with a line filter on, those holding a filing it matches.","type":"array","items":{"$ref":"#/components/schemas/FinanceTaxGeneralRowDto"}},"placeholderRows":{"description":"The At Signing groups and decree rows an organization with a signed agreement always shows, where it has no line for them, even with no service yet. Empty with a line filter on.","type":"array","items":{"$ref":"#/components/schemas/FinancePlaceholderRowDto"}}},"required":["id","name","status","onHoldReason","label","primaryContact","kams","lines","taxGeneralRows","placeholderRows"]},"FinanceTotalsDto":{"type":"object","properties":{"collected":{"type":"number","description":"Sum of paid rows."},"invoiced":{"type":"number","description":"Sum of billed rows."},"pendingToBeInvoiced":{"type":"number","description":"Sum of Ready to be Billed and Deferred rows."},"workInProgress":{"type":"number","description":"Sum of pending rows."}},"required":["collected","invoiced","pendingToBeInvoiced","workInProgress"]},"FinanceListDto":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginationMetaDto"},"data":{"type":"array","items":{"$ref":"#/components/schemas/FinanceOrganizationDto"}},"totals":{"$ref":"#/components/schemas/FinanceTotalsDto"}},"required":["meta","data","totals"]},"FinanceExportFormat":{"type":"string","enum":["xlsx","csv"]},"FinanceSuccessFeeFiguresDto":{"type":"object","properties":{"lineId":{"type":"string"},"isServiceSplit":{"type":"boolean","description":"The service has more than one Success Fee row, whatever the page’s filters show, so each row names its stage."},"isAupRow":{"type":"boolean","description":"The row the service’s AUP is shown and priced on — the first of its Success Fee rows holding finance’s own AUP terms, else its first; the AUP is billed once per service, so its other rows carry no AUP figures."},"eligibleExpenses":{"type":["number","null"],"format":"decimal"},"expectedTaxCredits":{"type":["number","null"],"format":"decimal","description":"Half the eligible expenses."},"aupTransactionCount":{"type":["number","null"],"description":"Every transaction of the service’s AUP sample, whatever its approval or vouching."},"aupAmount":{"type":["number","null"],"format":"decimal","description":"The AUP amount finance typed, else the transactions at the AUP price and no less than the agreement’s minimum; shown on its own, never added to the expected income."},"expectedIncome":{"type":["number","null"],"format":"decimal","description":"The expected tax credits at the success fee rate. Null until both are known."}},"required":["lineId","isServiceSplit","isAupRow","eligibleExpenses","expectedTaxCredits","aupTransactionCount","aupAmount","expectedIncome"]},"UpdateBillingLineStatusDto":{"type":"object","properties":{"financialStatus":{"allOf":[{"$ref":"#/components/schemas/ServiceFinancialStatus"}]},"expectedStatus":{"description":"The status the caller saw. The move is refused with 409 when the line no longer has it.","allOf":[{"$ref":"#/components/schemas/ServiceFinancialStatus"}]},"paidOn":{"type":"string","format":"date","description":"When the client paid (YYYY-MM-DD), never in the future. Required on a move to Paid, ignored on any other move, which clears it.","example":"2026-09-14"},"deferralNote":{"type":["string","null"],"maxLength":1000,"description":"Why the client pays the line later, in finance’s words; null or blank for no note. Kept on a move to Deferred, ignored on any other move, which clears it."}},"required":["financialStatus","expectedStatus"]},"SendFinanceFollowUpDto":{"type":"object","properties":{"subject":{"type":"string","maxLength":255},"bodyHtml":{"type":"string","maxLength":50000,"description":"Editor HTML, sanitized to paragraphs, line breaks and mention links; 1-5000 characters of visible text."},"toEmails":{"maxItems":50,"minItems":1,"type":"array","items":{"type":"string","format":"email"}},"ccEmails":{"maxItems":50,"description":"Up to 50 recipients (To and CC combined)","type":"array","items":{"type":"string","format":"email"}},"attachmentFileIds":{"maxItems":10,"description":"The `fileId` of each file uploaded through `POST /files/upload` or copied by `POST /email-attachments/:fileId/watermark`, together at most 7 MB. Files in the `email-attachments` folder are deleted once the email reaches a recipient, or a day after upload when no email takes them.","type":"array","items":{"type":"string"}}},"required":["subject","bodyHtml","toEmails","ccEmails"]},"UpdateBillingLineAmountsDto":{"type":"object","properties":{"amount":{"type":["number","null"],"description":"What the row bills: a price, or what an expense cost, which it requires above 0. Null on an ad hoc record goes back to its hours at its rate."},"fee":{"type":["number","null"]}}},"UpdateBillingLinePaymentDateDto":{"type":"object","properties":{"paidOn":{"type":"string","format":"date","description":"When the client paid (YYYY-MM-DD), never in the future.","example":"2026-09-14"}},"required":["paidOn"]},"UpdateBillingLineDeferralNoteDto":{"type":"object","properties":{"deferralNote":{"type":["string","null"],"maxLength":1000,"description":"Why the client pays the line later, in finance’s words; null or blank for no note."},"expectedDeferralNote":{"type":["string","null"],"maxLength":1000,"description":"The note the caller saw. The edit is refused with 409 when the line no longer has it."}},"required":["deferralNote","expectedDeferralNote"]},"SplitBillingLineDto":{"type":"object","properties":{"expectedAmount":{"type":"number","minimum":0,"description":"The line’s amount the caller saw, in USD. The split is refused with 409 when the line no longer has it."},"keptAmount":{"type":"number","minimum":0.01,"description":"What the line keeps, in USD; with `splitAmount`, its amount."},"splitAmount":{"type":"number","minimum":0.01,"description":"What the new part bills, in USD."}},"required":["expectedAmount","keptAmount","splitAmount"]},"UpdateBillingLineSuccessFeeDto":{"type":"object","properties":{"successFeeRate":{"type":["number","null"],"minimum":0,"maximum":100},"aupTransactionRate":{"type":["number","null"],"minimum":0},"aupAmount":{"type":["number","null"],"minimum":0,"description":"Omitted from a save that changes the price per transaction, it is worked out again from the new price."}}},"FinanceArUploadRefDto":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"reportDate":{"type":["string","null"],"example":"2026-09-30","description":"The \"As of\" date QuickBooks printed. Null when the file named none."},"uploadedAt":{"format":"date-time","type":"string"},"uploadedBy":{"anyOf":[{"$ref":"#/components/schemas/UserSummaryEntity"},{"type":"null"}]}},"required":["id","fileName","reportDate","uploadedAt","uploadedBy"]},"FinanceSummaryPeriodDto":{"type":"object","properties":{"from":{"format":"date-time","type":"string"},"to":{"format":"date-time","type":"string"}},"required":["from","to"]},"FinanceReceivableTotalDto":{"type":"object","properties":{"amount":{"type":"number"},"customers":{"type":"number"}},"required":["amount","customers"]},"FinanceAgingBucket":{"type":"string","enum":["current","days_1_30","days_31_60","days_61_90","days_91_plus"]},"FinanceAgingBucketTotalDto":{"type":"object","properties":{"bucket":{"allOf":[{"$ref":"#/components/schemas/FinanceAgingBucket"}]},"amount":{"type":"number"},"customers":{"type":"number","description":"Customers with an amount in this bucket."}},"required":["bucket","amount","customers"]},"FinanceAgingBucketAmountDto":{"type":"object","properties":{"bucket":{"allOf":[{"$ref":"#/components/schemas/FinanceAgingBucket"}]},"amount":{"type":"number"}},"required":["bucket","amount"]},"FinanceArCustomerDto":{"type":"object","properties":{"key":{"type":"string","description":"The organization id, or `qb:` and the QuickBooks customer key when no organization is linked."},"organizationId":{"type":["string","null"],"description":"Null for a QuickBooks customer no organization is linked to."},"name":{"type":"string"},"qbCustomerNames":{"type":"array","items":{"type":"string"}},"buckets":{"description":"Every bucket, in order, including empty ones.","type":"array","items":{"$ref":"#/components/schemas/FinanceAgingBucketAmountDto"}},"total":{"type":"number"}},"required":["key","organizationId","name","qbCustomerNames","buckets","total"]},"FinanceFollowUpChannel":{"type":"string","enum":["client_email","deca_email","internal_note","internal_chat","payment","phone"]},"FinanceSourceKind":{"type":"string","enum":["note","email","meeting"]},"FinanceSummarySourceDto":{"type":"object","properties":{"kind":{"allOf":[{"$ref":"#/components/schemas/FinanceSourceKind"}]},"title":{"type":["string","null"],"description":"The email's subject or the meeting's title; the service a note is on, or null for a note on the organization."},"excerpt":{"type":"string"}},"required":["kind","title","excerpt"]},"FinanceFollowUpDto":{"type":"object","properties":{"organizationId":{"type":"string"},"organizationName":{"type":"string"},"date":{"format":"date-time","type":["string","null"],"description":"Null for an invoice whose move into Billed is not recorded: marked Billed before the finance ledger began, or before the oldest entry read and with a payment since undone."},"sentBy":{"type":"string","description":"A person, or one of \"Payment\", \"Meeting notes\", \"DECA\" where no person sent the entry."},"channel":{"allOf":[{"$ref":"#/components/schemas/FinanceFollowUpChannel"}]},"description":{"type":"string"},"source":{"description":"The note, email or meeting notes the entry was drawn from. Null for an entry from the Finance history.","anyOf":[{"$ref":"#/components/schemas/FinanceSummarySourceDto"},{"type":"null"}]}},"required":["organizationId","organizationName","date","sentBy","channel","description","source"]},"FinanceAiSummaryResponseDto":{"type":"object","properties":{"generatedAt":{"format":"date-time","type":"string"},"upload":{"$ref":"#/components/schemas/FinanceArUploadRefDto"},"followUpPeriod":{"description":"The days Follow-up reads payments, reminders and sources from, and the days a delinquent customer is looked back on. Outstanding invoices are listed whatever their age.","allOf":[{"$ref":"#/components/schemas/FinanceSummaryPeriodDto"}]},"currency":{"type":"string","example":"USD"},"totalAr":{"description":"External and internal customers with a positive balance; credits excluded.","allOf":[{"$ref":"#/components/schemas/FinanceReceivableTotalDto"}]},"buckets":{"description":"External customers only.","type":"array","items":{"$ref":"#/components/schemas/FinanceAgingBucketTotalDto"}},"internal":{"$ref":"#/components/schemas/FinanceReceivableTotalDto"},"customers":{"description":"Every external customer with a positive balance, by name: the All customers table.","type":"array","items":{"$ref":"#/components/schemas/FinanceArCustomerDto"}},"internalCustomers":{"description":"Internal (intercompany) customers with a positive balance, by name: flagged Intercompany in the workbook, or labelled DECA entity when it has no flags.","type":"array","items":{"$ref":"#/components/schemas/FinanceArCustomerDto"}},"credits":{"description":"Customers whose total is negative (a credit or unapplied payment), left out of every other figure.","type":"array","items":{"$ref":"#/components/schemas/FinanceArCustomerDto"}},"topCustomerKeys":{"description":"Keys of the largest `customers` by total, largest first.","type":"array","items":{"type":"string"}},"delinquentCustomerKeys":{"description":"Keys of the `customers` with an amount at 91+ days, no payment and no reply that led to an action in the follow-up period, and no tax-credit collateral.","type":"array","items":{"type":"string"}},"followUps":{"description":"By customer name, and within a customer oldest first, an undated entry first of all. Covers the linked `customers` and `internalCustomers`.","type":"array","items":{"$ref":"#/components/schemas/FinanceFollowUpDto"}},"hasUnreadSources":{"type":"boolean","description":"Some notes, emails or meeting notes of the follow-up period were not read: more fell in it than a report reads, or the prompt had no room left for them. Follow-up may leave them out."}},"required":["generatedAt","upload","followUpPeriod","currency","totalAr","buckets","internal","customers","internalCustomers","credits","topCustomerKeys","delinquentCustomerKeys","followUps","hasUnreadSources"]},"FinanceAiSummaryViewDto":{"type":"object","properties":{"id":{"type":"string"},"generatedAt":{"format":"date-time","type":"string"},"generatedBy":{"anyOf":[{"$ref":"#/components/schemas/UserSummaryEntity"},{"type":"null"}]},"isStale":{"type":"boolean","description":"A newer upload was published, or something the report read changed after it was generated: a customer link, a covered organization's name, label, Finance history, notes, emails, meeting notes or tax credits, or a credit's organization name."},"summary":{"$ref":"#/components/schemas/FinanceAiSummaryResponseDto"}},"required":["id","generatedAt","generatedBy","isStale","summary"]},"FinanceAiSummaryCurrentDto":{"type":"object","properties":{"current":{"description":"The newest report, from the newest published upload. Null until an upload is published.","anyOf":[{"$ref":"#/components/schemas/FinanceAiSummaryViewDto"},{"type":"null"}]},"canRegenerate":{"type":"boolean","description":"An upload is published, so Regenerate can build a report from it — also when its first report failed to build."}},"required":["current","canRegenerate"]},"FinanceAiSummaryHistoryItemDto":{"type":"object","properties":{"id":{"type":"string"},"generatedAt":{"format":"date-time","type":"string"},"generatedBy":{"anyOf":[{"$ref":"#/components/schemas/UserSummaryEntity"},{"type":"null"}]},"fileName":{"type":"string"},"reportDate":{"type":["string","null"],"example":"2026-09-30"}},"required":["id","generatedAt","generatedBy","fileName","reportDate"]},"FinanceAiSummaryHistoryPageDto":{"type":"object","properties":{"meta":{"description":"Cursor pagination metadata","allOf":[{"$ref":"#/components/schemas/CursorPaginationMetaDto"}]},"data":{"description":"List of items","type":"array","items":{"$ref":"#/components/schemas/FinanceAiSummaryHistoryItemDto"}}},"required":["meta","data"]},"FinanceMatchSource":{"type":"string","enum":["linked","name","ai"]},"FinanceCustomerMatchDto":{"type":"object","properties":{"organizationId":{"type":"string"},"organizationName":{"type":"string"},"source":{"allOf":[{"$ref":"#/components/schemas/FinanceMatchSource"}]}},"required":["organizationId","organizationName","source"]},"FinanceArUploadCustomerDto":{"type":"object","properties":{"qbCustomerName":{"type":"string"},"total":{"type":"number"},"match":{"description":"The proposed organization. Null when none was found.","anyOf":[{"$ref":"#/components/schemas/FinanceCustomerMatchDto"},{"type":"null"}]}},"required":["qbCustomerName","total","match"]},"FinanceArUploadPreviewDto":{"type":"object","properties":{"upload":{"$ref":"#/components/schemas/FinanceArUploadRefDto"},"total":{"type":"number"},"customers":{"description":"Every customer row of the file, in file order.","type":"array","items":{"$ref":"#/components/schemas/FinanceArUploadCustomerDto"}}},"required":["upload","total","customers"]},"FinanceCustomerLinkChoiceDto":{"type":"object","properties":{"qbCustomerName":{"type":"string","description":"At most 500 characters."},"organizationId":{"type":["string","null"],"format":"uuid","description":"Null leaves the customer unlinked."}},"required":["qbCustomerName","organizationId"]},"PublishFinanceArUploadDto":{"type":"object","properties":{"links":{"description":"The uploader's choice for each customer, at most 5000. A customer left out keeps its current link, if any.","type":"array","items":{"$ref":"#/components/schemas/FinanceCustomerLinkChoiceDto"}}},"required":["links"]},"FinanceOrganizationOptionDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"FinanceIndividualReportRefDto":{"type":"object","properties":{"generatedAt":{"format":"date-time","type":"string"},"upload":{"$ref":"#/components/schemas/FinanceArUploadRefDto"}},"required":["generatedAt","upload"]},"FinanceIndividualAgingState":{"type":"string","enum":["available","zero","not_linked","linked_after_report","no_report"]},"FinanceLatestUpdateCategory":{"type":"string","enum":["email","note","payment","invoice"]},"FinanceLatestUpdateItemDto":{"type":"object","properties":{"lineId":{"type":"string"},"title":{"type":"string"},"amount":{"type":["number","null"]}},"required":["lineId","title","amount"]},"FinanceLatestUpdateEntryDto":{"type":"object","properties":{"date":{"format":"date-time","type":"string"},"author":{"type":["string","null"],"description":"An email's sender or a note's author. Null for an invoice or a payment."},"text":{"type":"string"},"amount":{"type":["number","null"],"description":"The amount invoiced or paid, summed over `items`."},"isNew":{"type":"boolean","description":"Dated after the previous generation of this summary."},"threadKey":{"type":["string","null"],"description":"The email's thread, which Reply opens. Null for any other entry."},"items":{"description":"The invoices an invoice or payment entry groups, recorded within 30 minutes of its first; empty for an email or a note.","type":"array","items":{"$ref":"#/components/schemas/FinanceLatestUpdateItemDto"}}},"required":["date","author","text","amount","isNew","threadKey","items"]},"FinanceLatestUpdateDto":{"type":"object","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/FinanceLatestUpdateCategory"}]},"entries":{"description":"Every entry after the cutoff, newest first; when there is none, the single newest entry; empty when the category has no entry at all.","type":"array","items":{"$ref":"#/components/schemas/FinanceLatestUpdateEntryDto"}},"newCount":{"type":"number","description":"Every entry after the cutoff, including those past the listed ones."}},"required":["category","entries","newCount"]},"FinanceIndividualFollowUpState":{"type":"string","enum":["available","credit","zero","not_linked","linked_after_report","no_report"],"description":"`available` when Follow-up was generated; otherwise why there is none. At `zero` the section is hidden."},"FinanceIndividualSummaryDto":{"type":"object","properties":{"generatedAt":{"format":"date-time","type":"string"},"generatedBy":{"anyOf":[{"$ref":"#/components/schemas/UserSummaryEntity"},{"type":"null"}]},"isStale":{"type":"boolean","description":"The organization's data changed after this summary was generated, or a newer report exists."},"hasNewerReport":{"type":"boolean","description":"A report newer than the one the aging was copied from exists — or one exists now, when none did at generation."},"cutoff":{"format":"date-time","type":"string","description":"Entries after this are New: the previous generation, or on a first generation a fixed look-back."},"report":{"description":"Null when no report existed at generation.","anyOf":[{"$ref":"#/components/schemas/FinanceIndividualReportRefDto"},{"type":"null"}]},"agingState":{"allOf":[{"$ref":"#/components/schemas/FinanceIndividualAgingState"}]},"customer":{"description":"The organization's aging as the report holds it. Null unless `agingState` is `available`.","anyOf":[{"$ref":"#/components/schemas/FinanceArCustomerDto"},{"type":"null"}]},"isInternal":{"type":"boolean"},"latestUpdates":{"description":"Always four, in this order: email, note, payment, invoice.","type":"array","items":{"$ref":"#/components/schemas/FinanceLatestUpdateDto"}},"followUpState":{"description":"`available` when Follow-up was generated; otherwise why there is none. At `zero` the section is hidden.","allOf":[{"$ref":"#/components/schemas/FinanceIndividualFollowUpState"}]},"followUps":{"description":"Oldest first. Empty unless `followUpState` is `available`.","type":"array","items":{"$ref":"#/components/schemas/FinanceFollowUpDto"}},"hasUnreadSources":{"type":"boolean","description":"Some notes, emails or meeting notes of the follow-up period were not read: more fell in it than a summary reads, or the prompt had no room left for them. Follow-up may leave them out."}},"required":["generatedAt","generatedBy","isStale","hasNewerReport","cutoff","report","agingState","customer","isInternal","latestUpdates","followUpState","followUps","hasUnreadSources"]},"FinanceIndividualSummaryViewDto":{"type":"object","properties":{"organizationName":{"type":"string"},"summary":{"description":"Null until the summary is first generated.","anyOf":[{"$ref":"#/components/schemas/FinanceIndividualSummaryDto"},{"type":"null"}]}},"required":["organizationName","summary"]},"GmailClientChoiceState":{"type":"string","enum":["open","expired","resolved"]},"GmailClientChoiceOwnerType":{"type":"string","enum":["org","prospect"]},"GmailClientChoiceCandidateKind":{"type":"string","enum":["business","individual","prospect"]},"GmailClientChoiceCandidateDto":{"type":"object","properties":{"ownerType":{"allOf":[{"$ref":"#/components/schemas/GmailClientChoiceOwnerType"}]},"ownerId":{"type":"string","format":"uuid"},"name":{"type":"string"},"kind":{"allOf":[{"$ref":"#/components/schemas/GmailClientChoiceCandidateKind"}]}},"required":["ownerType","ownerId","name","kind"]},"GmailClientChoiceDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fromName":{"type":["string","null"]},"fromEmail":{"type":"string"},"subject":{"type":"string"},"receivedAt":{"format":"date-time","type":"string"},"expiresAt":{"format":"date-time","type":"string"},"state":{"allOf":[{"$ref":"#/components/schemas/GmailClientChoiceState"}]},"candidates":{"description":"Only while open: the clients the admin can open and manage the emails of now.","type":"array","items":{"$ref":"#/components/schemas/GmailClientChoiceCandidateDto"}}},"required":["id","fromName","fromEmail","subject","receivedAt","expiresAt","state","candidates"]},"FileGmailClientChoiceDto":{"type":"object","properties":{"ownerType":{"allOf":[{"$ref":"#/components/schemas/GmailClientChoiceOwnerType"}]},"ownerId":{"type":"string","format":"uuid"}},"required":["ownerType","ownerId"]},"GmailClientChoiceOutcome":{"type":"string","enum":["filed","left_in_gmail","gone_from_gmail","gmail_disconnected","expired","filed_elsewhere","already_resolved","forbidden"]},"GmailClientChoiceOwnerDto":{"type":"object","properties":{"ownerType":{"allOf":[{"$ref":"#/components/schemas/GmailClientChoiceOwnerType"}]},"ownerId":{"type":"string","format":"uuid"}},"required":["ownerType","ownerId"]},"GmailClientChoiceResolutionDto":{"type":"object","properties":{"outcome":{"allOf":[{"$ref":"#/components/schemas/GmailClientChoiceOutcome"}]},"threadKey":{"type":["string","null"]},"owner":{"anyOf":[{"$ref":"#/components/schemas/GmailClientChoiceOwnerDto"},{"type":"null"}]}},"required":["outcome","threadKey","owner"]},"User":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"email":{"type":"string"},"emailVerified":{"type":"boolean","default":false,"readOnly":true},"image":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"twoFactorEnabled":{"type":"boolean","default":false,"readOnly":true},"phoneNumber":{"type":"string","readOnly":true},"themePreference":{"type":"string","readOnly":true,"enum":["light","dark","system"]}},"required":["id","name","email","emailVerified","createdAt","updatedAt"]},"Session":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"expiresAt":{"type":"string","format":"date-time"},"token":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"ipAddress":{"type":"string"},"userAgent":{"type":"string"},"userId":{"type":"string"},"activeOrgId":{"type":"string"}},"required":["id","expiresAt","token","createdAt","updatedAt","userId"]},"Account":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"accountId":{"type":"string"},"providerId":{"type":"string"},"userId":{"type":"string"},"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"idToken":{"type":"string"},"accessTokenExpiresAt":{"type":"string","format":"date-time"},"refreshTokenExpiresAt":{"type":"string","format":"date-time"},"scope":{"type":"string"},"password":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","accountId","providerId","userId","createdAt","updatedAt"]},"Verification":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"identifier":{"type":"string"},"value":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","identifier","value","expiresAt","createdAt","updatedAt"]},"TwoFactor":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"secret":{"type":"string"},"backupCodes":{"type":"string"},"userId":{"type":"string"},"verified":{"type":"boolean","default":true,"readOnly":true},"failedVerificationCount":{"type":"number","default":0,"readOnly":true},"lockedUntil":{"type":"string","format":"date-time","readOnly":true}},"required":["id"]}}},"externalDocs":{"description":"OpenAPI JSON","url":"/swagger.json"}}