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:
Everything else — 401, 403, 404, 409
Common cases
409 when updating a listing
409 when updating a listing
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.403 on a pharmacy you expected to have
403 on a pharmacy you expected to have
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.400 that's really a 401
400 that's really a 401
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.400 on quantity
400 on quantity
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 failedPOST may create a second listing
or offer.
Idempotency keys arrive with v2.