v2 returns one error body everywhere: RFC 9457 application/problem+json. Unlike v1, where a 400 could arrive in any of four different shapes, there is a single envelope to parse and a single field to branch on.

Branch on the slug, not the status

The last path segment of type is the slug, and it is the stable identifier. A status code tells you the category; the slug tells you what actually happened.

Purchase-readiness blockers and warnings

Readiness is a pre-flight: GET it before you buy and you learn what would stop the call rather than finding out from a 400. Each blocker code is the same slug the live POST /purchase or /checkout returns for that condition, so one handler covers both. Pharmacy-side blockers, which need no listingId: Named-funding-source blockers, raised only when the call names one: Listing-side blockers, raised only when you pass ?listingId=: And one for a checkout, about the bundle’s own composition: Warnings do not block. They are advisories to show the operator:
The warning set is deliberately open. Render a code you do not recognise verbatim rather than failing on it — new warnings are added without a version bump, and an integration that treats an unknown warning as an error will break on one.

full-pull-required: start again, do not skip it

Change-token search returns 410 full-pull-required when the token was issued while this pharmacy saw a different marketplace. Group membership changes, a state restriction is switched on or off, a chain-exclusive window opens — and records that were invisible become visible, or the reverse. A delta cannot express that. The token tells us what changed since it was issued, and it has no way to say “these twenty listings were always there, you just could not see them”. So the API refuses the delta rather than returning one that is quietly short. The message says what to do, and it is the whole handling:
Treat a 410 here as “re-pull”, never as “nothing to do”. An integration that catches the error, logs it and waits for the next poll will keep sending the same dead token and will never see the records it is missing. Nothing surfaces: no error after the first, and a catalogue that is simply incomplete. Drop the token, run the search with no change token, and continue from the one that comes back.

When no specific slug applies

Not every failure has a slug of its own. The rest fall back to one derived from the status, so these are the full set you can receive without any of the above:
Slugs are added over time. Treat an unrecognised one as its status code and show detail, which is written to be read.
The two verification slugs are not retryable. They mean InStockRx has not finished reviewing that pharmacy, so a retry returns the same answer until a person acts. Surface detail to whoever is operating the integration rather than backing off and trying again. Purchase readiness reports the same two codes as blockers, so you can check before you attempt the call. A pharmacy InStockRx has approved is never subject to either.
One refusal worth knowing about arrives as bad-request. A pharmacy that has not filed its required photographs cannot list, and on v2 that comes back as bad-request with the reason in detail — there is no slug of its own to branch on, because the rule is enforced by a shared internal check rather than by the v2 layer.It affects creating a listing, re-activating one, and creating or updating a cash offer. The equivalent on v1 is the branchable code 500145; see listing rules for the rule itself, the pharmacy-type waivers and why no retry will clear it. Until it has a slug, match on the status plus detail only as a display decision, never as a branch.

requestId is the thing to log

Every response carries a request id, in the body as requestId and in the X-Request-Id response header. They are the same value, and it is the same id our logs record.
Log it on every non-2xx. Quoting it to support turns “a call failed yesterday” into an exact record of what we saw — the status, the slug, and the internal context that never reached you. Without it, a report is a search.

Validation failures

Field-level problems add an errors member. It is present only on validation failures, so its absence is itself informative.

remediationUrl — when the API can’t help you

Some refusals cannot be resolved through the API at all. Those carry a remediationUrl pointing at the page in the InStockRx portal that can resolve them.
When you get one, send your user to that link rather than showing them the error. These are the cases where no change to your request will work — see Limitations for the full list of them.

Everything returns this shape

Including the things that often don’t:
  • A route that doesn’t exist. An unknown path, or a non-GUID where a GUID belongs, is a problem document, not an HTML 404.
  • A malformed body. A bare JSON number where money is expected is rejected by the converter and comes back in the same envelope as a business rule.
  • A rate-limit rejection, unlike v1’s 429, which has no body at all.

One naming oddity

Every member is camelCase except required-scopes, which is kebab-case. That is deliberate and fixed — it is not going to be renamed, so parse it as it is.