| Field | Type | Description |
|---|---|---|
isLatestVersion | boolean | true if no newer version exists. false if this document has been superseded. |
replacesProcurosTransactionId | uuid | null | The ID of the older transaction this one replaces. null if this is the original document. |
replacedByProcurosTransactionId | uuid | null | The ID of the newer transaction that replaced this one. null if this is still the current version. |
Recommended Handling
Always checkisLatestVersion before importing a document into your system. If the value is false, a newer version of the document is already available and the one you are looking at should be skipped or voided.
php
isLatestVersion is false and the document was already imported, you can use replacedByProcurosTransactionId to identify the newer version. The newer version will also appear as a separate pending transaction on GET /v2/transactions, so no additional API call is needed — simply skip the outdated document and process the newer one when it comes up.
php
Marking outdated versions as processed
When you mark a transaction as processed, Procuros records that you have acknowledged it. If a transaction in your queue turns out to haveisLatestVersion: false, you do not need to take any special action — Procuros automatically removes outdated versions from the pending queue before they are returned to you. You will only ever need to mark the latest version as processed.
Version Chain Example
Given three versions of the same order:procurosTransactionId | replacesProcurosTransactionId | replacedByProcurosTransactionId | isLatestVersion |
|---|---|---|---|
aaa-111 | null | bbb-222 | false |
bbb-222 | aaa-111 | ccc-333 | false |
ccc-333 | bbb-222 | null | true |
ccc-333 should be imported. The earlier versions can be safely skipped or voided.
When polling via
GET /v2/transactions (pending transactions), outdated versions are removed from the queue automatically as soon as a newer version is detected. isLatestVersion will always be true for transactions returned by this endpoint.