Sandbox and production are separate. A production login does not work on the sandbox and a
sandbox login does not work in production. API keys are per environment in the same way.
Before you start
- An email address you can read. Activation and invitation links are sent by email, and it becomes the address InStockRx associates with your company.
- Your company name, and optionally its website.
- A short description of what you plan to build.
- Which API versions you want: V1, V2 or both.
Getting access
1
Create a sandbox account
Open sandbox.instockrx.com and create an account. The
sandbox terms are accepted as part of sign-up. Use the email address you want associated
with your company: every link is sent there.
2
Request sandbox access
After your first sign-in you land on Home and a Request sandbox access dialog opens:
- Company name (required)
- Company website (optional; must start with
http://orhttps://) - What do you plan to build? (required)
- Which API versions do you plan to use? V2 is pre-selected; tick V1 as well if you need it. At least one is required.
3
Wait for review
Home shows Your request is under review and checks for changes on its own. InStockRx
reviews every request by hand.
- Approved: Home shows Your request is approved with the date the activation link is valid until, and the activation email is sent to you.
- Not approved: Home shows the reviewer’s note, which is also emailed to you. Press Request again to send a new request with more detail.
4
Activate your access
Open the link in the approval email
(
https://sandbox.instockrx.com/developers/activate?token=…). If you are not signed in, you
sign in first and come back to the page. Sign in with the address the email was sent to.The page reads Join the your company sandbox: you become the owner of the
organization, and your starter kit is built right after activation. Press
Activate access.Your starter kit
Right after activation InStockRx builds a complete test setup for your company in the background. For a company called Acme, it contains:
Each test pharmacy carries a real pharmacy NPI taken from the NPI Registry, so NPI-based calls
behave as they do in production. The pharmacy it belongs to is elsewhere in the US and has nothing
to do with your test pharmacy. Names, addresses, licences and compliance documents are
placeholders. Both pharmacies are cold-chain certified and have no compliance prompts to clear.
Home shows the kit status next to your company name and refreshes it every few seconds:
Not started → Provisioning → Ready. Setting up payments is the slow part, so expect
minutes rather than seconds. When it is Ready, the tabs on Home fill in, both pharmacies
appear in your pharmacy selector, and you receive a “kit ready” email (it never contains key
material).
If the build fails, the status reads Failed and Home shows the reason, followed by
InStockRx has been notified. Staff retry the build, and the retry resumes after the last step
that finished. Home stops refreshing after a failure, so reload the page to see the result of
the retry.
Issuing V2 keys, inviting teammates and resetting data become available once the kit is
Ready.
Your Home page
Home is athttps://sandbox.instockrx.com/developers/home. The header shows your company, the
kit status, your role and email, your group, an API documentation link and the
Reset sandbox data button.
Overview
-
Base URLs for V1 and V2, with copy buttons. The sandbox API is
https://sandbox-api.instockrx.com. -
Pharmacies: each test pharmacy’s name, Seller or Buyer, NPI, a Charges enabled or
Charges pending chip, and its id with a copy button. V2 calls name the pharmacy you act as
by this id, in
X-Pharmacy-Id; V1 calls name it by NPI. -
Forced responses for testing, sent as the
X-InStockRx-Triggerheader on a V2 call:The header is ignored in production.
API keys
V1 key. One key shared by everyone in your organization. Anyone can reveal and copy it. Only the owner can Regenerate it: a new key is issued, and the old one is refused on some requests at once and everywhere within 60 seconds. Tell your teammates before you do it. V2 keys. Personal keys with full access, startingik_sandbox_. Each person can hold at most
two active keys they issued; the starter key counts as the owner’s. The tab shows n of 2 of
your keys, and teammates’ keys do not count against you.
The owner can rotate or revoke any key. A member can rotate or revoke only the keys they issued;
on anyone else’s the buttons are disabled with Only the key’s issuer can do this.
Team
Lists everyone in your organization: name, email, Owner or Member, status, who invited them and, for pending invitations, when the invitation expires. The owner can Invite (email and name), Resend a pending invitation and Remove people. Members see the list read-only. An invited teammate:- Receives an email with a link and its expiry date.
- Creates a sandbox account with that same email address, or signs in if they already have one.
- Opens the link and presses Activate access. The page names who invited them. No request form is needed: the invitation places them in your organization.
Resetting sandbox data
Reset sandbox data puts your test pharmacies back to how they were right after onboarding, so you can re-run integration tests from a clean start.What goes
- Pending listings sold by your pharmacies are cancelled (“Sandbox data reset”), with a
marketplace_listing.cancelledwebhook event for each. - Pending cash offers your pharmacies made are cancelled, with a
cash_offer.cancelledevent for each. - Draft listings are deleted, images included.
- Evergreen cash-offer preferences are deleted.
- The pharmacies get their starter names and addresses back.
What stays
- Anything past pending: completed and in-flight transactions.
- Your group, both pharmacies, the V1 key, every V2 key and every webhook endpoint.
- Cash offers other organizations made to your pharmacies.
- Blacklists, NDC restrictions, favorites and shipping preferences.
- Only the owner can reset, once the kit is Ready.
- One reset every 10 minutes, counted from the moment you confirm. Until then the button is disabled; hover over it to see when the next reset is allowed.
- After you confirm, Reset started. Your data is cleared in the background. appears. The page itself does not change; the data is cleared within a few seconds. A listing or offer that stopped being pending in the meantime, for example because it was bought, is left alone.
Roles
An organization has exactly one owner. InStockRx staff can promote a member to owner; the previous
owner then becomes a member. No purchase limits are set for anyone when they join.
What else is in the sandbox
The marketplace is not empty. Every day the 100 newest pending listings and cash offers from production are copied into the sandbox and attached to demo pharmacies, so searches return realistic NDCs and prices. They are sandbox records: buying one is simulated like everything else here, and nothing reaches the production pharmacy that posted the original.What the sandbox does not have
- Messages. In-app chat between pharmacies is switched off. Chat is not part of the public API, so there is nothing to test there.
- Your own pharmacies. There is no “Add a pharmacy”; use the two from your starter kit.
- Real money. Purchases, payouts, refunds and fees behave as in production but never move funds.
Suspension
InStockRx can suspend a person or a whole organization. Everyone affected is told by email, with the reviewer’s note if there is one.Getting help
For anything about your access — a lost or expired activation link, a failed starter kit, a suspension — email info@instockrx.com.Next
Make your first call
Use the starter key and a pharmacy id from Home.
Rate limits
The windows the forced responses let you test.
Moving to production
Production keys are issued by InStockRx, not from the sandbox.