Snapshot Tester
API Reference
DKSH v1.5-compatible snapshot routes plus a Mock API availability control.
Invoice snapshot
Receive the complete current 15-calendar-day Invoice set as { token, details }.
Goods Return snapshot
Receive the complete current 15-calendar-day Goods Return set as { token, details }.
Mock availability
Read, pause or resume the Mock API. Paused Plugin routes return HTTP 503.
Delete test record
Delete one received Invoice or Good Return line after admin credential validation.
Synchronization Log
Every line below comes from the independent Mock Worker D1. Each accepted request replaces the previous complete snapshot for that DLP token and endpoint.
Deletion rule: A document omitted from the next submitted 15-day snapshot is treated as deleted.
Received invoices
Received credit notes
Integration Rules
Updated for the latest DKSH clarification and the payload currently produced by DKSH Integration.
One full snapshot per endpoint
At the scheduled time, the Plugin sends all eligible Invoices in one request and all eligible Goods Returns in a separate request. It does not post one document at a time.
Rolling 15 calendar days
Every request contains documents dated within the latest 15 calendar days, inclusive of today. changedDate is sent on every line.
Omission means deletion
Each successful request replaces the previous snapshot for that DLP and endpoint. Any previously received in-window document omitted from the new snapshot is treated as deleted.
DLP token in request body
DKSH supplies one token per distributor. The Plugin sends { token, details }; Login, Refresh Token, Revoke Token and Authorization headers are not used.
DKSH-only master data
Only selected DKSH products are included. prdCode and custCode must match DMS master data; the Plugin uses AutoCount codes directly when no mapping override is entered.
Smallest/Base UOM
Non-Base UOM quantities are multiplied by the AutoCount UOM Rate. The resulting Base UOM quantity must be a positive whole number.
Combine matching products
Lines in the same document that resolve to the same DKSH product code are combined; Base UOM quantity and ttlAfterDisc are summed.
All-or-nothing validation
If any selected document has a missing mapping or invalid quantity, that endpoint snapshot is not sent. An empty snapshot is skipped.
200,000-line ceiling
The Plugin blocks an endpoint snapshot above DKSH's approximate 200,000-line limit instead of splitting it, because splitting would change deletion semantics.
Daily PC election
The logged-in SQL Server PC uploads first. If it is unavailable, the alphabetically first active client takes over after a two-minute grace period; a shared database lease prevents duplicate posting.
Retry behavior
A failed or timed-out full snapshot is retried after 15 minutes. A successful snapshot is sent once per configured Posting Time each day.
Mock outage
Pause API makes upload routes return HTTP 503. Read-only monitoring and the Resume control remain available.
Payload Schema
Line-level payload definitions expected by the Mock Worker.Highlighted fields are compulsory
Sales Order Invoice details
| Field | Type | Description |
|---|---|---|
| dstCode | string | Distributor code supplied by DKSH. |
| invNo | string | Invoice number. |
| invDate | date/time | Invoice date within the current 15-calendar-day snapshot. |
| custCode | string | Customer code maintained in DMS. |
| prdCode | string | DKSH product code maintained in DMS. |
| qty | integer | Positive whole-number quantity in the smallest/Base UOM. |
| ttlAfterDisc | decimal | Total amount after discount for the combined product line. |
| remark | string | Optional AutoCount document remark. |
| changedDate | date/time | Document changed date; always sent by the Plugin. |
Goods Return details
| Field | Type | Description |
|---|---|---|
| dstCode | string | Distributor code supplied by DKSH. |
| grNo | string | Goods Return number. |
| grDate | date/time | Goods Return date within the current 15-calendar-day snapshot. |
| custCode | string | Customer code maintained in DMS. |
| prdCode | string | DKSH product code maintained in DMS. |
| qty | integer | Positive whole-number quantity in the smallest/Base UOM. |
| ttlAfterDisc | decimal | Total amount after discount for the combined product line. |
| remark | string | Optional AutoCount document remark. |
| changedDate | date/time | Document changed date; always sent by the Plugin. |
