Deletes a pending cash offer.
curl --request DELETE \
--url https://test-instockrx-api.azurewebsites.net/api/v1/cash-offers/{id} \
--header 'Content-Type: application/json' \
--header 'X-INVIEW-AUTH: <api-key>' \
--data '
{
"cancellationMessage": "cancelled via API",
"currentPharmacyNpi": 1234567890
}
'const options = {
method: 'DELETE',
headers: {'X-INVIEW-AUTH': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({cancellationMessage: 'cancelled via API', currentPharmacyNpi: 1234567890})
};
fetch('https://test-instockrx-api.azurewebsites.net/api/v1/cash-offers/{id}', 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/{id}"
payload = {
"cancellationMessage": "cancelled via API",
"currentPharmacyNpi": 1234567890
}
headers = {
"X-INVIEW-AUTH": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cancellationMessage": "<string>",
"cancelledAt": "2023-11-07T05:31:56Z"
}{
"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
Deletes a pending cash offer.
Cancels a pending cash offer. Cash offer must be in Pending status.
Validation Rules
| Field | Required | Type | Rules |
|---|---|---|---|
| id (route) | Yes | Guid | Must not be empty. Cash offer must exist and be in Pending status |
| CurrentPharmacyNpi | Yes | long | Must be a valid NPI. Must be the buying pharmacy that created the cash offer |
| CancellationMessage | No | string | Reason for cancellation |
DELETE
/
api
/
v1
/
cash-offers
/
{id}
Deletes a pending cash offer.
curl --request DELETE \
--url https://test-instockrx-api.azurewebsites.net/api/v1/cash-offers/{id} \
--header 'Content-Type: application/json' \
--header 'X-INVIEW-AUTH: <api-key>' \
--data '
{
"cancellationMessage": "cancelled via API",
"currentPharmacyNpi": 1234567890
}
'const options = {
method: 'DELETE',
headers: {'X-INVIEW-AUTH': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({cancellationMessage: 'cancelled via API', currentPharmacyNpi: 1234567890})
};
fetch('https://test-instockrx-api.azurewebsites.net/api/v1/cash-offers/{id}', 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/{id}"
payload = {
"cancellationMessage": "cancelled via API",
"currentPharmacyNpi": 1234567890
}
headers = {
"X-INVIEW-AUTH": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cancellationMessage": "<string>",
"cancelledAt": "2023-11-07T05:31:56Z"
}{
"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 delete.
Body
application/jsonapplication/json-patch+jsontext/jsonapplication/*+json
The request model containing the pharmacy NPI and optional cancellation message.