Organization Creation Fields
This document outlines the fields required when creating a new organization via the /organizations API endpoint.
Required Fields (Backend Validation)
The backend currently validates for the presence of the following fields:
orgName: The primary name of the organization (e.g., "Acme Corp").fullName: The full legal name of the organization.address: The physical address of the organization. Currently expected as a single string.adminName: The name of the primary administrator for this organization.adminEmail: The email address of the primary administrator for this organization.industry: The industry the organization operates in.
Optional Fields (Backend Accepts)
The backend also accepts the following optional fields:
dunsNumber: The DUNS number of the organization.creatorUserId: The ID of the user creating the organization (automatically added by frontend).creatorEmail: The email of the user creating the organization (automatically added by frontend).creatorDisplayName: The display name of the user creating the organization (automatically added by frontend).
Frontend Fields (Currently Sent)
The frontend form in CreateOrganizationForm.jsx currently sends the following fields:
orgNamefullNameaddressindustrydunsNumberadminNameadminEmailsubscriptionTierlicensescontractStartDatecontractEndDateprimaryErpcreatorUserId(added inhandleSubmit)
Notes & Questions
fullNamevs.orgName: Please clarify the intended use offullName. Is it the legal name, or canorgNameserve this purpose?- Address Structure: The current
addressfield is a single string. If a more granular structure (e.g., street, city, state, postal code, country) is desired, this would require:- Updates to the
tenantstable migration to add new columns. - Updates to the frontend form to collect these separate fields.
- Updates to the backend API to process these separate fields.
- Updates to the
- DUNS Number Validation: Currently,
dunsNumberis a free-text field. If a specific format (e.g., 9 digits) is required, frontend validation (e.g., regex) and backend validation should be implemented.