The Shipments API manages outbound warehouse shipments. It covers the full lifecycle from creating a shipment header through updating lines to posting the shipment and decrementing stock. For GrupoMAS tenants the header list is sourced live from MAS released shipments.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/CodexaCP/DG_BACK/llms.txt
Use this file to discover all available pages before exploring further.
GET /api/shipmentheaders
Returns a paginated list of shipment headers for the authenticated company. GrupoMAS tenants receive live released shipments from MAS.OPERATOR role users see only open statuses (RELEASED, SHIPPING, READY_TO_POST, PARTIALLY POSTED).
Authentication: Authorization: Bearer <token> (required).
1-based page. Defaults to
1.Page size. Defaults to
20, max 100.Filter by shipment status.
Filter by shipment number (partial match).
Sort field. Defaults to
CreatedAt.Sort descending. Defaults to
true.Current page.
Page size.
Total shipments matching filter.
Total pages.
POST /api/shipmentheaders
Creates a new shipment header inOPEN status. Lines are required in the request body. Stock availability is validated at creation time for items that do not allow negative inventory.
Authentication: Authorization: Bearer <token> (required).
Linked sales order number.
Linked sales order ID. Takes priority over
salesOrderNo.ERP/external reference number.
Reference number.
Shipment type code (e.g.,
STANDARD).Customer code.
Customer display name.
Source warehouse ID.
Planned shipment date.
Order date.
Whether backorders are allowed.
Whether partial shipments are allowed.
Shipment lines. Each line must include
itemId or itemNo and orderedQty (> 0).New shipment header ID.
Auto-generated shipment number (e.g.,
SHP-000001).| Status | Meaning |
|---|---|
| 400 | Missing lines, item not found/inactive, duplicate line numbers, or insufficient stock. |
GET /api/shipmentheaders/
Returns full detail for a single shipment header including all lines with posted and remaining quantities. Authentication:Authorization: Bearer <token> (required).
Shipment header ID.
Shipment header ID.
Shipment number.
Current status.
Resolved document status label.
Processing status label.
Whether a handheld operator has an active session on this shipment.
Email of the operator currently working this shipment, if any.
Shipment lines with
itemNo, itemDescription, orderedQty, shippedQty, remainingQuantity, postedQuantity, binCode, unitOfMeasure, and lineStatus.| Status | Meaning |
|---|---|
| 404 | Shipment not found. |
PUT /api/shipmentheaders/
Updates a shipment header and replaces its lines. Only allowed for headers inOPEN or RELEASED status. Validates stock availability for modified quantities.
Authentication: Authorization: Bearer <token> (required).
Shipment header to update.
Updated external reference.
Updated reference number.
Updated sales order number.
Updated linked sales order ID.
Updated customer code.
Updated customer name.
Updated planned date.
Updated order date.
Updated status (
OPEN or RELEASED).Updated backorder flag.
Updated partial shipment flag.
Replacement lines array.
| Status | Meaning |
|---|---|
| 400 | Invalid status transition, posted lines cannot be removed, ordered quantity below posted, or insufficient stock. |
| 404 | Shipment not found. |
| 409 | Shipment is locked by a concurrent operation. |
POST /api/shipmentheaders//post
Posts the shipment, finalizing all picked lines, decrementing stock, and sending an outbound acknowledgment to the ERP if configured. Authentication:Authorization: Bearer <token> with role ADMIN, SUPERVISOR, or OPERATOR (required).
Shipment header ID to post.
Success confirmation message.
Auto-generated posted shipment number.
ID of the created outbound acknowledgment.
Initial delivery status of the acknowledgment.
| Status | Meaning |
|---|---|
| 400 | Shipment is not in a postable state, missing bin assignment, or insufficient stock. |
| 403 | Caller lacks required role. |
| 404 | Shipment not found. |
| 409 | Shipment is locked by a concurrent operation. |
GET /api/shipmentheaders/export-config
Exports shipment headers for the tenant as an Excel config package (.xlsx).
Authentication: Authorization: Bearer <token> (required).
Returns application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.
POST /api/shipmentheaders/preview-config
Previews a shipment headers config package import without persisting changes. Authentication:Authorization: Bearer <token> (required).
Multipart form upload. Must be a valid Dragon Guard
SHIPMENT_HEADERS config package .xlsx.Whether the package passes validation.
Number of new shipments that would be created.
Number of existing shipments that would be updated.
Row-level errors.
POST /api/shipmentheaders/apply-config
Imports shipment headers from a Dragon Guard config package Excel file. Authentication:Authorization: Bearer <token> (required).
Multipart form upload. Must be a valid Dragon Guard
SHIPMENT_HEADERS config package .xlsx.Number of new shipments created.
Number of existing shipments updated.
Any errors encountered.