A pharmacy’s own staff work in the InStockRx portal while your integration runs. Both can change the same listing. v2 gives you a way to make sure you are updating the version you think you are.

Every read gives you a token

Single-resource reads — and writes that return a body — carry a weak ETag:
Send it back as If-Match on your next write to that resource:
On a 412, re-read the resource, decide whether your change still makes sense against the new state, and retry with the new token.
If-Match is optional, and omitting it is never an error. That makes last-write-wins the default. For anything where overwriting a concurrent change matters — price, quantity, cancellation — send the header. Nothing will remind you.
Creates take no If-Match — there is no prior version — but do return an ETag on the created body, so you can guard the next write without an extra read.

Checkout is the exception

POST /marketplace-listings/checkout mutates several listings at once, so a single header cannot express which version of what you expect. It takes a per-item ifMatch in the body instead.

Why it fails before anything happens

The version check runs before any irreversible side effect — buying a shipping label, moving money. A doomed write cannot spend anything on its way to failing. It is then re-checked atomically at save time, so a change landing in the microseconds between the two is still caught.