Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/CodexaCP/DG_WEB/llms.txt

Use this file to discover all available pages before exploring further.

Config packages provide a structured, three-step mechanism for bulk configuration management in Dragon Guard WMS. Administrators can export the current configuration state of any supported entity into a portable package, modify it offline or review it in tooling, submit it to the preview endpoint to inspect the proposed diff before committing, and finally apply the package to persist changes to the database. This pattern ensures that bulk configuration changes are auditable and reversible before they take effect. All config package endpoints are restricted to admin-level roles.

The export → preview → apply pattern

1

Export current configuration

Call the export-config endpoint (GET or POST) for the target entity. The response contains a portable configuration package representing the current state of that entity’s data. Save or download this package for review and editing.
2

Edit the configuration package

Modify the exported package according to the desired changes — add records, update field mappings, change default values, or remove obsolete entries. The package format is designed to be human-readable and diff-friendly.
3

Preview proposed changes

Submit the modified package to the preview-config endpoint. The backend returns a detailed diff showing what will be created, updated, or removed — without persisting anything. Review the diff carefully before proceeding.
4

Apply the configuration

When the preview looks correct, submit the same package to the apply-config endpoint. The backend validates and persists all changes in a single transaction. A summary of applied changes is returned in the response.
Config package operations are irreversible once applied. Always review the preview-config response carefully before calling apply-config. There is no built-in rollback; restoring a previous configuration requires re-exporting and re-applying the original package.

Endpoints overview

EntityExportPreviewApply
Receipt HeadersGET/POST /api/ReceivingHeaders/export-configGET/POST /api/ReceivingHeaders/preview-configGET/POST /api/ReceivingHeaders/apply-config
Receipt LinesGET/POST /api/receivinglines/export-configGET/POST /api/receivinglines/preview-configGET/POST /api/receivinglines/apply-config
Shipment HeadersGET/POST /api/shipmentheaders/export-configGET/POST /api/shipmentheaders/preview-configGET/POST /api/shipmentheaders/apply-config
Shipment LinesGET/POST /api/shipmentlines/export-configGET/POST /api/shipmentlines/preview-configGET/POST /api/shipmentlines/apply-config
Each endpoint supports both GET (to retrieve the current config or schema) and POST (to submit a package for preview or application). Use GET for initial discovery and POST to submit a modified package.

Receipt Headers config package

Export

GET /api/ReceivingHeaders/export-config
POST /api/ReceivingHeaders/export-config
Authorization: Bearer {token}
Content-Type: application/json
Returns the current configuration package for all ReceivingHeaders records. Use GET to export without filters, or POST to scope the export to a subset of records. Example POST request body
{
  "companyId": 7,
  "includeInactive": false
}
Example response
{
  "packageType": "ReceivingHeaders",
  "exportedAt": "2024-07-12T16:00:00Z",
  "companyId": 7,
  "records": [
    {
      "id": 101,
      "documentNo": "RCV-2024-0041",
      "vendorId": 5,
      "status": "Open"
    }
  ]
}

Preview

POST /api/ReceivingHeaders/preview-config
Authorization: Bearer {token}
Content-Type: application/json
Submit a modified package to receive a diff preview without persisting changes. Example response
{
  "packageType": "ReceivingHeaders",
  "toCreate": [],
  "toUpdate": [
    { "id": 101, "field": "status", "from": "Open", "to": "Cancelled" }
  ],
  "toDelete": [],
  "warnings": []
}

Apply

POST /api/ReceivingHeaders/apply-config
Authorization: Bearer {token}
Content-Type: application/json
Persists the configuration package in a single transaction. Example response
{
  "packageType": "ReceivingHeaders",
  "applied": true,
  "created": 0,
  "updated": 1,
  "deleted": 0,
  "appliedAt": "2024-07-12T16:05:00Z"
}

Receipt Lines config package

Export

GET /api/receivinglines/export-config
POST /api/receivinglines/export-config
Authorization: Bearer {token}
Returns the configuration package for ReceivingLines. Scoped to a specific header with a POST body or returned in full with GET.

Preview

POST /api/receivinglines/preview-config
Authorization: Bearer {token}
Content-Type: application/json
Returns a line-level diff for the proposed package without persisting.

Apply

POST /api/receivinglines/apply-config
Authorization: Bearer {token}
Content-Type: application/json
Applies the receiving lines configuration package.
Do not apply a receivinglines config package while a receiving document is in active use by a handheld device. Line-level changes applied mid-transaction may cause data inconsistencies in the physical receiving flow.

Shipment Headers config package

Export

GET /api/shipmentheaders/export-config
POST /api/shipmentheaders/export-config
Authorization: Bearer {token}
Returns the current configuration package for all shipmentheaders records.

Preview

POST /api/shipmentheaders/preview-config
Authorization: Bearer {token}
Content-Type: application/json
Returns a diff of the proposed shipment header configuration changes.

Apply

POST /api/shipmentheaders/apply-config
Authorization: Bearer {token}
Content-Type: application/json
Applies the shipment headers configuration package.

Shipment Lines config package

Export

GET /api/shipmentlines/export-config
POST /api/shipmentlines/export-config
Authorization: Bearer {token}
Returns the current configuration package for shipment line records.

Preview

POST /api/shipmentlines/preview-config
Authorization: Bearer {token}
Content-Type: application/json
Returns a line-level diff for the proposed shipment lines package.

Apply

POST /api/shipmentlines/apply-config
Authorization: Bearer {token}
Content-Type: application/json
Applies the shipment lines configuration package.
Do not apply a shipmentlines config package while an active pick is in progress on a handheld device. Line changes applied during an active pick may cause the handheld to reference stale line IDs.

Common request and response fields

All config package endpoints share the same structural conventions for their request bodies and responses.

Package request body (POST)

companyId
number
Scopes the export, preview, or apply operation to a single company. Omit for cross-company admin operations (SUPERADMIN_SUPREMO only).
records
array
For preview and apply: the array of configuration records to process. Each record corresponds to one document or line entity.
includeInactive
boolean
For export: whether to include inactive records in the exported package. Defaults to false.

Package response fields

packageType
string
Identifies the entity type this package belongs to (e.g., ReceivingHeaders, shipmentlines).
exportedAt_appliedAt
string
ISO 8601 timestamp of when the export or apply operation was performed.
toCreate
array
(Preview only) Records that will be inserted when the package is applied.
toUpdate
array
(Preview only) Records and field-level changes that will be updated when the package is applied.
toDelete
array
(Preview only) Records that will be removed when the package is applied.
warnings
array
Non-blocking advisory messages returned during preview or apply.
created / updated / deleted
number
(Apply only) Count of records affected by each operation type.

Access control

All config package endpoints are restricted to admin-level roles. Tenant users without admin privileges will receive 401 Unauthorized. For Shipments config packages, see also Shipments API.

Error codes

HTTP StatusMeaning
400Validation error — malformed package, missing companyId, incompatible record schema
401Missing, expired, or insufficiently privileged JWT token
500Internal server error during package processing

Build docs developers (and LLMs) love