Finalize a draft listing
curl --request POST \
--url https://sandbox-api.instockrx.com/draft-listings/{id}/finalize \
--header 'Content-Type: application/json-patch+json' \
--header 'X-InStockRx-Api-Key: <api-key>' \
--data '"<unknown>"'const options = {
method: 'POST',
headers: {
'X-InStockRx-Api-Key': '<api-key>',
'Content-Type': 'application/json-patch+json'
},
body: JSON.stringify('<unknown>')
};
fetch('https://sandbox-api.instockrx.com/draft-listings/{id}/finalize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox-api.instockrx.com/draft-listings/{id}/finalize"
payload = "<unknown>"
headers = {
"X-InStockRx-Api-Key": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Draft listings
Finalize a draft listing
Scope: listings:write.
Turns a draft into a live marketplace listing. The draft must carry everything a marketplace listing requires by this point, so the listing rules apply here rather than at draft creation.
POST
/
draft-listings
/
{id}
/
finalize
Finalize a draft listing
curl --request POST \
--url https://sandbox-api.instockrx.com/draft-listings/{id}/finalize \
--header 'Content-Type: application/json-patch+json' \
--header 'X-InStockRx-Api-Key: <api-key>' \
--data '"<unknown>"'const options = {
method: 'POST',
headers: {
'X-InStockRx-Api-Key': '<api-key>',
'Content-Type': 'application/json-patch+json'
},
body: JSON.stringify('<unknown>')
};
fetch('https://sandbox-api.instockrx.com/draft-listings/{id}/finalize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox-api.instockrx.com/draft-listings/{id}/finalize"
payload = "<unknown>"
headers = {
"X-InStockRx-Api-Key": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)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.
Body
application/json-patch+jsonapplication/jsontext/jsonapplication/*+json
The body is of type any.
Response
200
Succeeded. The response shape for this operation is not yet in the published contract — it is live ahead of the document.