Skip to main content

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.

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.

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).
pageNumber
integer
1-based page. Defaults to 1.
pageSize
integer
Page size. Defaults to 20, max 100.
status
string
Filter by shipment status.
shipmentNo
string
Filter by shipment number (partial match).
sortBy
string
Sort field. Defaults to CreatedAt.
sortDesc
boolean
Sort descending. Defaults to true.
data
array
pageNumber
integer
Current page.
pageSize
integer
Page size.
totalRecords
integer
Total shipments matching filter.
totalPages
integer
Total pages.
curl -X GET "https://api.example.com/api/shipmentheaders?pageNumber=1&pageSize=20&status=RELEASED" \
  -H "Authorization: Bearer <token>"

POST /api/shipmentheaders

Creates a new shipment header in OPEN 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).
salesOrderNo
string
Linked sales order number.
salesOrderId
string (uuid)
Linked sales order ID. Takes priority over salesOrderNo.
externalShipmentNo
string
ERP/external reference number.
referenceNo
string
Reference number.
shipmentType
string
Shipment type code (e.g., STANDARD).
customerCode
string
Customer code.
customerName
string
Customer display name.
warehouseId
string (uuid)
Source warehouse ID.
plannedShipDate
string (ISO 8601)
Planned shipment date.
orderDate
string (ISO 8601)
Order date.
isBackorderAllowed
boolean
Whether backorders are allowed.
isPartialAllowed
boolean
Whether partial shipments are allowed.
lines
array
required
Shipment lines. Each line must include itemId or itemNo and orderedQty (> 0).
shipmentId
string (uuid)
New shipment header ID.
shipmentNo
string
Auto-generated shipment number (e.g., SHP-000001).
Error codes
StatusMeaning
400Missing lines, item not found/inactive, duplicate line numbers, or insufficient stock.
curl -X POST "https://api.example.com/api/shipmentheaders" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "customerCode": "CUST-001",
    "customerName": "Big Retail Co",
    "plannedShipDate": "2024-08-15T00:00:00Z",
    "lines": [
      {"itemNo": "ITM-000001", "orderedQty": 50, "unitOfMeasure": "EA"}
    ]
  }'

GET /api/shipmentheaders/

Returns full detail for a single shipment header including all lines with posted and remaining quantities. Authentication: Authorization: Bearer <token> (required).
id
string (uuid)
required
Shipment header ID.
id
string (uuid)
Shipment header ID.
shipmentNo
string
Shipment number.
shipmentStatus
string
Current status.
documentStatus
string
Resolved document status label.
processingStatus
string
Processing status label.
isHandheldInUse
boolean
Whether a handheld operator has an active session on this shipment.
activeOperatorEmail
string
Email of the operator currently working this shipment, if any.
lines
array
Shipment lines with itemNo, itemDescription, orderedQty, shippedQty, remainingQuantity, postedQuantity, binCode, unitOfMeasure, and lineStatus.
Error codes
StatusMeaning
404Shipment not found.
curl -X GET "https://api.example.com/api/shipmentheaders/5e9a1234-0000-0000-0000-000000000010" \
  -H "Authorization: Bearer <token>"

PUT /api/shipmentheaders/

Updates a shipment header and replaces its lines. Only allowed for headers in OPEN or RELEASED status. Validates stock availability for modified quantities. Authentication: Authorization: Bearer <token> (required).
id
string (uuid)
required
Shipment header to update.
externalShipmentNo
string
Updated external reference.
referenceNo
string
Updated reference number.
salesOrderNo
string
Updated sales order number.
salesOrderId
string (uuid)
Updated linked sales order ID.
customerCode
string
Updated customer code.
customerName
string
Updated customer name.
plannedShipDate
string (ISO 8601)
Updated planned date.
orderDate
string (ISO 8601)
Updated order date.
shipmentStatus
string
Updated status (OPEN or RELEASED).
isBackorderAllowed
boolean
Updated backorder flag.
isPartialAllowed
boolean
Updated partial shipment flag.
lines
array
required
Replacement lines array.
Error codes
StatusMeaning
400Invalid status transition, posted lines cannot be removed, ordered quantity below posted, or insufficient stock.
404Shipment not found.
409Shipment is locked by a concurrent operation.
curl -X PUT "https://api.example.com/api/shipmentheaders/5e9a1234-0000-0000-0000-000000000010" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "plannedShipDate": "2024-08-20T00:00:00Z",
    "lines": [
      {"lineNo": 1, "itemNo": "ITM-000001", "orderedQty": 50, "unitOfMeasure": "EA"}
    ]
  }'

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).
id
string (uuid)
required
Shipment header ID to post.
message
string
Success confirmation message.
postedShipmentNo
string
Auto-generated posted shipment number.
outboundAcknowledgmentId
string (uuid)
ID of the created outbound acknowledgment.
outboundAcknowledgmentStatus
string
Initial delivery status of the acknowledgment.
Error codes
StatusMeaning
400Shipment is not in a postable state, missing bin assignment, or insufficient stock.
403Caller lacks required role.
404Shipment not found.
409Shipment is locked by a concurrent operation.
curl -X POST "https://api.example.com/api/shipmentheaders/5e9a1234-0000-0000-0000-000000000010/post" \
  -H "Authorization: Bearer <token>"

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.
curl -X GET "https://api.example.com/api/shipmentheaders/export-config" \
  -H "Authorization: Bearer <token>" \
  -o shipments_config_package.xlsx

POST /api/shipmentheaders/preview-config

Previews a shipment headers config package import without persisting changes. Authentication: Authorization: Bearer <token> (required).
file
file
required
Multipart form upload. Must be a valid Dragon Guard SHIPMENT_HEADERS config package .xlsx.
isValid
boolean
Whether the package passes validation.
creates
integer
Number of new shipments that would be created.
updates
integer
Number of existing shipments that would be updated.
errors
array
Row-level errors.
curl -X POST "https://api.example.com/api/shipmentheaders/preview-config" \
  -H "Authorization: Bearer <token>" \
  -F "file=@shipments_config_package.xlsx"

POST /api/shipmentheaders/apply-config

Imports shipment headers from a Dragon Guard config package Excel file. Authentication: Authorization: Bearer <token> (required).
file
file
required
Multipart form upload. Must be a valid Dragon Guard SHIPMENT_HEADERS config package .xlsx.
created
integer
Number of new shipments created.
updated
integer
Number of existing shipments updated.
errors
array
Any errors encountered.
curl -X POST "https://api.example.com/api/shipmentheaders/apply-config" \
  -H "Authorization: Bearer <token>" \
  -F "file=@shipments_config_package.xlsx"

Build docs developers (and LLMs) love