Creates a new cash offer.
curl --request POST \
--url https://test-instockrx-api.azurewebsites.net/api/v1/cash-offers \
--header 'Content-Type: application/json' \
--header 'X-INVIEW-AUTH: <api-key>' \
--data '
{
"buyingPharmacyNpi": 1234567890,
"buyingPharmacyMessage": "Would like to buy this med",
"nationalDrugCode": "01234567890",
"requestedQuantity": 30,
"minimalExpirationDate": "12-31-2026",
"requireFullPackage": true,
"requireSealedPackage": true,
"requireOriginalPackage": true,
"requireIntactPackageLabel": true,
"requireCertificationFile": null,
"price": 125.5,
"shippingRequestMethod": 0,
"maxShippingPrice": 0,
"shipByDate": "12-15-2026",
"showOnlyInState": false
}
'const options = {
method: 'POST',
headers: {'X-INVIEW-AUTH': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
buyingPharmacyNpi: 1234567890,
buyingPharmacyMessage: 'Would like to buy this med',
nationalDrugCode: '01234567890',
requestedQuantity: 30,
minimalExpirationDate: '12-31-2026',
requireFullPackage: true,
requireSealedPackage: true,
requireOriginalPackage: true,
requireIntactPackageLabel: true,
requireCertificationFile: null,
price: 125.5,
shippingRequestMethod: 0,
maxShippingPrice: 0,
shipByDate: '12-15-2026',
showOnlyInState: false
})
};
fetch('https://test-instockrx-api.azurewebsites.net/api/v1/cash-offers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://test-instockrx-api.azurewebsites.net/api/v1/cash-offers"
payload = {
"buyingPharmacyNpi": 1234567890,
"buyingPharmacyMessage": "Would like to buy this med",
"nationalDrugCode": "01234567890",
"requestedQuantity": 30,
"minimalExpirationDate": "12-31-2026",
"requireFullPackage": True,
"requireSealedPackage": True,
"requireOriginalPackage": True,
"requireIntactPackageLabel": True,
"requireCertificationFile": None,
"price": 125.5,
"shippingRequestMethod": 0,
"maxShippingPrice": 0,
"shipByDate": "12-15-2026",
"showOnlyInState": False
}
headers = {
"X-INVIEW-AUTH": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"canBeSoldOnTheMarketplace": true,
"drugBankConceptId": "<string>",
"drugBankConceptTitle": "<string>",
"drugNameDesc": "<string>",
"drugPackageForm": "<string>",
"drugPackageStrength": "<string>",
"genericMedID": "<string>",
"genericMedIDDesc": "<string>",
"imgUrlLarge": "<string>",
"imgUrlMedium": "<string>",
"imgUrlThumb": "<string>",
"imgUrlTiny": "<string>",
"labelerName": "<string>",
"minimumDispenseQuantity": 123,
"nationalDrugCode": "<string>",
"nationalDrugCodeNormalized": "<string>",
"packageDescription": "<string>",
"packageName": "<string>",
"packageQuantity": 123,
"packageSize": 123,
"packageSizeUnitsCodeDesc": "<string>",
"quantityUnitQualifier": "<string>",
"schedule": "<string>",
"nadacPrice": 123,
"branded": true,
"generic": true,
"isRems": true,
"prescribableName": "<string>",
"isPrescription": true,
"drugStorageConditionType": 10,
"updatedAt": "2023-11-07T05:31:56Z",
"requireFullTrackingInfo": true,
"noPartialsAllowed": true,
"requiresCertification": true,
"requireScan": true,
"buyingPharmacyCancellationDate": "2023-11-07T05:31:56Z",
"buyingPharmacyCancellationMessage": "<string>",
"buyingPharmacyCityState": "<string>",
"buyingPharmacyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"buyingPharmacyMessage": "<string>",
"buyingPharmacyName": "<string>",
"buyingPharmacyGln": "<string>",
"buyingPharmacyDBA": "<string>",
"buyingBulkOfferType": 0,
"buyingPharmacyNationalProviderIdentifier": 123,
"buyingPharmacyPhone": 123,
"buyingPharmacyUser": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requestedDate": "2023-11-07T05:31:56Z",
"requestedQuantity": 123,
"resultingMarketplaceListingId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sellingPharmacyCityState": "<string>",
"sellingPharmacyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sellingPharmacyMessage": "<string>",
"sellingPharmacyName": "<string>",
"sellingPharmacyGln": "<string>",
"sellingPharmacyDBA": "<string>",
"sellingPharmacyNationalProviderIdentifier": 123,
"sellingPharmacyPhone": 123,
"sellingPharmacyResponseDate": "2023-11-07T05:31:56Z",
"minimalExpirationDate": "2023-11-07T05:31:56Z",
"requireFullPackage": true,
"requireSealedPackage": true,
"requireOriginalPackage": true,
"requireIntactPackageLabel": true,
"requireCertificationFile": true,
"price": 123,
"isMemberRequest": true,
"evergreenCashOfferPreferencesId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": 0,
"nadacPercentage": 123,
"wholesalePercentage": 123,
"sellingPharmacyUser": "<string>",
"shipByDate": "2023-11-07T05:31:56Z",
"isGreatDeal": true,
"stateGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdByGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shippingRequestMethod": 0,
"maxShippingPrice": 123
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}Cash Offers
Creates a new cash offer.
Accepts details for a third-party cash offer and creates a new cash offer. Validates the buying pharmacy and ensures the requesting user has permission to create the listing.
Validation Rules
| Field | Required | Type | Rules |
|---|---|---|---|
| BuyingPharmacyNpi | Yes | long | Must be a valid NPI |
| NationalDrugCode | Yes | string | Must correspond to a real drug identifier |
| MinimalExpirationDate | Yes | string | ISO 8601 format (e.g. “2025-12-31T00:00:00Z”). Must be a valid future date |
| Price | Yes | decimal | Must be a positive number |
| RequireFullPackage | Yes | bool | Affects RequestedQuantity validation |
| RequestedQuantity | Yes | decimal | Must be positive. If RequireFullPackage=true: whole number between 1 and 10. If RequireFullPackage=false: between 0.01 and the drug’s package size |
| RequireSealedPackage | Yes | bool | - |
| RequireOriginalPackage | Yes | bool | - |
| RequireIntactPackageLabel | Yes | bool | - |
| ShippingRequestMethod | Yes | enum | Allowed values: Cheapest (1), Medium (2), ASAP (3). Custom (0) is not supported |
| MaxShippingPrice | Conditional | decimal | Required and must be positive when ShippingRequestMethod=Medium. Must be null or 0 otherwise |
| ShipByDate | No | string | If provided, must be a valid future date in ISO 8601 format |
| BuyingPharmacyMessage | No | string | If provided, must be a non-empty, non-whitespace string |
| ShowOnlyInState | No | bool | Not returned in the response. Instead, stateGroupId is returned: if showOnlyInState = true, stateGroupId will have a GUID value; if false, stateGroupId will be null |
POST
/
api
/
v1
/
cash-offers
Creates a new cash offer.
curl --request POST \
--url https://test-instockrx-api.azurewebsites.net/api/v1/cash-offers \
--header 'Content-Type: application/json' \
--header 'X-INVIEW-AUTH: <api-key>' \
--data '
{
"buyingPharmacyNpi": 1234567890,
"buyingPharmacyMessage": "Would like to buy this med",
"nationalDrugCode": "01234567890",
"requestedQuantity": 30,
"minimalExpirationDate": "12-31-2026",
"requireFullPackage": true,
"requireSealedPackage": true,
"requireOriginalPackage": true,
"requireIntactPackageLabel": true,
"requireCertificationFile": null,
"price": 125.5,
"shippingRequestMethod": 0,
"maxShippingPrice": 0,
"shipByDate": "12-15-2026",
"showOnlyInState": false
}
'const options = {
method: 'POST',
headers: {'X-INVIEW-AUTH': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
buyingPharmacyNpi: 1234567890,
buyingPharmacyMessage: 'Would like to buy this med',
nationalDrugCode: '01234567890',
requestedQuantity: 30,
minimalExpirationDate: '12-31-2026',
requireFullPackage: true,
requireSealedPackage: true,
requireOriginalPackage: true,
requireIntactPackageLabel: true,
requireCertificationFile: null,
price: 125.5,
shippingRequestMethod: 0,
maxShippingPrice: 0,
shipByDate: '12-15-2026',
showOnlyInState: false
})
};
fetch('https://test-instockrx-api.azurewebsites.net/api/v1/cash-offers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://test-instockrx-api.azurewebsites.net/api/v1/cash-offers"
payload = {
"buyingPharmacyNpi": 1234567890,
"buyingPharmacyMessage": "Would like to buy this med",
"nationalDrugCode": "01234567890",
"requestedQuantity": 30,
"minimalExpirationDate": "12-31-2026",
"requireFullPackage": True,
"requireSealedPackage": True,
"requireOriginalPackage": True,
"requireIntactPackageLabel": True,
"requireCertificationFile": None,
"price": 125.5,
"shippingRequestMethod": 0,
"maxShippingPrice": 0,
"shipByDate": "12-15-2026",
"showOnlyInState": False
}
headers = {
"X-INVIEW-AUTH": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"canBeSoldOnTheMarketplace": true,
"drugBankConceptId": "<string>",
"drugBankConceptTitle": "<string>",
"drugNameDesc": "<string>",
"drugPackageForm": "<string>",
"drugPackageStrength": "<string>",
"genericMedID": "<string>",
"genericMedIDDesc": "<string>",
"imgUrlLarge": "<string>",
"imgUrlMedium": "<string>",
"imgUrlThumb": "<string>",
"imgUrlTiny": "<string>",
"labelerName": "<string>",
"minimumDispenseQuantity": 123,
"nationalDrugCode": "<string>",
"nationalDrugCodeNormalized": "<string>",
"packageDescription": "<string>",
"packageName": "<string>",
"packageQuantity": 123,
"packageSize": 123,
"packageSizeUnitsCodeDesc": "<string>",
"quantityUnitQualifier": "<string>",
"schedule": "<string>",
"nadacPrice": 123,
"branded": true,
"generic": true,
"isRems": true,
"prescribableName": "<string>",
"isPrescription": true,
"drugStorageConditionType": 10,
"updatedAt": "2023-11-07T05:31:56Z",
"requireFullTrackingInfo": true,
"noPartialsAllowed": true,
"requiresCertification": true,
"requireScan": true,
"buyingPharmacyCancellationDate": "2023-11-07T05:31:56Z",
"buyingPharmacyCancellationMessage": "<string>",
"buyingPharmacyCityState": "<string>",
"buyingPharmacyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"buyingPharmacyMessage": "<string>",
"buyingPharmacyName": "<string>",
"buyingPharmacyGln": "<string>",
"buyingPharmacyDBA": "<string>",
"buyingBulkOfferType": 0,
"buyingPharmacyNationalProviderIdentifier": 123,
"buyingPharmacyPhone": 123,
"buyingPharmacyUser": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requestedDate": "2023-11-07T05:31:56Z",
"requestedQuantity": 123,
"resultingMarketplaceListingId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sellingPharmacyCityState": "<string>",
"sellingPharmacyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sellingPharmacyMessage": "<string>",
"sellingPharmacyName": "<string>",
"sellingPharmacyGln": "<string>",
"sellingPharmacyDBA": "<string>",
"sellingPharmacyNationalProviderIdentifier": 123,
"sellingPharmacyPhone": 123,
"sellingPharmacyResponseDate": "2023-11-07T05:31:56Z",
"minimalExpirationDate": "2023-11-07T05:31:56Z",
"requireFullPackage": true,
"requireSealedPackage": true,
"requireOriginalPackage": true,
"requireIntactPackageLabel": true,
"requireCertificationFile": true,
"price": 123,
"isMemberRequest": true,
"evergreenCashOfferPreferencesId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": 0,
"nadacPercentage": 123,
"wholesalePercentage": 123,
"sellingPharmacyUser": "<string>",
"shipByDate": "2023-11-07T05:31:56Z",
"isGreatDeal": true,
"stateGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdByGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shippingRequestMethod": 0,
"maxShippingPrice": 123
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}Authorizations
Custom API Key authentication. Default header: X-INVIEW-AUTH.
Body
application/jsonapplication/json-patch+jsontext/jsonapplication/*+json
The model containing details of the cash offer to create.
Maximum string length:
2000Maximum string length:
15Available options:
0, 1, 2, 3 Response
Created
Available options:
10, 20, 30, 40 Available options:
0, 1, 2 Available options:
0, 1, 2, 3, 4, 10 Available options:
0, 1, 2, 3