Mark read/unread/dismissed
curl --request PATCH \
--url https://sandbox-api.instockrx.com/notifications/{id} \
--header 'Content-Type: application/json' \
--header 'X-InStockRx-Api-Key: <api-key>' \
--header 'X-InStockRx-User-Id: <x-instockrx-user-id>' \
--data '{}'const options = {
method: 'PATCH',
headers: {
'X-InStockRx-User-Id': '<x-instockrx-user-id>',
'X-InStockRx-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('https://sandbox-api.instockrx.com/notifications/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox-api.instockrx.com/notifications/{id}"
payload = {}
headers = {
"X-InStockRx-User-Id": "<x-instockrx-user-id>",
"X-InStockRx-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "listing.purchased",
"state": "unread",
"createdAt": "2023-11-07T05:31:56Z",
"title": "<string>",
"body": "<string>",
"correlationId": "<string>",
"targetResource": {
"kind": "marketplace_listing",
"id": "<string>"
},
"readAt": "2023-11-07T05:31:56Z",
"dismissedAt": "2023-11-07T05:31:56Z"
}Notifications
Mark read/unread/dismissed
Scope: notifications:write.
PATCH
/
notifications
/
{id}
Mark read/unread/dismissed
curl --request PATCH \
--url https://sandbox-api.instockrx.com/notifications/{id} \
--header 'Content-Type: application/json' \
--header 'X-InStockRx-Api-Key: <api-key>' \
--header 'X-InStockRx-User-Id: <x-instockrx-user-id>' \
--data '{}'const options = {
method: 'PATCH',
headers: {
'X-InStockRx-User-Id': '<x-instockrx-user-id>',
'X-InStockRx-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('https://sandbox-api.instockrx.com/notifications/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox-api.instockrx.com/notifications/{id}"
payload = {}
headers = {
"X-InStockRx-User-Id": "<x-instockrx-user-id>",
"X-InStockRx-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "listing.purchased",
"state": "unread",
"createdAt": "2023-11-07T05:31:56Z",
"title": "<string>",
"body": "<string>",
"correlationId": "<string>",
"targetResource": {
"kind": "marketplace_listing",
"id": "<string>"
},
"readAt": "2023-11-07T05:31:56Z",
"dismissedAt": "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.
The ETag from your most recent read of this resource, to avoid overwriting a change someone else made in the meantime. A stale value is 412 stale-resource and nothing is modified. * means "any current version". Omitting it is not an error — it means last write wins.
Examples:
"W/\"AAAAAAAAB9E=\""
"*"
Response
200 - application/json
OK