Catalog synchronization lets an ERP or back-office integrator push item master data and opening stock balances into Dragon Guard over a REST API without requiring a database-level connection. Dragon Guard upserts each item record (creating it if it does not exist, updating it if it does) and applies opening stock as a single idempotent posting. All catalog sync endpoints require anDocumentation 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.
X-Api-Key header for tenant resolution — JWT is not used on these routes.
Catalog sync endpoints are available under both
api/v1/integration/ (canonical) and api/integration/ (legacy alias). Both prefixes are fully supported and identical in behavior.Item Upsert
Validate a Single Item (Dry Run)
POST /api/v1/integration/items/validate
Validates the item payload without persisting any data. Use this endpoint in a pre-flight check to confirm the payload is acceptable before calling the live upsert.
Request body — IntegrationItemValidateDto
ERP item code. Used as the upsert key. Must be non-empty and unique per tenant.
Human-readable item name.
Primary unit of measure (e.g.
EA, BOX, KG).Base unit of measure used for stock calculations.
Unit of measure used in sales documents.
Unit of measure used in purchase documents.
Item classification (e.g.
PRODUCT, SERVICE).Primary barcode for the item.
Alternate barcode (secondary scan code).
Whether the item requires lot tracking.
Whether the item requires serial number tracking.
Whether the item tracks expiration dates.
Weight per unit.
Volume per unit.
Physical length dimension.
Physical width dimension.
Physical height dimension.
Item category code.
Brand name.
Manufacturer part number.
Alternate item code (also referred to as
alternateItemNo in bulk payloads).Whether the item is active. Defaults to
true.Whether negative available stock is permitted for this item.
Blocked. Passing a non-zero value here is rejected. Use the dedicated
/stock/opening endpoint to seed initial stock.Default location code for the item.
Default bin code for the item.
Upsert a Single Item
POST /api/v1/integration/items
Creates or updates a single item. The request body is the same IntegrationItemValidateDto schema described above.
Example request
CREATED when the item did not exist before this call; UPDATED when it was already present.Bulk Item Upsert
Validate a Bulk Payload (Dry Run)
POST /api/v1/integration/items/bulk/validate
Validates an entire batch payload without persisting data. Returns per-line results with an Action of CREATED or UPDATED based on whether each itemNo already exists in Dragon Guard.
Upsert a Batch of Items
POST /api/v1/integration/items/bulk
Upserts up to 1 000 items in a single request.
Request body — IntegrationBulkItemUpsertDto
Caller-assigned batch reference identifier. Used for traceability and idempotency auditing on your side.
Optional free-text notes for the batch operation.
Array of item payloads. Each element uses the same
IntegrationItemValidateDto schema as single-item upsert. Maximum 1 000 elements per request.- Maximum 1 000 items per batch request. Larger payloads are rejected.
- Duplicate
itemNovalues within the same batch payload are rejected with a validation error. initialQuantityis blocked at the catalog sync layer — pass it as0or omit it. Use/stock/openingto seed stock separately.
Count of items in the submitted payload.
Items that did not previously exist and were inserted.
Items that already existed and were updated.
Items that failed validation. Errors are listed in the top-level
errors array with field paths like items[2].itemNo.Opening Stock
Validate Opening Stock (Dry Run)
POST /api/v1/integration/stock/opening/validate
Validates the opening stock payload without applying any stock movements.
Apply Opening Stock
POST /api/v1/integration/stock/opening
Posts the initial stock balance for a tenant. Opening stock is applied as an idempotent operation — sending the same referenceNo with the same payload a second time returns the existing result without creating duplicate movements.
Request body — IntegrationStockOpeningValidateDto
Caller-assigned reference number for this opening stock posting. Used for idempotency.
ISO 8601 date for the opening stock entries.
Optional notes for this posting.
Stock lines to apply.
Item code. Must already exist in Dragon Guard’s item master.
Warehouse location code.
Bin code within the location.
Opening stock quantity.
Unit of measure. Falls back to the item’s base UOM if omitted.
Optional movement type classification for the stock entry.
true when the same referenceNo was already applied previously and this call returned the cached result without re-processing.On-Demand Catalog Sync Trigger
For tenants using the GrupoMAS Native connector, Dragon Guard can pull a one-shot item catalog refresh directly from Grupo Mas ERP rather than waiting for a scheduled poll. This endpoint is served on a separate route from the push-based integration endpoints above and uses standard JWT authentication (notX-Api-Key).
POST /api/items/catalog-sync
Triggers an immediate catalog sync for the authenticated user’s company. Safe to call as a fire-and-forget from a mobile client at login time. Returns 400 Bad Request when the company is not configured for GrupoMAS Native catalog sync.
Endpoint Summary
| Method | Path | Description |
|---|---|---|
POST | /api/v1/integration/items/validate | Dry-run validate single item |
POST | /api/v1/integration/items | Upsert single item |
POST | /api/v1/integration/items/bulk/validate | Dry-run validate bulk items |
POST | /api/v1/integration/items/bulk | Upsert batch of items (max 1 000) |
POST | /api/v1/integration/stock/opening/validate | Dry-run validate opening stock |
POST | /api/v1/integration/stock/opening | Apply opening stock |
POST | /api/items/catalog-sync | Trigger one-shot GrupoMAS catalog pull (JWT auth) |