Status codes

Two error shapes

The API returns different bodies depending on where the request failed.

Validation errors — 400

Model validation produces a field-keyed object:
Each key is a request field; each value is a list of what’s wrong with it. This is the shape to surface to your users — it names exactly what to fix.

Everything else — 401, 403, 404, 409

Because these two shapes differ, don’t parse errors by assuming message exists. Branch on the status code, or check for errors before reading it.

Common cases

Marketplace listings, draft listings and cash offers can only be modified while Pending. Once purchased, accepted or cancelled, PUT and DELETE return 409. Re-read the object and check its status before offering an edit.
The NPI isn’t in your group. Call GET /api/v1/pharmacies/search to see the current membership — a pharmacy added by NPI stays pending until it registers with InStockRx.
Validation runs before authentication, so an unauthenticated and malformed request reports the malformed body. Fix the body; if you then get 401, it’s the key.
quantity is conditional on fullPackage: exactly 1 when fullPackage is true, between 0.01 and the drug’s package size when it’s false.

Retries

v1 has no idempotency mechanism. Retrying a failed POST may create a second listing or offer.
Retry GET requests freely. For POST, PUT and DELETE, confirm the outcome with a search before retrying — a network timeout doesn’t tell you whether the write landed.
Idempotency keys arrive with v2.