Search evergreen preferences
curl --request POST \
--url https://sandbox-api.instockrx.com/evergreen-cash-offer-preferences/search \
--header 'Content-Type: application/json' \
--header 'X-InStockRx-Api-Key: <api-key>' \
--data '
{
"filters": {
"nationalDrugCodes": [
"<string>"
],
"buyingPharmacyNpis": [
"1234567890"
],
"active": true,
"q": "<string>"
},
"sort": [
"<string>"
],
"page": {
"limit": 50,
"cursor": "<string>"
}
}
'const options = {
method: 'POST',
headers: {'X-InStockRx-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filters: {
nationalDrugCodes: ['<string>'],
buyingPharmacyNpis: ['1234567890'],
active: true,
q: '<string>'
},
sort: ['<string>'],
page: {limit: 50, cursor: '<string>'}
})
};
fetch('https://sandbox-api.instockrx.com/evergreen-cash-offer-preferences/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox-api.instockrx.com/evergreen-cash-offer-preferences/search"
payload = {
"filters": {
"nationalDrugCodes": ["<string>"],
"buyingPharmacyNpis": ["1234567890"],
"active": True,
"q": "<string>"
},
"sort": ["<string>"],
"page": {
"limit": 50,
"cursor": "<string>"
}
}
headers = {
"X-InStockRx-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"nationalDrugCode": "<string>",
"buyingPharmacyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": "42.50",
"buyingPharmacyNpi": "1234567890",
"maxQuantityPerOffer": "1",
"minimalExpirationDate": "2023-12-25",
"requireFullPackage": true,
"requireSealedPackage": true,
"requireOriginalPackage": true,
"requireIntactPackageLabel": true,
"shippingRequestMethod": "Custom",
"maxShippingPrice": "42.50",
"active": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"page": {
"limit": 100,
"nextCursor": "<string>",
"prevCursor": "<string>",
"estimatedTotal": 1
}
}Evergreen Cash Offer Preferences
Search evergreen preferences
Scope: offers:read.
POST
/
evergreen-cash-offer-preferences
/
search
Search evergreen preferences
curl --request POST \
--url https://sandbox-api.instockrx.com/evergreen-cash-offer-preferences/search \
--header 'Content-Type: application/json' \
--header 'X-InStockRx-Api-Key: <api-key>' \
--data '
{
"filters": {
"nationalDrugCodes": [
"<string>"
],
"buyingPharmacyNpis": [
"1234567890"
],
"active": true,
"q": "<string>"
},
"sort": [
"<string>"
],
"page": {
"limit": 50,
"cursor": "<string>"
}
}
'const options = {
method: 'POST',
headers: {'X-InStockRx-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filters: {
nationalDrugCodes: ['<string>'],
buyingPharmacyNpis: ['1234567890'],
active: true,
q: '<string>'
},
sort: ['<string>'],
page: {limit: 50, cursor: '<string>'}
})
};
fetch('https://sandbox-api.instockrx.com/evergreen-cash-offer-preferences/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox-api.instockrx.com/evergreen-cash-offer-preferences/search"
payload = {
"filters": {
"nationalDrugCodes": ["<string>"],
"buyingPharmacyNpis": ["1234567890"],
"active": True,
"q": "<string>"
},
"sort": ["<string>"],
"page": {
"limit": 50,
"cursor": "<string>"
}
}
headers = {
"X-InStockRx-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"nationalDrugCode": "<string>",
"buyingPharmacyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": "42.50",
"buyingPharmacyNpi": "1234567890",
"maxQuantityPerOffer": "1",
"minimalExpirationDate": "2023-12-25",
"requireFullPackage": true,
"requireSealedPackage": true,
"requireOriginalPackage": true,
"requireIntactPackageLabel": true,
"shippingRequestMethod": "Custom",
"maxShippingPrice": "42.50",
"active": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"page": {
"limit": 100,
"nextCursor": "<string>",
"prevCursor": "<string>",
"estimatedTotal": 1
}
}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.