Concepts, value, and typical clone scenarios — less code.
Concepts, value, and typical clone scenarios — less code.
Підготовка контенту платформи Ring
Підготовка контенту платформи Ring
Підготовка контенту платформи Ring
Manage organizations and businesses with 11 endpoints for comprehensive entity management, including role-based access control and industry-specific features.
Entities represent organizations, businesses, and professional groups within the Ring Platform ecosystem.
Key Features:
GET /api/entitiesList entities with role-aware filtering and pagination (limit, startAfter).
POST /api/entities/createCreate a new entity (authenticated; requires sufficient role).
GET /api/entities/{id}Get entity details by ID.
PUT /api/entities/{id}Full update entity fields (owner or ADMIN).
PATCH /api/entities/{id}Partial update with validated fields (name, type, shortDescription, visibility, isConfidential, plus passthrough). Canonical update path — replaces legacy PATCH /api/entities/update/{id}.
DELETE /api/entities/{id}Hard-delete entity. Requires session cookie and JSON body { "confirm": true }. Owner or ADMIN (see delete-entity service). Prefer the Server Action flow from /entities/{id}/delete for in-app UI.
POST /api/entities/{id}/verifyQueue entity for platform verification review (owner or ADMIN). Sets verificationStatus: 'pending' and records entity_verification_requests. Returns 202 when accepted.
POST /api/entities/{id}/inviteInvite an existing platform user to the entity by email. Appends their user id to members and sends an in-app notification. Body: { "email": "user@example.com", "role": "member" } (role is informational today).
GET /api/entities/{id}/analyticsEntity performance snapshot for owners, entity members, or ADMIN: member count, linked opportunities, storeMetrics, verification state.
POST /api/entities/uploadUpload entity media assets.
Create/update/delete in the UI still prefer Server Actions (app/_actions/entities.ts). REST routes above are for API clients and integrations.
API and server services expose SerializedEntity — date fields as ISO strings. Types live in features/entities/types.
DatabaseService query rows map through mapDbQueryRowToSerializedEntity() in features/entities/lib/entity-db-mapper.ts. Do not use lib/converters/entity-converter.ts on the Postgres path — it is a Firestore-only legacy FirestoreDataConverter.
Creates, updates, and deletes call syncEntityDiscovery():
revalidateTag — invalidateEntitiesCache (lib/cached-data.ts)revalidatePath — /[locale]/entities, /[locale]/entities/[id], /[locale]/entities/my, /entities on createsyncDiscovery({ channel: 'entities', … }) → entity:created|updated|deletedAuthenticated members use /[locale]/entities/my (ROUTES.MY_ENTITIES). Data loads via getMyEntities() in features/entities/services/get-user-entities.ts with tab views: all (owned), store, member.
Ring Platform supports 26 industry types:
Entities can request verification badges:
Benefits of Verification:
Ready to create your first entity? Check our Getting Started guide.
Manage organizations and businesses with 11 endpoints for comprehensive entity management, including role-based access control and industry-specific features.
Entities represent organizations, businesses, and professional groups within the Ring Platform ecosystem.
Key Features:
GET /api/entitiesList entities with role-aware filtering and pagination (limit, startAfter).
POST /api/entities/createCreate a new entity (authenticated; requires sufficient role).
GET /api/entities/{id}Get entity details by ID.
PUT /api/entities/{id}Full update entity fields (owner or ADMIN).
PATCH /api/entities/{id}Partial update with validated fields (name, type, shortDescription, visibility, isConfidential, plus passthrough). Canonical update path — replaces legacy PATCH /api/entities/update/{id}.
DELETE /api/entities/{id}Hard-delete entity. Requires session cookie and JSON body { "confirm": true }. Owner or ADMIN (see delete-entity service). Prefer the Server Action flow from /entities/{id}/delete for in-app UI.
POST /api/entities/{id}/verifyQueue entity for platform verification review (owner or ADMIN). Sets verificationStatus: 'pending' and records entity_verification_requests. Returns 202 when accepted.
POST /api/entities/{id}/inviteInvite an existing platform user to the entity by email. Appends their user id to members and sends an in-app notification. Body: { "email": "user@example.com", "role": "member" } (role is informational today).
GET /api/entities/{id}/analyticsEntity performance snapshot for owners, entity members, or ADMIN: member count, linked opportunities, storeMetrics, verification state.
POST /api/entities/uploadUpload entity media assets.
Create/update/delete in the UI still prefer Server Actions (app/_actions/entities.ts). REST routes above are for API clients and integrations.
API and server services expose SerializedEntity — date fields as ISO strings. Types live in features/entities/types.
DatabaseService query rows map through mapDbQueryRowToSerializedEntity() in features/entities/lib/entity-db-mapper.ts. Do not use lib/converters/entity-converter.ts on the Postgres path — it is a Firestore-only legacy FirestoreDataConverter.
Creates, updates, and deletes call syncEntityDiscovery():
revalidateTag — invalidateEntitiesCache (lib/cached-data.ts)revalidatePath — /[locale]/entities, /[locale]/entities/[id], /[locale]/entities/my, /entities on createsyncDiscovery({ channel: 'entities', … }) → entity:created|updated|deletedAuthenticated members use /[locale]/entities/my (ROUTES.MY_ENTITIES). Data loads via getMyEntities() in features/entities/services/get-user-entities.ts with tab views: all (owned), store, member.
Ring Platform supports 26 industry types:
Entities can request verification badges:
Benefits of Verification:
Ready to create your first entity? Check our Getting Started guide.
Manage organizations and businesses with 11 endpoints for comprehensive entity management, including role-based access control and industry-specific features.
Entities represent organizations, businesses, and professional groups within the Ring Platform ecosystem.
Key Features:
GET /api/entitiesList entities with role-aware filtering and pagination (limit, startAfter).
POST /api/entities/createCreate a new entity (authenticated; requires sufficient role).
GET /api/entities/{id}Get entity details by ID.
PUT /api/entities/{id}Full update entity fields (owner or ADMIN).
PATCH /api/entities/{id}Partial update with validated fields (name, type, shortDescription, visibility, isConfidential, plus passthrough). Canonical update path — replaces legacy PATCH /api/entities/update/{id}.
DELETE /api/entities/{id}Hard-delete entity. Requires session cookie and JSON body { "confirm": true }. Owner or ADMIN (see delete-entity service). Prefer the Server Action flow from /entities/{id}/delete for in-app UI.
POST /api/entities/{id}/verifyQueue entity for platform verification review (owner or ADMIN). Sets verificationStatus: 'pending' and records entity_verification_requests. Returns 202 when accepted.
POST /api/entities/{id}/inviteInvite an existing platform user to the entity by email. Appends their user id to members and sends an in-app notification. Body: { "email": "user@example.com", "role": "member" } (role is informational today).
GET /api/entities/{id}/analyticsEntity performance snapshot for owners, entity members, or ADMIN: member count, linked opportunities, storeMetrics, verification state.
POST /api/entities/uploadUpload entity media assets.
Create/update/delete in the UI still prefer Server Actions (app/_actions/entities.ts). REST routes above are for API clients and integrations.
API and server services expose SerializedEntity — date fields as ISO strings. Types live in features/entities/types.
DatabaseService query rows map through mapDbQueryRowToSerializedEntity() in features/entities/lib/entity-db-mapper.ts. Do not use lib/converters/entity-converter.ts on the Postgres path — it is a Firestore-only legacy FirestoreDataConverter.
Creates, updates, and deletes call syncEntityDiscovery():
revalidateTag — invalidateEntitiesCache (lib/cached-data.ts)revalidatePath — /[locale]/entities, /[locale]/entities/[id], /[locale]/entities/my, /entities on createsyncDiscovery({ channel: 'entities', … }) → entity:created|updated|deletedAuthenticated members use /[locale]/entities/my (ROUTES.MY_ENTITIES). Data loads via getMyEntities() in features/entities/services/get-user-entities.ts with tab views: all (owned), store, member.
Ring Platform supports 26 industry types:
Entities can request verification badges:
Benefits of Verification:
Ready to create your first entity? Check our Getting Started guide.
const response = await fetch('/api/entities/create', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
name: 'Tech Innovators Inc',
type: 'technologySoftware',
shortDescription: 'Leading software development company',
location: 'San Francisco, CA',
}),
})
const { entity } = await response.json()
const response = await fetch(`/api/entities/${entityId}`)
const entity = await response.json()
if (entity.confidential && !hasConfidentialAccess) {
// Handle confidential entity access
}
const response = await fetch('/api/entities/create', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
name: 'Tech Innovators Inc',
type: 'technologySoftware',
shortDescription: 'Leading software development company',
location: 'San Francisco, CA',
}),
})
const { entity } = await response.json()
const response = await fetch(`/api/entities/${entityId}`)
const entity = await response.json()
if (entity.confidential && !hasConfidentialAccess) {
// Handle confidential entity access
}
const response = await fetch('/api/entities/create', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
name: 'Tech Innovators Inc',
type: 'technologySoftware',
shortDescription: 'Leading software development company',
location: 'San Francisco, CA',
}),
})
const { entity } = await response.json()
const response = await fetch(`/api/entities/${entityId}`)
const entity = await response.json()
if (entity.confidential && !hasConfidentialAccess) {
// Handle confidential entity access
}