GrupoMAS Native connects Dragon Guard to Grupo Mas ERP using a bidirectional, contract-first HTTP adapter. In this model, Grupo Mas ERP retains authority over the item catalog, commercial documents, accounting stock, and costs. Dragon Guard acts as the physical warehouse execution layer: it queries released work, executes operations on handheld devices, maintains a local operational audit trail, and posts results back to Grupo Mas ERP through a durable outbound queue. The full document state machine isDocumentation 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.
RELEASED → IN_PROGRESS → PARTIAL → POSTED → ERP_PENDING → ERP_APPLIED / ERP_FAILED.
Prerequisites
Before using the execution layer endpoints, confirm the following:- The tenant’s
IntegrationModeresolves toGrupoMASNative. CallGET /api/v1/integration/capabilitiesand verifyproviderName = "GrupoMASNative"andmode = "ERP_EXECUTION". - A SUPERADMIN_SUPREMO user has configured
grupoMasNativeSettingsfor the company in Supreme (see Configuration below). isConfiguredistruein the settings response — this requires a non-emptybaseUrl, a validCompany.Code, and at least one credential (apiKeyorbearerToken).
Catalog sync endpoints (
/api/v1/integration/items, /stock/opening, etc.) are disabled for GrupoMASNative tenants. Calling them returns 409 Conflict. Item master and stock are owned by Grupo Mas ERP, not Dragon Guard.Configuration
GrupoMASNative adapter settings are managed per tenant in the Supreme administration panel.PATCH /api/supreme/companies/{id}/integration/grupomas-native-settings
Tenant settings fields
Tenant settings fields
Absolute base URL of the Grupo Mas ERP API (e.g.
https://erp.grupomas.com). Must be a valid absolute URL.API key credential for outbound requests. Sent as
X-Api-Key header to Grupo Mas. Pass null to leave the existing secret unchanged; set clearApiKey: true to remove it explicitly.Bearer token credential for outbound requests. Sent as
Authorization: Bearer .... Pass null to leave unchanged; set clearBearerToken: true to remove.HTTP timeout in seconds for outbound adapter requests. Valid range:
5 – 120.Base path prefix for released-work lookups. Defaults to
/api/wms.Base path prefix for posting-result delivery. Defaults to
/api/wms.Whether the background polling scheduler runs for this tenant.
How frequently (in seconds) the scheduler polls for released work. Valid range:
30 – 3600.Default location code filter applied to scheduled polling runs.
Default external document number filter applied to scheduled polling runs.
hasApiKey, hasBearerToken, maskedApiKey, maskedBearerToken, authMode, isConfigured, and polling fields.
Test connection
POST /api/supreme/companies/{id}/integration/grupomas-native/test-connection
Verifies the baseUrl and credentials are reachable without executing any released-work or posting-result flows. Returns 501 Not Implemented when settings are incomplete, or 200 OK with HTTP status details when the remote server responds.
Released Work Lookup
Dragon Guard queries Grupo Mas ERP for documents that have been released for physical warehouse execution.Apply optional query filters
Filter by
externalDocumentNo, locationCode, date range (releasedFromUtc / releasedToUtc), and pagination (pageNumber, pageSize, default page size 100).Endpoints
All execution-layer endpoints are available under bothapi/v1/integration/grupomas-native/ (canonical) and the legacy alias api/integration/grupomas-native/.
| Method | Path | Operation type |
|---|---|---|
GET | /api/v1/integration/grupomas-native/released-receipts | RECEIPT |
GET | /api/v1/integration/grupomas-native/released-shipments | SHIPMENT |
GET | /api/v1/integration/grupomas-native/released-counts | INVENTORY_COUNT |
GET | /api/v1/integration/grupomas-native/released-transfers | TRANSFER |
Filter to a specific ERP document number.
Filter by warehouse location code.
Start of the release date range (ISO 8601 UTC).
End of the release date range (ISO 8601 UTC).
Page number, 1-based. Defaults to
1.Items per page. Defaults to
100.Unique event identifier issued by Grupo Mas for this released document.
Idempotency key used in the corresponding posting-result submission.
Grupo Mas document number (e.g. purchase order number, shipment order number).
One of
RECEIPT, SHIPMENT, INVENTORY_COUNT, TRANSFER.RELEASED for documents ready for handheld execution.Warehouse location where execution should occur.
ERP line number.
Item code.
Quantity expected for this line.
Unit of measure.
Bin code for single-bin operations (receipts, counts).
Source bin code for transfer/movement operations.
Destination bin code for transfer/movement operations.
501 Not Implemented— tenant adapter settings are incomplete or missing.502 Bad Gateway— Grupo Mas ERP rejected the request, timed out, or returned an invalid payload.
Item and Bin Stock Lookup
These endpoints allow handhelds to query live item data and stock balances directly from Grupo Mas ERP.Item Grid Lookup
GET /api/v1/integration/grupomas-native/items/lookup
Returns a paged, flat product grid with one row per ItemNo + Location + Bin combination. Designed for the handheld item browsing screen.
Full-text search across item code, description, barcode, and alternate code.
Exact item code filter.
Filter by warehouse location.
Filter by bin code.
When
true, only returns items with available stock greater than zero.Filter by item group code.
Filter by item type classification.
Filter by unit of measure.
Filter by supplier code.
Page number, 1-based. Defaults to
1.Results per page. Defaults to
20, maximum 100.When no filter is applied,
totalQuantity in the response is intentionally returned as 0 to avoid forcing a tenant-wide aggregate on every open. Apply at least one filter to receive meaningful totals.Per-Item Bin Stock
GET /api/v1/integration/grupomas-native/items/{itemNo}/stock
Returns a GrupoMasItemStockDetailDto with item metadata and a flat lines[] array of bin-level stock entries for the specified item.
Item code to query.
Optional location filter.
Optional bin filter.
Optional — return only bins with stock.
Flat Bin Stock
GET /api/v1/integration/grupomas-native/bin-stock
Returns flat stock lines for a required itemNo and optional filters.
Item code. Required — returns
400 Bad Request if missing.Locations
GET /api/v1/integration/grupomas-native/locations
Returns the list of warehouses/locations configured in Grupo Mas for this tenant. The first available option is flagged as isDefaultSelection when the ERP response does not explicitly specify a default.
Posting Results
After physical execution is complete on the handheld, Dragon Guard posts the result back to Grupo Mas ERP. Delivery is decoupled — the handheld request is accepted locally withERP_PENDING status, and the actual ERP call is made asynchronously by the outbound dispatcher.
Endpoints
| Method | Path | Operation type |
|---|---|---|
POST | /api/v1/integration/grupomas-native/receipt-results | RECEIPT |
POST | /api/v1/integration/grupomas-native/shipment-results | SHIPMENT |
POST | /api/v1/integration/grupomas-native/count-results | INVENTORY_COUNT |
POST | /api/v1/integration/grupomas-native/transfer-results | TRANSFER |
Request Body (GrupoMasPostingResultDocumentDto)
All four endpoints share the same base contract. Document-level fieldsUnique event identifier for this execution event. Combined with
idempotencyKey to enforce deduplication.Idempotency key. The composite key
(CompanyId, ProviderName, OperationType, ExternalDocumentNo, EventId, IdempotencyKey) is checked before processing — duplicate submissions return the existing result without re-executing.Trace identifier from the handheld session. Persisted in
OperationalExecutionLogs and forwarded to Grupo Mas.Grupo Mas document number being posted.
Must match the endpoint:
RECEIPT, SHIPMENT, INVENTORY_COUNT, or TRANSFER.Must be
POSTED. Partial execution is represented at the line level via expectedQuantity vs actualQuantity, not via a document-level PARTIAL status.Warehouse location where the execution occurred.
Operator identifier.
Operator email. Persisted in the execution log.
Handheld device identifier.
ISO 8601 UTC timestamp when execution began on the handheld.
ISO 8601 UTC timestamp when the handheld completed the operation. Must not be earlier than
startedAtUtc.At least one line is required.
ERP line number.
Item code.
Quantity that was expected per the released document. Must be ≥ 0.
Quantity physically handled by the operator. Must be ≥ 0.
Unit of measure.
Required when
actualQuantity ≠ expectedQuantity. Must be one of the day-zero catalog values:SHORT_PICK— fewer units available or picked than expectedOVERAGE— more units received than expectedDAMAGED_UNIT— units are present but damagedITEM_NOT_FOUND— item could not be located in the warehouseBIN_CHANGE— execution moved to a different bin
Operational bin for single-bin operations.
Source bin for transfer/movement operations.
Destination bin for transfer/movement operations.
ERP_PENDING — Dragon Guard accepted the result and queued the outbound delivery to Grupo Mas ERP.ID of the durable outbound acknowledgment record. Use this to track delivery status via the Outbound Acknowledgments endpoints.
PENDING on first acceptance — the OutboundAcknowledgment entity status. See the Outbound Acknowledgments page for the full status lifecycle (PENDING → SENT / FAILED / DEAD_LETTER).OUTBOUND_QUEUED on first acceptance — the OperationalExecutionLog.RetryStatus field that tracks the durable retry state of this execution record.(CompanyId, ProviderName, OperationType, ExternalDocumentNo, EventId, IdempotencyKey) combination is received again, Dragon Guard returns the previously recorded execution result with "duplicate": true — no second provider call is made and no second execution log is created.
Background Polling
Dragon Guard includes a hosted background service that automatically fetches released work from Grupo Mas ERP for enabled tenants.- The service checks every 30 seconds for GrupoMASNative tenants with polling due.
- Each tenant uses its own
pollingIntervalSeconds(valid range:30–3600). - On each poll, Dragon Guard fetches released receipts, shipments, counts, and transfers, applying the tenant’s
pollingLocationCodeandpollingExternalDocumentNofilters when configured. - Results are persisted into
core.GrupoMasReleasedWorkSnapshots. Documents that no longer appear in a poll are markedIsActive = false. - Scheduler state is tracked in
core.GrupoMasPollingStates.
POST /api/supreme/companies/{id}/integration/grupomas-native/polling/refresh
Triggers an immediate released-work refresh for the specified tenant outside the regular schedule. Accepts optional locationCode and externalDocumentNo filters and returns document counts by operation type plus a correlationId.
Outbound Request Headers
Dragon Guard sends the following headers on every outbound request to Grupo Mas ERP:| Header | Value |
|---|---|
X-Correlation-Id | Correlation ID from the inbound request |
X-Contract-Version | 1 |
X-Company-Code | Company.Code (= codigo_empresa in MAS) |
Authorization | Bearer <bearerToken> when bearer token is configured |
X-Api-Key | <apiKey> when API key is configured |
companyCode query parameter is also appended to every outbound URL — Grupo Mas uses this to identify the tenant.
Technical Retry Policy
The HTTP adapter uses a technical retry policy for transient connectivity failures:| Attempt | Wait |
|---|---|
| 1st retry | 1 second |
| 2nd retry | 2 seconds |
| 3rd retry | 4 seconds |
408, 429, 502, 503, 504, network timeout, or transport error.
Non-retryable errors (functional rejections, contract validation failures) are not retried at the transport layer but may be re-queued by the durable outbound dispatcher.