Skip to content

Organizations

The organizations module manages organization entities post-onboarding: organization listing (MORIA only), reference data (sizes and industries), per-organization detail, and organization profile updates. All endpoints require Bearer + the read-organization / update-organization permissions.

PropertyValue
Base URL{HOST}/v1
AuthBearer JWT (header Authorization) or cookie access_token
Content-Typeapplication/json
Error envelope{ "message": string | string[], "statusCode": number, "error": string }
ValidationGlobal ValidationPipe · whitelist: true, forbidNonWhitelisted: true · unknown field → 400
Related modulesonboarding, users, acl, accounts
Document versionv1 · 2026-05-20
AudienceInternal FE devs (mobile + web)

The full organization list is visible only to the MORIA role. Reference endpoints (sizes, industries) are used by FE to populate dropdown pickers in organization create/edit forms. Per-organization detail is accessible to anyone with read-organization, while update is only allowed for one’s own organization (unless the user is moria_super_admin).

MethodPathAuthSummary
GET/v1/organizationsbearerList organizations (MORIA only)
GET/v1/organizations/sizesbearerReference data for organization sizes
GET/v1/organizations/industriesbearerReference data for industry sectors
GET/v1/organizations/:organization_idbearerDetail of one organization
PATCH/v1/organizations/:organization_idbearerUpdate organization profile

Fetch the organization list (paginated). For UserType.MORIA only, with the read-organization permission.

bearer MORIA read-organization RESOURCE_FETCHED
ParamTypeDefaultNotes
pagenumber1Page number
limitnumber10Records per page
order'asc' | 'desc'descOrder by created_at
{
"status": "success",
"statusCode": 200,
"message": "Organizations retrieved successfully",
"data": {
"limit": 10,
"count": 42,
"currentPage": 1,
"totalPages": 5,
"organizations": [
{
"id": "660e8400-e29b-41d4-a716-446655440111",
"name": "Moria Fund",
"email": "ops@moriafund.com",
"phone_number": "+628123456788",
"logo_id": null,
"status": "active",
"industry": "finance",
"official_registration_number": "0123456789",
"created_at": "2026-05-20T08:30:00.000Z",
"updated_at": "2026-05-20T08:30:00.000Z"
}
]
}
}
StatusWhen it occurs
401 UnauthorizedInvalid Bearer/cookie
403 ForbiddenNot MORIA or missing read-organization permission

GET /v1/organizations/sizes bearer

Section titled “GET /v1/organizations/sizes ”

Reference data for organization sizes (e.g. tens, hundreds, thousands, millions). Used for FE dropdowns.

bearer MORIA, ORGANIZATION read-organization
ParamTypeDefaultNotes
pagenumber1Page number
limitnumber10Records per page
order'asc' | 'desc'descOrder by created_at
{
"status": "success",
"statusCode": 200,
"message": "Organization sizes retrieved successfully",
"data": {
"limit": 10,
"count": 4,
"currentPage": 1,
"totalPages": 1,
"sizes": [
{ "id": "...", "label": "tens", "range": "1-10" }
]
}
}
StatusWhen it occurs
401 UnauthorizedInvalid Bearer/cookie
403 ForbiddenPermission mismatch

GET /v1/organizations/industries bearer

Section titled “GET /v1/organizations/industries ”

Reference data for industry sectors (e.g. finance, health, technnology, government, ngo). Used for FE dropdowns.

bearer MORIA, ORGANIZATION read-organization
ParamTypeDefaultNotes
pagenumber1Page number
limitnumber10Records per page
order'asc' | 'desc'descOrder by created_at
{
"status": "success",
"statusCode": 200,
"message": "Organization industries retrieved successfully",
"data": {
"limit": 10,
"count": 11,
"currentPage": 1,
"totalPages": 2,
"industries": [
{ "id": "...", "value": "finance", "label": "Finance" }
]
}
}

The enum value INDUSTRY.TECHNOLOGY is recorded as "technnology" (typo retained for mobile client compatibility). See the enum reference below.

StatusWhen it occurs
401 UnauthorizedInvalid Bearer/cookie
403 ForbiddenPermission mismatch

GET /v1/organizations/:organization_id bearer

Section titled “GET /v1/organizations/:organization_id ”

Detail of one organization by UUID. The server validates read permission + the caller’s organization scope.

bearer read-organization
ParamTypeNotes
organization_idUUIDOrganization ID (must be UUID, validated via ParseUUIDPipe)
{
"status": "success",
"statusCode": 200,
"message": "organization fetched successfully",
"data": {
"organization": {
"id": "660e8400-e29b-41d4-a716-446655440111",
"name": "Moria Fund",
"email": "ops@moriafund.com",
"phone_number": "+628123456788",
"logo_id": null,
"industry": "finance",
"official_registration_number": "0123456789",
"status": "active",
"created_at": "2026-05-20T08:30:00.000Z",
"updated_at": "2026-05-20T08:30:00.000Z"
}
}
}
StatusWhen it occurs
400 Bad Requestorganization_id is not a UUID
401 UnauthorizedInvalid Bearer/cookie
403 ForbiddenPermission mismatch
404 Not FoundOrganization not found

PATCH /v1/organizations/:organization_id bearer

Section titled “PATCH /v1/organizations/:organization_id ”

Update an organization profile. Only moria_super_admin may edit other organizations; other organization users may only edit their own organization.

bearer update-organization
ParamTypeNotes
organization_idUUIDTarget organization ID
FieldTypeRequiredNotes
namestringoptionalOrganization name
logo_idstringoptionalLogo file UUID (see file-manager module)
emailstringoptionalOrganization contact email
phone_numberstringoptionalContact phone
official_registration_numberstringoptionalOfficial registration number
statusenum ORGANIZATION_STATUSoptionalpending, active, inactive, suspended
{
"name": "Moria Fund Pro",
"email": "contact@moriafund.com",
"status": "active"
}
{
"status": "success",
"statusCode": 200,
"message": "Organization updated successfully",
"data": {
"organization": {
"id": "660e8400-e29b-41d4-a716-446655440111",
"name": "Moria Fund Pro",
"email": "contact@moriafund.com",
"phone_number": "+628123456788",
"status": "active",
"updated_at": "2026-05-20T09:00:00.000Z"
}
}
}
StatusWhen it occurs
400 Bad RequestValidation failed (invalid enum, unknown field)
401 UnauthorizedNon-moria_super_admin user attempts to edit another organization
403 ForbiddenMissing update-organization permission
404 Not FoundOrganization not found

  • pending — just signed up, awaiting KYB verification
  • active — fully operational
  • inactive — temporarily deactivated
  • suspended — suspended by Moria
  • finance, health, agriculture, education
  • technnology (typo retained)
  • manufacturing, marine, aviation, security
  • government, ngo
  • tens, hundreds, thousands, millions
{
"message": "you can't edit another organization",
"statusCode": 401,
"error": "Unauthorized"
}

message can be a string or an array of strings (multi-field validation errors).

  • 400 body/param validation
  • 401 no cross-org access
  • 403 role/permission mismatch
  • 404 organization not found
  • 500 internal — show a generic toast in FE