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.

Commercial masters are the foundational reference entities that appear on transactional documents across Dragon Guard WMS. Customers are referenced on shipments, vendors on receipts, and sellers on shipments and sales orders. All three entity types are strictly company-scoped — every record belongs to exactly one company, and companyId is required on all create and list operations. Because these records are embedded as snapshots in posted documents, they must never be physically deleted once referenced; administrators should instead mark them as inactive to preserve the integrity of document history.

Endpoints overview

MethodPathDescription
GET/api/customersList all customers for a company
POST/api/customersCreate a new customer
PUT/api/customersUpdate an existing customer
GET/api/vendorsList all vendors for a company
POST/api/vendorsCreate a new vendor
PUT/api/vendorsUpdate an existing vendor
GET/api/sellersList all sellers for a company
POST/api/sellersCreate a new seller
PUT/api/sellersUpdate an existing seller

Customers

Customers represent the companies or individuals to whom goods are shipped. The composite key CompanyId + CustomerNo is unique per company. Additional duplicate controls apply to tax ID and external identity values.

List customers

GET /api/customers?companyId={companyId}
Authorization: Bearer {token}
companyId
number
required
The ID of the active company. Returns customers belonging to this company only.
Example response
[
  {
    "id": 12,
    "customerNo": "CUST-0012",
    "name": "Retail Express S.A.",
    "taxId": "20-12345678-9",
    "email": "[email protected]",
    "isActive": true,
    "companyId": 7
  }
]

Create a customer

POST /api/customers
Authorization: Bearer {token}
Content-Type: application/json
companyId
number
required
The company this customer belongs to.
customerNo
string
required
Unique customer number within the company. Together with companyId, forms the natural key.
name
string
required
Full legal or commercial name of the customer.
taxId
string
Tax identification number. Must be unique within the company — duplicate tax IDs return error code validation.customerDuplicate.
externalId
string
External system identifier (e.g., ERP customer code). Must be unique within the company — duplicates return validation.customerDuplicate.
email
string
Contact email address for the customer.
isActive
boolean
Active status. Defaults to true. Set to false to retire a customer without deleting.
Example request
{
  "companyId": 7,
  "customerNo": "CUST-0013",
  "name": "Supermercados del Norte S.R.L.",
  "taxId": "20-98765432-1",
  "email": "[email protected]",
  "isActive": true
}

Update a customer

PUT /api/customers
Authorization: Bearer {token}
Content-Type: application/json
Include the id field alongside any fields to update. The companyId and customerNo key cannot be changed after creation.
id
number
required
The ID of the customer record to update.

Vendors

Vendors represent the suppliers from whom goods are received. The composite key CompanyId + VendorNo is unique per company.

List vendors

GET /api/vendors?companyId={companyId}
Authorization: Bearer {token}
companyId
number
required
The ID of the active company.
Example response
[
  {
    "id": 5,
    "vendorNo": "VEND-0005",
    "name": "Distribuidora Norte S.A.",
    "taxId": "30-11223344-5",
    "isActive": true,
    "companyId": 7
  }
]

Create a vendor

POST /api/vendors
Authorization: Bearer {token}
Content-Type: application/json
companyId
number
required
The company this vendor belongs to.
vendorNo
string
required
Unique vendor number within the company. Together with companyId, forms the natural key.
name
string
required
Full legal or commercial name of the vendor.
taxId
string
Tax identification number.
email
string
Contact email address for the vendor.
isActive
boolean
Active status. Defaults to true.

Update a vendor

PUT /api/vendors
Authorization: Bearer {token}
Content-Type: application/json
id
number
required
The ID of the vendor record to update.

Sellers

Sellers represent the internal sales representatives or agents associated with shipments and sales orders. The composite key CompanyId + SellerCode is unique per company. Additional duplicate controls apply to email address and external identity values.

List sellers

GET /api/sellers?companyId={companyId}
Authorization: Bearer {token}
companyId
number
required
The ID of the active company.
Example response
[
  {
    "id": 9,
    "sellerCode": "SEL-009",
    "fullName": "Carlos Méndez",
    "email": "[email protected]",
    "isActive": true,
    "companyId": 7
  }
]

Create a seller

POST /api/sellers
Authorization: Bearer {token}
Content-Type: application/json
companyId
number
required
The company this seller belongs to.
sellerCode
string
required
Unique seller code within the company. Together with companyId, forms the natural key.
fullName
string
required
Full name of the seller.
email
string
required
Work email address for the seller. Must be unique within the company — duplicates return error code validation.sellerDuplicate.
externalId
string
External system identifier (e.g., HR system code). Must be unique within the company — duplicates return validation.sellerDuplicate.
isActive
boolean
Active status. Defaults to true.
Example request
{
  "companyId": 7,
  "sellerCode": "SEL-010",
  "fullName": "María López",
  "email": "[email protected]",
  "isActive": true
}

Update a seller

PUT /api/sellers
Authorization: Bearer {token}
Content-Type: application/json
id
number
required
The ID of the seller record to update.

Business rules

Do not delete records referenced in documents. Customers, vendors, and sellers that appear on any receipt, shipment, sales order, or purchase order must not be removed from the database. Instead, set isActive: false to prevent them from appearing in creation forms while preserving all historical references.
When a shipment or sales order is posted, the commercial master data (customer name, tax ID, seller details) is captured as a snapshot on the document. Subsequent updates to the master record will not affect already-posted documents.

Duplicate validation

EntityDuplicate error codeDuplicate controls
Customervalidation.customerDuplicateCompanyId + CustomerNo, taxId, externalId
Vendor(standard 400)CompanyId + VendorNo
Sellervalidation.sellerDuplicateCompanyId + SellerCode, email, externalId

Company scope

All entities are scoped to a single company. Cross-company queries are not supported from the tenant context. The SUPERADMIN_SUPREMO role may inspect any company’s records through the Supreme API.

Error codes

HTTP StatusMeaning
400Validation error — missing fields, duplicate key (validation.customerDuplicate, validation.sellerDuplicate)
401Missing or expired JWT token
500Internal server error

Build docs developers (and LLMs) love