The InStockRx marketplace lets pharmacies sell surplus medication to each other and buy short-dated stock below wholesale. v2 is the current partner API: it covers the whole trading lifecycle, and it can call you when things happen rather than making you poll.

Sell

Post listings, manage drafts, accept cash offers, ship, and handle returns.

Buy

Search the marketplace, make cash offers, check out, and confirm receipt.

Know

Look up a drug package’s rules before you submit, and read market pricing statistics.

Be told

Subscribe to signed webhooks for 16 marketplace events.

What makes v2 different

If you have used v1, the contract has changed in ways worth reading before you start: one error shape, string enums, string money, cursor paging, optimistic concurrency and safe retries. Migrating from v1 covers all of it. If you are new, four things shape most integrations:
1

A key belongs to a group, and acts for a pharmacy

One key can act for every pharmacy in your group. Which one you are acting as goes in the X-Pharmacy-Id header. See Authentication.
2

Scopes are checked per endpoint

13 of them, AND-semantics. See Scopes.
3

Money and quantity are strings

"199.99", never 199.99. A bare number is rejected, deliberately — it removes floating-point drift from prices.
4

Some things still need the portal

Certification uploads and the middle of the returns flow. Those refusals carry a remediationUrl — see What v2 can’t do yet.

Start here

Sandbox onboarding

Sign up, get test pharmacies and a key.

Quickstart

Your first authenticated call.

API reference

Every endpoint.
v1 is still live and still supported. It is documented under the v1 version in the switcher at the top of this page. Nothing forces a migration on a timetable.