Sales Order Line Service
Overview
Sales order lines represent individual items within a sales order.
Each line captures details about the product, quantity, pricing, and any additional attributes relevant for fulfillment.
Sales order lines provide a consistent reference for:
- tracking products within orders
- calculating order totals
- reporting and analytics
- integration with inventory and pricing modules
All sales order line operations are tenant-aware and scoped to the current tenant.
Endpoints
GET
/api/SalesOrderLine/GetAllSalesOrderLinesBySalesOrderId/{salesOrderId}
Returns all lines for a specific sales order.
Behavior:
- Looks up sales order lines by
SalesOrderId - Returns
404if no lines exist
Authorization:
- Requires Bearer Token
GET
/api/SalesOrderLine/GetSalesOrderLineById/{id}
Returns a single sales order line by its numeric identifier.
Behavior:
- Looks up sales order line by
Id - Returns
404if not found
Authorization:
- Requires Bearer Token
POST
/api/SalesOrderLine/AddNewSalesOrderLine
Creates a new sales order line.
Request body:
SalesOrderLineModel(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/SalesOrderLine/UpdateSalesOrderLineById/{id}
Updates an existing sales order line.
Request:
- Route parameter:
id(numeric) - Body:
SalesOrderLineModel(with updated fields)
Behavior:
- Updates all fields of the line
- Partial updates are not supported
- Successful update writes an audit log entry
Errors:
- Returns
400if validation - or line does not exist
Authorization:
- Requires Bearer Token
DELETE
/api/SalesOrderLine/DeleteSalesOrderLineById/{id}
Deletes a sales order line 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 line 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