This walks you from a fresh API key to a successful call. It should take about five minutes.
You’ll need a key first — see Request API access. Keys are issued by InStockRx staff, so start that email before you start this page.

1. Pick your environment

Start in the sandbox. It runs the same v1 contract as production, against separate data.

2. List the pharmacies in your group

This is the best first call: it’s read-only, takes no parameters, and proves your key works. The group is resolved from the key itself.
A 200 returns every pharmacy your key can act for:
Keep one of those nationalProviderIdentifier values. Almost every other endpoint needs an NPI to say which pharmacy you’re acting for.
A 401 with "Missing Authorization Header" means the X-INVIEW-AUTH header didn’t arrive — check the spelling and that your client isn’t stripping custom headers.A 400 listing validation errors can also mean your key is missing. Request validation runs before authentication, so a request that’s both malformed and unauthenticated reports the malformed body first. Fix the body, and if you then get a 401, it’s the key.

3. Create a marketplace listing

Now act on behalf of one of those pharmacies. sellingPharmacyNpi is what makes this listing theirs.
dscsaCertified must be true, and it is an attestation on behalf of the selling pharmacy — covering storage conditions, acquisition under DSCSA, and agreement to InStockRx transaction fees. Read the full text under Marketplace listings before you send it programmatically.
A 201 returns the created listing, including its id. You can update it with PUT or cancel it with DELETE for as long as it stays in Pending status.

4. Search the marketplace

searchingContext selects what you’re looking at — 1 for the marketplace, 2 for what this pharmacy has bought, 3 for what it has sold. See Enumerations.

Next

Authentication

Header format and what the failure modes mean.

Listings & offers

The three object types and their lifecycles.

Errors

Status codes and the error response shape.

API reference

Every endpoint, with validation rules.