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 Integration API (/api/integration or /api/v1/integration) is the machine-to-machine interface for external ERP systems to push data into Dragon Guard. All endpoints authenticate via the X-Api-Key header (not Bearer JWT). The API key is provisioned per tenant by a Supreme admin and can be rotated at any time. Capabilities vary by tenant integrationMode.
All Integration API endpoints accept both /api/integration/... and /api/v1/integration/... path prefixes — both are equivalent. The X-Api-Key header is required; Bearer JWT is not accepted on these routes.

GET /api/v1/integration/capabilities

Returns the capabilities of the API key’s tenant. Use this endpoint to discover which integration operations are enabled before calling them. Authentication: X-Api-Key: <api-key> (required).
companyCode
string
Tenant company code.
integrationMode
string
Configured integration mode (e.g., Standard, GrupoMasNative, BusinessCentralNative).
providerName
string
Resolved provider name.
apiAccessEnabled
boolean
Whether API access is active for this tenant.
capabilities
object
Map of capability flags indicating which operations are supported.
curl -X GET "https://api.example.com/api/v1/integration/capabilities" \
  -H "X-Api-Key: your-api-key-here"

GET /api/v1/integration/company

Returns extended company/tenant information for the calling API key. Authentication: X-Api-Key: <api-key> (required).
companyId
string (uuid)
Tenant company ID.
companyCode
string
Company code.
companyName
string
Company display name.
integrationMode
string
Integration mode.
providerName
string
Resolved provider name.
apiAccessEnabled
boolean
API access flag.
externalSystemCode
string
External ERP system code.
deviceLimit
integer
Maximum registered handheld devices.
capabilities
object
Same capability flags as /capabilities.
curl -X GET "https://api.example.com/api/v1/integration/company" \
  -H "X-Api-Key: your-api-key-here"

POST /api/v1/integration/items/validate

Dry-runs a single item upsert payload against Dragon Guard validation rules without persisting anything. Returns 409 Conflict for ERP-owned tenants where item sync is not supported. Authentication: X-Api-Key: <api-key> (required).
itemNo
string
required
Item number / SKU.
description
string
Item description.
uom
string
required
Primary unit of measure.
baseUOM
string
Base unit of measure.
itemType
string
Item type (e.g., Inventory, Service).
isActive
boolean
Active flag. Defaults to true.
barcode
string
Primary barcode.
categoryCode
string
Category or group code.
brand
string
Brand name.
isLotTracked
boolean
Enable lot tracking.
isSerialTracked
boolean
Enable serial tracking.
isExpirationTracked
boolean
Enable expiration tracking.
success
boolean
Whether the payload is valid.
companyCode
string
Tenant company code.
correlationId
string
Request correlation ID.
errors
array
List of field-level validation errors if any.
curl -X POST "https://api.example.com/api/v1/integration/items/validate" \
  -H "X-Api-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{"itemNo": "SKU-001", "description": "Test Widget", "uom": "EA"}'

POST /api/v1/integration/items

Upserts a single item. Creates the item if itemNo does not exist, or updates it if it does. Returns the created or updated item entity. Authentication: X-Api-Key: <api-key> (required). Accepts the same body as POST /api/v1/integration/items/validate.
success
boolean
Whether the upsert succeeded.
companyCode
string
Tenant company code.
message
string
Human-readable result message.
correlationId
string
Request correlation ID for tracing.
item
object
Upserted item entity.
errors
array
Validation errors if success is false.
curl -X POST "https://api.example.com/api/v1/integration/items" \
  -H "X-Api-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{"itemNo": "SKU-001", "description": "Blue Widget", "uom": "EA", "isActive": true}'

POST /api/v1/integration/items/bulk/validate

Dry-runs a bulk item upsert batch without persisting. Returns per-item validation results and error details. Returns 409 Conflict for ERP-owned tenants. Authentication: X-Api-Key: <api-key> (required).
batchReferenceNo
string
Caller-assigned reference number for the batch.
remarks
string
Optional free-text notes for the batch.
items
array
required
Array of item objects (same schema as single-item validate).
success
boolean
Whether the entire batch passes validation.
batch
object
Batch summary: batchReferenceNo, totalItems, createdCount, updatedCount, errorCount.
items
array
Per-item results with index, itemNo, action (CREATED/UPDATED), and success.
errors
array
Field-level error list referencing items by index (e.g., items[2].itemNo).
curl -X POST "https://api.example.com/api/v1/integration/items/bulk/validate" \
  -H "X-Api-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "batchReferenceNo": "BATCH-2024-001",
    "items": [
      {"itemNo": "SKU-001", "description": "Widget A", "uom": "EA"},
      {"itemNo": "SKU-002", "description": "Widget B", "uom": "BOX"}
    ]
  }'

POST /api/v1/integration/items/bulk

Upserts a batch of items in a single request. Items are created or updated based on matching itemNo. Returns a batch summary and per-item action results. Authentication: X-Api-Key: <api-key> (required). Accepts the same body as POST /api/v1/integration/items/bulk/validate.
success
boolean
Whether the batch completed without errors.
companyCode
string
Tenant company code.
correlationId
string
Request correlation ID.
batch
object
Batch summary with counts.
items
array
Per-item results (index, itemNo, action, success).
errors
array
Any errors encountered during processing.
curl -X POST "https://api.example.com/api/v1/integration/items/bulk" \
  -H "X-Api-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "batchReferenceNo": "BATCH-2024-001",
    "remarks": "Initial catalog load",
    "items": [
      {"itemNo": "SKU-001", "description": "Widget A", "uom": "EA"},
      {"itemNo": "SKU-002", "description": "Widget B", "uom": "BOX"}
    ]
  }'

POST /api/v1/integration/stock/opening/validate

Dry-runs an opening stock payload without applying any changes. Returns 409 Conflict for ERP-owned tenants where opening stock sync is not supported. Authentication: X-Api-Key: <api-key> (required).
referenceNo
string
required
Caller-assigned reference for this opening stock batch. Used for idempotency.
postingDate
string (ISO 8601)
Posting date for the opening stock movements.
lines
array
required
Array of opening stock lines, each with itemNo, binCode, locationCode, quantity, and uom.
success
boolean
Whether the payload is valid.
errors
array
Field-level errors if any.
curl -X POST "https://api.example.com/api/v1/integration/stock/opening/validate" \
  -H "X-Api-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "referenceNo": "OPENING-2024-001",
    "postingDate": "2024-01-01T00:00:00Z",
    "lines": [
      {"itemNo": "SKU-001", "locationCode": "WH-MAIN", "binCode": "A-01-001", "quantity": 500, "uom": "EA"}
    ]
  }'

POST /api/v1/integration/stock/opening

Applies an opening stock batch, creating inventory movements and updating CurrentStock. Idempotent when the same referenceNo is used. Authentication: X-Api-Key: <api-key> (required). Accepts the same body as POST /api/v1/integration/stock/opening/validate.
success
boolean
Whether the opening stock was applied.
companyCode
string
Tenant company code.
correlationId
string
Request correlation ID.
document
object
Created or existing document record.
errors
array
Errors if success is false.
curl -X POST "https://api.example.com/api/v1/integration/stock/opening" \
  -H "X-Api-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "referenceNo": "OPENING-2024-001",
    "postingDate": "2024-01-01T00:00:00Z",
    "lines": [
      {"itemNo": "SKU-001", "locationCode": "WH-MAIN", "binCode": "A-01-001", "quantity": 500, "uom": "EA"}
    ]
  }'

POST /api/v1/integration/receipts/validate

Dry-runs a receipt creation payload without persisting. Returns 409 Conflict for ERP-owned tenants where receipt import is not supported. Authentication: X-Api-Key: <api-key> (required).
externalDocumentNo
string
ERP document number.
vendorCode
string
Vendor code.
vendorName
string
Vendor name.
locationCode
string
Destination warehouse location code.
receiptDate
string (ISO 8601)
Expected receipt date.
lines
array
required
Receipt lines with itemNo, quantityExpected, and uom.
success
boolean
Whether the payload is valid.
errors
array
Field-level errors if any.
curl -X POST "https://api.example.com/api/v1/integration/receipts/validate" \
  -H "X-Api-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "externalDocumentNo": "ERP-RC-2024-001",
    "vendorCode": "V001",
    "locationCode": "WH-MAIN",
    "lines": [{"itemNo": "SKU-001", "quantityExpected": 100, "uom": "EA"}]
  }'

POST /api/v1/integration/receipts

Creates a new receiving header document via the integration API. Returns the created document reference. Authentication: X-Api-Key: <api-key> (required). Accepts the same body as POST /api/v1/integration/receipts/validate.
success
boolean
Whether the receipt was created.
companyCode
string
Tenant company code.
correlationId
string
Request correlation ID.
document
object
Created document reference with id, internalDocumentNo, externalDocumentNo, and status.
errors
array
Errors if success is false.
curl -X POST "https://api.example.com/api/v1/integration/receipts" \
  -H "X-Api-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "externalDocumentNo": "ERP-RC-2024-001",
    "vendorCode": "V001",
    "locationCode": "WH-MAIN",
    "lines": [{"itemNo": "SKU-001", "quantityExpected": 100, "uom": "EA"}]
  }'

GET /api/v1/integration/receipts/

Returns the current status of a receipt document in Dragon Guard identified by its external document number. Authentication: X-Api-Key: <api-key> (required).
externalDocumentNo
string
required
ERP document number used when the receipt was created.
companyCode
string
Tenant company code.
externalDocumentNo
string
External document number.
receiptNo
string
Internal WMS receipt number.
status
string
Current receipt status.
documentStatus
string
Resolved document status label.
processingStatus
string
Processing status label.
postedDocumentNos
array
List of posted receipt document numbers derived from this receipt.
Error codes
StatusMeaning
404Receipt not found for the given external document number.
curl -X GET "https://api.example.com/api/v1/integration/receipts/ERP-RC-2024-001" \
  -H "X-Api-Key: your-api-key-here"

GET /api/v1/integration/receipts//movements

Returns the inventory movements created when a receipt was posted, identified by its external document number. Authentication: X-Api-Key: <api-key> (required).
externalDocumentNo
string
required
ERP document number.
companyCode
string
Tenant company code.
externalDocumentNo
string
External document number.
internalDocumentNo
string
Internal WMS receipt number.
status
string
Current receipt status.
movements
array
Inventory movements created by posting this receipt.
Error codes
StatusMeaning
404Receipt not found for the given external document number.
curl -X GET "https://api.example.com/api/v1/integration/receipts/ERP-RC-2024-001/movements" \
  -H "X-Api-Key: your-api-key-here"

POST /api/v1/integration/shipments/validate

Dry-runs a shipment creation payload without persisting. Returns 409 Conflict for ERP-owned tenants. Authentication: X-Api-Key: <api-key> (required).
externalDocumentNo
string
ERP document number.
customerCode
string
Customer code.
customerName
string
Customer name.
locationCode
string
Source warehouse location code.
plannedShipDate
string (ISO 8601)
Planned shipment date.
lines
array
required
Shipment lines with itemNo, orderedQty, and uom.
success
boolean
Whether the payload is valid.
errors
array
Field-level errors if any.
curl -X POST "https://api.example.com/api/v1/integration/shipments/validate" \
  -H "X-Api-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "externalDocumentNo": "ERP-SHP-2024-001",
    "customerCode": "C001",
    "locationCode": "WH-MAIN",
    "lines": [{"itemNo": "SKU-001", "orderedQty": 50, "uom": "EA"}]
  }'

POST /api/v1/integration/shipments

Creates a new shipment header document via the integration API. Authentication: X-Api-Key: <api-key> (required). Accepts the same body as POST /api/v1/integration/shipments/validate.
success
boolean
Whether the shipment was created.
companyCode
string
Tenant company code.
correlationId
string
Request correlation ID.
document
object
Created document reference with id, internalDocumentNo, externalDocumentNo, and status.
errors
array
Errors if success is false.
curl -X POST "https://api.example.com/api/v1/integration/shipments" \
  -H "X-Api-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "externalDocumentNo": "ERP-SHP-2024-001",
    "customerCode": "C001",
    "locationCode": "WH-MAIN",
    "lines": [{"itemNo": "SKU-001", "orderedQty": 50, "uom": "EA"}]
  }'

GET /api/v1/integration/shipments/

Returns the current status of a shipment document in Dragon Guard identified by its external document number. Authentication: X-Api-Key: <api-key> (required).
externalDocumentNo
string
required
ERP document number used when the shipment was created.
companyCode
string
Tenant company code.
externalDocumentNo
string
External document number.
shipmentNo
string
Internal WMS shipment number.
status
string
Current shipment status.
documentStatus
string
Resolved document status label.
processingStatus
string
Processing status label.
postedDocumentNos
array
List of posted shipment document numbers.
Error codes
StatusMeaning
404Shipment not found for the given external document number.
curl -X GET "https://api.example.com/api/v1/integration/shipments/ERP-SHP-2024-001" \
  -H "X-Api-Key: your-api-key-here"

GET /api/v1/integration/shipments//movements

Returns the inventory movements created when a shipment was posted, identified by its external document number. Authentication: X-Api-Key: <api-key> (required).
externalDocumentNo
string
required
ERP document number.
companyCode
string
Tenant company code.
externalDocumentNo
string
External document number.
internalDocumentNo
string
Internal WMS shipment number.
status
string
Current shipment status.
movements
array
Inventory movements created by posting this shipment.
Error codes
StatusMeaning
404Shipment not found for the given external document number.
curl -X GET "https://api.example.com/api/v1/integration/shipments/ERP-SHP-2024-001/movements" \
  -H "X-Api-Key: your-api-key-here"

Build docs developers (and LLMs) love