Sales Order Type Service
Overview
Sales order types define classifications for sales orders, such as standard orders, backorders, or special orders.
They are used to categorize orders for reporting, processing rules, and workflow management.
Sales order types provide:
- consistent categorization of orders
- custom behavior per order type
- integration with fulfillment and accounting systems
- filtering and analytics
All operations are tenant-aware and scoped to the current tenant.
Endpoints
GET
/api/SalesOrderType/GetSalesOrderTypeById/{id}
Returns a single sales order type by its numeric identifier.
Behavior:
- Looks up sales order type by
Id - Returns
404if not found
Authorization:
- Requires Bearer Token
POST
/api/SalesOrderType/AddNewSalesOrderType
Creates a new sales order type.
Request body:
SalesOrderTypeModel(required)
Behavior:
- Validation is handled in the service layer
- Successful creation writes an audit log entry
Errors:
- Returns
400if validation -
Authorization:
- Requires Bearer Token
PUT
/api/SalesOrderType/UpdateSalesOrderTypeById/{id}
Updates an existing sales order type.
Request:
- Route parameter:
id(numeric) - Body:
SalesOrderTypeModel(with updated fields)
Behavior:
- Updates all fields of the sales order type
- Partial updates are not supported
- Successful update writes an audit log entry
Errors:
- Returns
400if validation - or type does not exist
Authorization:
- Requires Bearer Token
DELETE
/api/SalesOrderType/DeleteSalesOrderTypeById/{id}
Deletes a sales order type by its identifier.
Behavior:
- Performs a hard delete
- Record is permanently removed from the database
- Successful deletion writes an audit log entry
Errors:
- Returns
400if type does not exist or deletion -
Authorization:
- Requires Bearer Token
Notes
- Validation is enforced in the service layer, not via model attributes
- All operations are tenant-aware
- All state-changing operations are audited
- Internal errors are logged but not exposed to clients