Entity Status Service
Overview
The Entity Status Service manages the list of statuses that can be assigned to entities (customers or suppliers). Statuses provide a classification such as Prospect, Active, or Inactive and can be customised per tenant.
Each status includes:
Id- unique identifierTitle- display labelWeighting- numeric ordering weightCreatedAt- creation timestamp
The following statuses are seeded by default:
| Id | Title | Weighting |
|---|---|---|
| 1 | Prospect | 0 |
| 2 | Active | 1 |
| 3 | Inactive | 2 |
All operations are tenant-aware.
Database table
entities.EntityStatus
Endpoints
GET
/api/v1/EntityStatus
Returns all entity statuses for the current tenant.
Behavior:
- Returns a list of all statuses ordered by
Weighting - Returns
404if no statuses exist
Response:
List<EntityStatusModel>
Authorization:
- Requires Bearer Token
- Permission:
FullRead
GET
/api/v1/EntityStatus/{id}
Returns a single entity status by its ID.
Route parameters:
id(int, required) - entity status identifier
Behavior:
- Returns
404if not found
Response:
EntityStatusModel
Authorization:
- Requires Bearer Token
- Permission:
FullRead
POST
/api/v1/EntityStatus
Creates a new entity status.
Request body (EntityStatusModel):
Title(string, required) - status labelWeighting(int, optional, default: 0) - display ordering weight
Behavior:
- Validates that
Titleis not empty - Writes an audit log entry on success
Response:
201 Created-EntityStatusModel
Authorization:
- Requires Bearer Token
- Permission:
FullManage
PUT
/api/v1/EntityStatus/{id}
Updates an existing entity status.
Route parameters:
id(int, required) - entity status identifier
Request body (EntityStatusModel):
Title(string, optional) - updated status labelWeighting(int, optional) - updated ordering weight
Behavior:
Idis taken from the route- Writes an audit log entry on success
Response:
200 OK-EntityStatusModel
Authorization:
- Requires Bearer Token
- Permission:
FullManage
DELETE
/api/v1/EntityStatus/{id}
Deletes an entity status by ID.
Route parameters:
id(int, required) - entity status identifier
Behavior:
- Performs a hard delete — record is permanently removed
- Writes an audit log entry on success
Response:
204 No Content
Authorization:
- Requires Bearer Token
- Permission:
FullManage
Model
EntityStatusModel
Fields:
Id (type: int)- internal identifierTitle (type: string?)- status display labelWeighting (type: int)- ordering weightCreatedAt (type: DateTime)- creation timestamp
Notes
StatusIdonEntityModelreferences this table- The
StatusTitlefield onEntityModelresponses is resolved from this table (read-only) - Seeded statuses (Prospect, Active, Inactive) can be renamed but should not be deleted if entities reference them
- All data is tenant-scoped
- Internal errors are logged but not exposed to API consumers