Updates an existing cash offer.
curl --request PUT \
--url https://test-instockrx-api.azurewebsites.net/api/v1/cash-offers/{cashOfferId} \
--header 'Content-Type: application/json' \
--header 'X-INVIEW-AUTH: <api-key>' \
--data '
{
"buyingPharmacyNpi": 1234567890,
"buyingPharmacyMessage": "Would like to buy this med",
"requestedQuantity": 30,
"minimalExpirationDate": "12-31-2026",
"requireFullPackage": true,
"requireSealedPackage": true,
"requireOriginalPackage": true,
"requireIntactPackageLabel": true,
"requireCertificationFile": null,
"price": 125.5,
"shipByDate": "12-15-2026",
"maxShippingPrice": null,
"showOnlyInState": false
}
'const options = {
method: 'PUT',
headers: {'X-INVIEW-AUTH': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
buyingPharmacyNpi: 1234567890,
buyingPharmacyMessage: 'Would like to buy this med',
requestedQuantity: 30,
minimalExpirationDate: '12-31-2026',
requireFullPackage: true,
requireSealedPackage: true,
requireOriginalPackage: true,
requireIntactPackageLabel: true,
requireCertificationFile: null,
price: 125.5,
shipByDate: '12-15-2026',
maxShippingPrice: null,
showOnlyInState: false
})
};
fetch('https://test-instockrx-api.azurewebsites.net/api/v1/cash-offers/{cashOfferId}', 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/{cashOfferId}"
payload = {
"buyingPharmacyNpi": 1234567890,
"buyingPharmacyMessage": "Would like to buy this med",
"requestedQuantity": 30,
"minimalExpirationDate": "12-31-2026",
"requireFullPackage": True,
"requireSealedPackage": True,
"requireOriginalPackage": True,
"requireIntactPackageLabel": True,
"requireCertificationFile": None,
"price": 125.5,
"shipByDate": "12-15-2026",
"maxShippingPrice": None,
"showOnlyInState": False
}
headers = {
"X-INVIEW-AUTH": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"boughtByUser": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"savedByUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cityAndState": "<string>",
"displayName": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"phone": "<string>",
"storeCount": 123,
"acceptedTermsAndConditionsDate": "2023-11-07T05:31:56Z",
"ipAddress": "<string>",
"userName": "<string>",
"userOnboardingStatus": 0,
"userSystemRole": 0,
"dateCreated": "2023-11-07T05:31:56Z",
"dateModified": "2023-11-07T05:31:56Z",
"pharmacyNetworkRole": 0,
"pharmacyNetworkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"buyerPharmacyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"buyerPharmacyName": "<string>",
"buyerPharmacyGln": "<string>",
"buyerPharmacyNationalProviderIdentifier": 123,
"buyersMessage": "<string>",
"buyingPharmacyAddress": {
"city": "<string>",
"line1": "<string>",
"line2": "<string>",
"postalCode": "<string>",
"stateAcronym": "<string>"
},
"buyingPharmacyCityState": "<string>",
"buyingPharmacyName": "<string>",
"buyingPharmacyDBA": "<string>",
"buyingPharmacyPhone": 123,
"buyingPharmacyUser": "<string>",
"buyingPharmacyIsFavorite": true,
"cancellationDescription": "<string>",
"cancellationReason": 1,
"cancelledDate": "2023-11-07T05:31:56Z",
"drugPackageForm": "<string>",
"drugPackageStrength": "<string>",
"expirationDate": "2023-11-07T05:31:56Z",
"fullPackage": true,
"originalPackage": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"inventoryQuantity": 123,
"isExpired": true,
"labelerName": "<string>",
"listingDate": "2023-11-07T05:31:56Z",
"lotNumber": "<string>",
"nationalDrugCode": "<string>",
"nationalDrugCodeNormalized": "<string>",
"drugPackageDescription": "<string>",
"packageDescription": "<string>",
"packageName": "<string>",
"paymentConfirmedDate": "2023-11-07T05:31:56Z",
"pharmacyPaymentAccountPaymentEventAttemptId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 123,
"pricePerQuantity": 123,
"quantity": 123,
"quantityUnitQualifier": "<string>",
"saleConfirmedBySellerDate": "2023-11-07T05:31:56Z",
"sealedPackage": true,
"sellerPaysShipping": true,
"sellerPharmacyCityState": "<string>",
"sellerPharmacyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sellerPharmacySeqId": 123,
"sellerPharmacyName": "<string>",
"sellerPharmacyGln": "<string>",
"sellerPharmacyDBA": "<string>",
"sellerPharmacyNationalProviderIdentifier": 123,
"sellerPharmacyPhone": 123,
"sellerPharmacyIsFavorite": true,
"sellerPharmacyNetworkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sellerBulkSaleType": 0,
"shipmentInfo": {
"dateShippingLabelCreated": "2023-11-07T05:31:56Z",
"shipmentHasBeenPurchased": true,
"shippingCarrier": "<string>",
"trackingCode": "<string>",
"trackingLink": "<string>",
"usingUserDefinedShippingInfo": true,
"deliveryDays": 123,
"service": "<string>",
"shipmentPrice": 123,
"shippingLabelUrl": "<string>"
},
"shippingConfirmDate": "2023-11-07T05:31:56Z",
"shippingReceivedConfirmDate": "2023-11-07T05:31:56Z",
"soldDate": "2023-11-07T05:31:56Z",
"tornPackageLabel": true,
"sellerPharmacyAddress": {
"city": "<string>",
"line1": "<string>",
"line2": "<string>",
"postalCode": "<string>",
"stateAcronym": "<string>"
},
"sellerPharmacyStateLicenseFileName": "<string>",
"drugPackage": {
"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
},
"requiresBuyersConfirmation": true,
"buyingPharmacyAcceptedPriceDate": "2023-11-07T05:31:56Z",
"status": 0,
"paymentStatus": 0,
"isRequestableItem": true,
"nadacPrice": 123,
"nadacPercentage": 123,
"nadacLastUpdated": "2023-11-07T05:31:56Z",
"savingPrice": 123,
"calculatedSavings": 123,
"wholesalePercentage": 123,
"wholesaleSavingPrice": 123,
"gtin": "<string>",
"serialNumber": "<string>",
"shipmentDetailsFromBuyerMatch": true,
"shipmentDetailsFromBuyer": {
"expirationDate": "2023-11-07T05:31:56Z",
"lotNumber": "<string>",
"gtin": "<string>",
"serialNumber": "<string>",
"nationalDrugCode": "<string>"
},
"shipmentConfirmationType": 0,
"shipByDate": "2023-11-07T05:31:56Z",
"branded": true,
"generic": true,
"isGreatDeal": true,
"images": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"savedByUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "<string>"
}
],
"bundleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isPrimary": true,
"shippedPicturePath": "<string>",
"receivedPicturePath": "<string>",
"deliveryStatus": 0,
"stateGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chainExclusiveUntil": "2023-11-07T05:31:56Z",
"resultingMarketplaceListingRequestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evergreenCashOfferPreferencesId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isSellerPharmacyColdChainCertified": true,
"listingCode": "<string>",
"ndcQuantity": 123,
"shippingType": "<string>",
"receivedBy": "<string>",
"pickupPrice": 123,
"pickupWasPurchased": true,
"rating": 123,
"createdByGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isCertified": true,
"hasCertifiedListings": true,
"certificationFileName": "<string>",
"certificationFilePath": "<string>",
"hasListingFromFavoritePharmacy": true,
"isColdChain": true,
"isAssociatedByCurrentAdmin": true,
"hasPendingCashOffer": true,
"hasReturn": true,
"returnStatus": 0,
"activeReturn": {
"returnId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": 0,
"shippedDate": "2023-11-07T05:31:56Z",
"trackingCode": "<string>",
"shippingCarrier": "<string>"
},
"isSellerLicensedInState": true,
"serializationVerified": true,
"populatedByTwoDScan": true
}{
"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
Updates an existing cash offer.
Updates the details of a pending cash offer. Ensures the request exists, is in a pending state, and the user has permission to update it.
Validation Rules
| Field | Required | Type | Rules |
|---|---|---|---|
| BuyingPharmacyNpi | Yes | long | Must be a valid NPI |
| 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: must equal 1. If RequireFullPackage=false: between 0.01 and the drug’s package size |
| RequireSealedPackage | Yes | bool | - |
| RequireOriginalPackage | Yes | bool | - |
| RequireIntactPackageLabel | Yes | bool | - |
| MaxShippingPrice | Conditional | decimal | Required and must be positive when existing cash offer’s 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 |
Note: ShippingRequestMethod cannot be changed during update; MaxShippingPrice validation is based on the existing cash offer’s shipping method.
PUT
/
api
/
v1
/
cash-offers
/
{cashOfferId}
Updates an existing cash offer.
curl --request PUT \
--url https://test-instockrx-api.azurewebsites.net/api/v1/cash-offers/{cashOfferId} \
--header 'Content-Type: application/json' \
--header 'X-INVIEW-AUTH: <api-key>' \
--data '
{
"buyingPharmacyNpi": 1234567890,
"buyingPharmacyMessage": "Would like to buy this med",
"requestedQuantity": 30,
"minimalExpirationDate": "12-31-2026",
"requireFullPackage": true,
"requireSealedPackage": true,
"requireOriginalPackage": true,
"requireIntactPackageLabel": true,
"requireCertificationFile": null,
"price": 125.5,
"shipByDate": "12-15-2026",
"maxShippingPrice": null,
"showOnlyInState": false
}
'const options = {
method: 'PUT',
headers: {'X-INVIEW-AUTH': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
buyingPharmacyNpi: 1234567890,
buyingPharmacyMessage: 'Would like to buy this med',
requestedQuantity: 30,
minimalExpirationDate: '12-31-2026',
requireFullPackage: true,
requireSealedPackage: true,
requireOriginalPackage: true,
requireIntactPackageLabel: true,
requireCertificationFile: null,
price: 125.5,
shipByDate: '12-15-2026',
maxShippingPrice: null,
showOnlyInState: false
})
};
fetch('https://test-instockrx-api.azurewebsites.net/api/v1/cash-offers/{cashOfferId}', 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/{cashOfferId}"
payload = {
"buyingPharmacyNpi": 1234567890,
"buyingPharmacyMessage": "Would like to buy this med",
"requestedQuantity": 30,
"minimalExpirationDate": "12-31-2026",
"requireFullPackage": True,
"requireSealedPackage": True,
"requireOriginalPackage": True,
"requireIntactPackageLabel": True,
"requireCertificationFile": None,
"price": 125.5,
"shipByDate": "12-15-2026",
"maxShippingPrice": None,
"showOnlyInState": False
}
headers = {
"X-INVIEW-AUTH": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"boughtByUser": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"savedByUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cityAndState": "<string>",
"displayName": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"phone": "<string>",
"storeCount": 123,
"acceptedTermsAndConditionsDate": "2023-11-07T05:31:56Z",
"ipAddress": "<string>",
"userName": "<string>",
"userOnboardingStatus": 0,
"userSystemRole": 0,
"dateCreated": "2023-11-07T05:31:56Z",
"dateModified": "2023-11-07T05:31:56Z",
"pharmacyNetworkRole": 0,
"pharmacyNetworkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"buyerPharmacyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"buyerPharmacyName": "<string>",
"buyerPharmacyGln": "<string>",
"buyerPharmacyNationalProviderIdentifier": 123,
"buyersMessage": "<string>",
"buyingPharmacyAddress": {
"city": "<string>",
"line1": "<string>",
"line2": "<string>",
"postalCode": "<string>",
"stateAcronym": "<string>"
},
"buyingPharmacyCityState": "<string>",
"buyingPharmacyName": "<string>",
"buyingPharmacyDBA": "<string>",
"buyingPharmacyPhone": 123,
"buyingPharmacyUser": "<string>",
"buyingPharmacyIsFavorite": true,
"cancellationDescription": "<string>",
"cancellationReason": 1,
"cancelledDate": "2023-11-07T05:31:56Z",
"drugPackageForm": "<string>",
"drugPackageStrength": "<string>",
"expirationDate": "2023-11-07T05:31:56Z",
"fullPackage": true,
"originalPackage": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"inventoryQuantity": 123,
"isExpired": true,
"labelerName": "<string>",
"listingDate": "2023-11-07T05:31:56Z",
"lotNumber": "<string>",
"nationalDrugCode": "<string>",
"nationalDrugCodeNormalized": "<string>",
"drugPackageDescription": "<string>",
"packageDescription": "<string>",
"packageName": "<string>",
"paymentConfirmedDate": "2023-11-07T05:31:56Z",
"pharmacyPaymentAccountPaymentEventAttemptId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 123,
"pricePerQuantity": 123,
"quantity": 123,
"quantityUnitQualifier": "<string>",
"saleConfirmedBySellerDate": "2023-11-07T05:31:56Z",
"sealedPackage": true,
"sellerPaysShipping": true,
"sellerPharmacyCityState": "<string>",
"sellerPharmacyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sellerPharmacySeqId": 123,
"sellerPharmacyName": "<string>",
"sellerPharmacyGln": "<string>",
"sellerPharmacyDBA": "<string>",
"sellerPharmacyNationalProviderIdentifier": 123,
"sellerPharmacyPhone": 123,
"sellerPharmacyIsFavorite": true,
"sellerPharmacyNetworkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sellerBulkSaleType": 0,
"shipmentInfo": {
"dateShippingLabelCreated": "2023-11-07T05:31:56Z",
"shipmentHasBeenPurchased": true,
"shippingCarrier": "<string>",
"trackingCode": "<string>",
"trackingLink": "<string>",
"usingUserDefinedShippingInfo": true,
"deliveryDays": 123,
"service": "<string>",
"shipmentPrice": 123,
"shippingLabelUrl": "<string>"
},
"shippingConfirmDate": "2023-11-07T05:31:56Z",
"shippingReceivedConfirmDate": "2023-11-07T05:31:56Z",
"soldDate": "2023-11-07T05:31:56Z",
"tornPackageLabel": true,
"sellerPharmacyAddress": {
"city": "<string>",
"line1": "<string>",
"line2": "<string>",
"postalCode": "<string>",
"stateAcronym": "<string>"
},
"sellerPharmacyStateLicenseFileName": "<string>",
"drugPackage": {
"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
},
"requiresBuyersConfirmation": true,
"buyingPharmacyAcceptedPriceDate": "2023-11-07T05:31:56Z",
"status": 0,
"paymentStatus": 0,
"isRequestableItem": true,
"nadacPrice": 123,
"nadacPercentage": 123,
"nadacLastUpdated": "2023-11-07T05:31:56Z",
"savingPrice": 123,
"calculatedSavings": 123,
"wholesalePercentage": 123,
"wholesaleSavingPrice": 123,
"gtin": "<string>",
"serialNumber": "<string>",
"shipmentDetailsFromBuyerMatch": true,
"shipmentDetailsFromBuyer": {
"expirationDate": "2023-11-07T05:31:56Z",
"lotNumber": "<string>",
"gtin": "<string>",
"serialNumber": "<string>",
"nationalDrugCode": "<string>"
},
"shipmentConfirmationType": 0,
"shipByDate": "2023-11-07T05:31:56Z",
"branded": true,
"generic": true,
"isGreatDeal": true,
"images": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"savedByUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "<string>"
}
],
"bundleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isPrimary": true,
"shippedPicturePath": "<string>",
"receivedPicturePath": "<string>",
"deliveryStatus": 0,
"stateGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chainExclusiveUntil": "2023-11-07T05:31:56Z",
"resultingMarketplaceListingRequestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evergreenCashOfferPreferencesId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isSellerPharmacyColdChainCertified": true,
"listingCode": "<string>",
"ndcQuantity": 123,
"shippingType": "<string>",
"receivedBy": "<string>",
"pickupPrice": 123,
"pickupWasPurchased": true,
"rating": 123,
"createdByGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isCertified": true,
"hasCertifiedListings": true,
"certificationFileName": "<string>",
"certificationFilePath": "<string>",
"hasListingFromFavoritePharmacy": true,
"isColdChain": true,
"isAssociatedByCurrentAdmin": true,
"hasPendingCashOffer": true,
"hasReturn": true,
"returnStatus": 0,
"activeReturn": {
"returnId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": 0,
"shippedDate": "2023-11-07T05:31:56Z",
"trackingCode": "<string>",
"shippingCarrier": "<string>"
},
"isSellerLicensedInState": true,
"serializationVerified": true,
"populatedByTwoDScan": true
}{
"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.
Path Parameters
The identifier of the cash offer to update.
Body
application/jsonapplication/json-patch+jsontext/jsonapplication/*+json
The updated data for the cash offer.
Maximum string length:
2000Response
OK
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
1, 2, 3, 4, 5, 6 Available options:
0, 1, 2 Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
0, 1, 2, 5, 6, 7, 10 Available options:
0, 1, 2, 3, 4, 5, 6, 7 Show child attributes
Show child attributes
Available options:
0, 1, 2, 3, 4 Show child attributes
Show child attributes
Available options:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Available options:
0, 1, 2, 3, 5, 6, 7 Show child attributes
Show child attributes