code. Each company has the built-in type business_entity, and the company can define its own types. A type code never changes; you pass it as type wherever these routes take a type.
Endpoints (all Company Key):
GET /v2/organization-unit-types— list the unit types of the companyPOST /v2/organization-units— create a unit of any typeGET /v2/organization-units— list units, optionally of one typeGET /v2/organization-units/{organizationUnitId}— get one unitPATCH /v2/organization-units/{organizationUnitId}— rename a unit or move it to another type
Unit types
GET /v2/organization-unit-types lists every type of the company, archived types included: the built-in type first, then the other types by name.
Create a unit
POST /v2/organization-units with a JSON body:
- The unit is created at the top of the organization (this route takes no
parentId). - Units created through the Partner API are approved straight away.
- Response:
id,name,type,companyId.
List and read units
GET /v2/organization-unitslists the units of the company, newest first. The optionaltypequery parameter keeps only units of that type; an archived type is accepted as a filter.GET /v2/organization-units/{organizationUnitId}returns one unit of any type, withupdatedAt. The optionaltypequery parameter is an assertion: if the unit has another type, the answer is404.- Each unit carries
id,name,type,companyId,parentId,isArchived,isApprovedandcreatedAt.
Update a unit
PATCH /v2/organization-units/{organizationUnitId} with name, type, or both:
name— new display name, at most 255 characters, unique within the target type (case-insensitive). The name is stored exactly as sent, including characters such as$.type— move the unit to another type that is not archived.- The optional
typequery parameter asserts the unit’s current type, as on the read route. - A unit that is archived cannot be updated.
- The response is the updated unit, with
updatedAt.
Unit attributes
The Partner API neither sets nor returns unit attributes. Anattributes field in a create or update body is ignored, and no unit response carries attributes. Required attributes of a type are not checked on these routes: a unit created here has no attribute values, and an update leaves the stored values as they are.
Errors
The organization unit routes answer404 when the unit is not found.
Business entities
A business entity is an organization unit of the built-inbusiness_entity type:
- List them with
GET /v2/organization-units?type=business_entity. - Create one with
POST /v2/organization-unitsand"type": "business_entity". - The
organizationUnitIdreturned by onboarding is the company’s defaultbusiness_entityunit. - A unit moved to another type no longer appears in the
type=business_entitylist.
Submit documents to any unit
Use the/v2 document routes with organizationUnitId; they accept an active, unarchived unit of any type of your company:
POST /v2/documents/submit— see Document Submission. A unit that is not found, is archived or belongs to another company is answered with422andgenericErrors:Organization unit not found or access denied(not404).POST /v2/documents/upload/start— see Chunked Upload.complianceFrameworkIdandcontrolIdare still required withorganizationUnitId. The unit is not checked at start; it is resolved when the last chunk arrives. If it cannot be resolved then, the last chunk answers404and the session becomesFailed.