The monthly reconciliation reports twelve discrepancies, three of them critical: an order that exists in the channel but not in your system, and two stock levels differing by one piece. Simply adopting the channel figure now removes the discrepancy and keeps the cause.
The contract therefore makes resolution a decision of its own per discrepancy: adopt the source, adopt the target or explicitly accept the difference — each with a reason and an attributed actor. Resolution is evidenced only when a new reconciliation finds no critical discrepancy any more.
| Surface | Roles |
|---|---|
| Commerce | Parts trading, Software vendor, Platform and marketplace |
What this case requires
- A completed reconciliation. The decision refers to a discrepancy with a
discrepancyIdinside a reconciliation. - A person with authority. Adopting source or target changes data; not everyone should be allowed to.
- Reasons someone else understands.
reasonCodeis your own code; an in-house catalogue keeps it readable. - The will to find the cause. Ledger and event stream can be read; the contract describes no link between their entries and a discrepancy.
The sequence
The table names the responsible call per stage and what exists afterwards. The reasoning for why a stage cannot be skipped follows below it.
| Stage | Call | What exists afterwards |
|---|---|---|
| Read the reconciliation | GET /commerce/v1/reconciliations/{reconciliationId} | discrepancies with kind, severity and resourceId; plus criticalRemaining |
| Decide | POST /commerce/v1/reconciliations/{reconciliationId}/discrepancies/{discrepancyId}/resolution | apply_source, apply_target or accept_difference, each with a reasonCode |
| Trace the stock | GET /commerce/v1/inventory/ledger | entryType, quantityDelta and balance per entry |
| Re-read the events | GET /commerce/v1/events | events with streamId, sequence and correlationId |
| Reconcile again | POST /commerce/v1/reconciliations | the same period with new checkpoints — criticalRemaining is the figure that counts |
Why each stage is needed
- Read the reconciliation.
GET /commerce/v1/reconciliations/{reconciliationId}returnscountswithmatched,discrepantandcriticalRemaining,integritywith both sides’ checksums anddiscrepancieswithkind,resourceId,severityandstate. Critical ones first:severitydistinguisheswarningandcritical; the contract does not describe what effect a critical discrepancy has. - Decide.
POST /commerce/v1/reconciliations/{reconciliationId}/discrepancies/{discrepancyId}/resolutiontakesdecisionwithapply_source,apply_targetoraccept_difference, plusreasonCodeandexpectedRevision. The response namesresultingStateanddecisionActorReference— the decision is attributed to an actor. - Trace the stock.
GET /commerce/v1/inventory/ledgershows per entryentryType,quantityDeltaandbalance. Each entry carriesstockItemId; the contract describes no link to a discrepancy. - Re-read the events.
GET /commerce/v1/eventsreturns events withstreamId,sequenceandcorrelationId. They also carrytype,resourceIdandoccurredAt; the contract does not describe what a gap insequencemeans. - Reconcile again.
POST /commerce/v1/reconciliationschecks the same period with new checkpoints. Resolution is evidenced whencriticalRemainingstands at zero; anything else is an assertion.
curl -X POST \
-H 'X-Api-Key: <API_KEY>' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: abweichung-2026-08-0003' \
-d '{"decision":"apply_source","reasonCode":"<reasonCode>","note":"Buchung im Kanal war korrekt, Zustellung fehlte.","expectedRevision":"<revision>"}' \
'https://commerce-preview.invalid/commerce/v1/reconciliations/<reconciliationId>/discrepancies/<discrepancyId>/resolution'What you end up with
In the end every discrepancy is decided, reasoned and attributed to an actor, the ledger and the event stream have been read, and a new reconciliation evidences that nothing critical is open.
Where to find this in the documentation
The binding field lists, error codes and sample responses live in this surface’s OpenAPI contract at docs.tapinomahub.com (tapinoma-commerce). All use cases arranged by surface and role: overview of the use cases.
Sources and legal references
Frequently asked
What is the difference between apply_source and apply_target?
With apply_source the source state applies, with apply_target that of the target. Which side is source and which is target is fixed by the reconciliation’s checkpoints.
May I simply accept a discrepancy?
Yes, with accept_difference — but always with a reason. The decision carries a decisionActorReference and is traceable later.
When is resolution complete?
When a new reconciliation for the same period finds no critical discrepancy any more, that is when criticalRemaining is zero.
