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 Receiving API manages inbound warehouse receipts. It covers creating and retrieving receipt headers with their lines, updating receipts, posting receipts to finalize stock movements, and exporting/importing receipt records via config packages. For GrupoMAS tenants, the header list is sourced live from the ERP.

GET /api/ReceivingHeaders

Returns a paginated list of receiving headers for the authenticated company. For GrupoMAS tenants, the list is fetched live from MAS (released receipts). For local tenants, OPERATOR role users see only RELEASED and RECEIVING status documents. Authentication: Authorization: Bearer <token> (required).
pageNumber
integer
1-based page. Defaults to 1.
pageSize
integer
Page size. Defaults to 20.
Search by receipt number, vendor name, external document number, or status.
status
string
Filter by status (e.g., OPEN, RELEASED, RECEIVING, CLOSED).
data
array
pageNumber
integer
Current page.
pageSize
integer
Page size.
totalRecords
integer
Total records.
totalPages
integer
Total pages.
curl -X GET "https://api.example.com/api/ReceivingHeaders?pageNumber=1&pageSize=20&status=RELEASED" \
  -H "Authorization: Bearer <token>"

POST /api/ReceivingHeaders

Creates a new receiving header document. Lines are required in the request body. Authentication: Authorization: Bearer <token> (required).
purchaseOrderNo
string
Linked purchase order number. Auto-generated if omitted.
externalDocumentNo
string
ERP or external reference number.
vendorCode
string
Vendor code.
vendorName
string
Vendor display name.
locationCode
string
Destination warehouse location code.
referenceNo
string
Reference number.
remarks
string
Free-text remarks.
status
string
Initial status. Defaults to OPEN.
receiptDate
string (ISO 8601)
Expected receipt date. Defaults to now.
lines
array
required
Receipt lines. Each line must include itemId, quantityExpected (> 0), and uOM.
headerId
string (uuid)
New receiving header ID.
receiptNo
string
Auto-generated receipt document number (e.g., RCP-0000001).
Error codes
StatusMeaning
400Missing lines, invalid item, zero/negative expected quantity, or missing UOM.
curl -X POST "https://api.example.com/api/ReceivingHeaders" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "purchaseOrderNo": "PO-2024-0001",
    "vendorCode": "VENDOR-001",
    "vendorName": "Acme Supplies",
    "locationCode": "WH-MAIN",
    "lines": [
      {"itemId": "item-guid", "quantityExpected": 100, "uOM": "EA"}
    ]
  }'

GET /api/ReceivingHeaders/

Returns full detail for a single receiving header including all lines with posted and remaining quantities. Authentication: Authorization: Bearer <token> (required).
id
string (uuid)
required
Receiving header ID.
id
string (uuid)
Header ID.
receiptNo
string
Receipt number.
status
string
Current status.
documentStatus
string
Resolved document status label.
processingStatus
string
Processing status label.
isHandheldInUse
boolean
Whether a handheld operator has active scans on this receipt.
activeOperatorEmail
string
Email of the operator currently working this receipt, if any.
lines
array
Receipt lines with itemCode, itemDescription, quantityExpected, quantityReceived, remainingQuantity, postedQuantityReceived, binCode, locationCode, and uOM.
Error codes
StatusMeaning
404Receiving header not found.
curl -X GET "https://api.example.com/api/ReceivingHeaders/5e9a1234-0000-0000-0000-000000000002" \
  -H "Authorization: Bearer <token>"

PUT /api/ReceivingHeaders/

Updates a receiving header and replaces its lines. Only allowed for headers in OPEN or RELEASED status. Authentication: Authorization: Bearer <token> (required).
id
string (uuid)
required
Receiving header ID to update.
purchaseOrderNo
string
Updated PO number.
vendorCode
string
Updated vendor code.
vendorName
string
Updated vendor name.
locationCode
string
Updated destination location code.
referenceNo
string
Updated reference number.
remarks
string
Updated remarks.
status
string
Updated status (OPEN or RELEASED).
receiptDate
string (ISO 8601)
Updated receipt date.
lines
array
required
Replacement lines array.
Error codes
StatusMeaning
400Invalid status transition, missing lines, or handheld activity prevents re-opening.
404Receiving header not found.
409Header is locked by a concurrent operation.
curl -X PUT "https://api.example.com/api/ReceivingHeaders/5e9a1234-0000-0000-0000-000000000002" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "RELEASED",
    "lines": [
      {"itemId": "item-guid", "quantityExpected": 100, "uOM": "EA"}
    ]
  }'

POST /api/ReceivingHeaders//post

Posts a receiving header, finalizing the receipt and creating inventory movements for all received lines. Updates stock quantities and queues an outbound acknowledgment to the connected ERP if configured. Authentication: Authorization: Bearer <token> with role ADMIN, SUPERVISOR, or OPERATOR (required).
id
string (uuid)
required
Receiving header ID to post.
message
string
Always Recibo registrado correctamente. on success.
postedReceiveNo
string
Auto-generated posted receipt number (e.g., PR-000001).
outboundAcknowledgmentId
string (uuid)
ID of the created outbound acknowledgment record.
outboundAcknowledgmentStatus
string
Initial delivery status of the acknowledgment.
Error codes
StatusMeaning
400Receipt has no lines, is already fully posted, bin is missing, or quantity exceeds expected.
403Caller lacks required role.
404Receiving header not found.
409Header is locked by a concurrent operation.
curl -X POST "https://api.example.com/api/ReceivingHeaders/5e9a1234-0000-0000-0000-000000000002/post" \
  -H "Authorization: Bearer <token>"

GET /api/ReceivingHeaders/export-config

Exports receiving 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/ReceivingHeaders/export-config" \
  -H "Authorization: Bearer <token>" \
  -o receipts_config_package.xlsx

POST /api/ReceivingHeaders/preview-config

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

POST /api/ReceivingHeaders/apply-config

Imports receiving 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 RECEIPTS config package .xlsx.
created
integer
Number of new receipts created.
updated
integer
Number of existing receipts updated.
errors
array
Any errors encountered.
curl -X POST "https://api.example.com/api/ReceivingHeaders/apply-config" \
  -H "Authorization: Bearer <token>" \
  -F "file=@receipts_config_package.xlsx"

Build docs developers (and LLMs) love