curl --request GET \
--url https://sandbox-api.instockrx.com/groups/npi-list \
--header 'X-InStockRx-Api-Key: <api-key>'const options = {method: 'GET', headers: {'X-InStockRx-Api-Key': '<api-key>'}};
fetch('https://sandbox-api.instockrx.com/groups/npi-list', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox-api.instockrx.com/groups/npi-list"
headers = {"X-InStockRx-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"members": [
"1234567890"
],
"invited": [
"1234567890"
],
"asOf": "2023-11-07T05:31:56Z"
}Read the current NPI roster for the credential's group
Scope: pharmacies:read.
Returns the credential group’s current roster, split into NPIs whose
pharmacy is registered + joined (members) and NPIs that have been
invited but the pharmacy hasn’t signed up yet (invited). Auto-join
on signup applies to entries in invited.
Pair with PUT /groups/npi-list to make a safe roster change:
GET to capture the current state, mutate the lists locally, PUT
the union back. The PUT semantics are replace, not append, so
sending an incremental list without first reading the current roster
would remove every other NPI from the group.
curl --request GET \
--url https://sandbox-api.instockrx.com/groups/npi-list \
--header 'X-InStockRx-Api-Key: <api-key>'const options = {method: 'GET', headers: {'X-InStockRx-Api-Key': '<api-key>'}};
fetch('https://sandbox-api.instockrx.com/groups/npi-list', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox-api.instockrx.com/groups/npi-list"
headers = {"X-InStockRx-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"members": [
"1234567890"
],
"invited": [
"1234567890"
],
"asOf": "2023-11-07T05:31:56Z"
}Authorizations
Headers
Which pharmacy in your group you are acting as. Required whenever your group holds more than one pharmacy — omitting it is then 400 missing-pharmacy-context. With exactly one pharmacy it may be omitted, but send it anyway: the call starts failing the day a second pharmacy is added.
Response
OK
NPIs currently in the group (pharmacy registered + joined).
NPI as a fixed-width 10-digit string. v2 treats an NPI as an opaque identifier
rather than a number, consistent with how it handles NDC, GTIN and other
healthcare identifiers. CMS-issued NPIs always start with 1 or 2, so
leading-zero NPIs do not arise in practice, but string typing rules out the
broader class of integer-identifier truncation bugs that v1 was open to.
^\d{10}$NPIs invited but not yet joined (pharmacy not registered with InStockRx). Auto-joins on signup.
NPI as a fixed-width 10-digit string. v2 treats an NPI as an opaque identifier
rather than a number, consistent with how it handles NDC, GTIN and other
healthcare identifiers. CMS-issued NPIs always start with 1 or 2, so
leading-zero NPIs do not arise in practice, but string typing rules out the
broader class of integer-identifier truncation bugs that v1 was open to.
^\d{10}$