Attach photos to a listing
curl --request POST \
--url https://sandbox-api.instockrx.com/marketplace-listings/{id}/photos \
--header 'Content-Type: multipart/form-data' \
--header 'X-InStockRx-Api-Key: <api-key>' \
--form File=@example-file \
--form 'Type=<unknown>'const form = new FormData();
form.append('File', '<string>');
form.append('Type', '<unknown>');
const options = {method: 'POST', headers: {'X-InStockRx-Api-Key': '<api-key>'}};
options.body = form;
fetch('https://sandbox-api.instockrx.com/marketplace-listings/{id}/photos', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox-api.instockrx.com/marketplace-listings/{id}/photos"
files = { "File": ("example-file", open("example-file", "rb")) }
payload = { "Type": "<unknown>" }
headers = {"X-InStockRx-Api-Key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)Marketplace listings
Attach photos to a listing
Scope: listings:write.
Uploads one or more photos as multipart/form-data. This is the companion to the JSON shape of report-not-received: because a multipart body can never match an idempotent replay, send the JSON call with your Idempotency-Key and attach the image here.
POST
/
marketplace-listings
/
{id}
/
photos
Attach photos to a listing
curl --request POST \
--url https://sandbox-api.instockrx.com/marketplace-listings/{id}/photos \
--header 'Content-Type: multipart/form-data' \
--header 'X-InStockRx-Api-Key: <api-key>' \
--form File=@example-file \
--form 'Type=<unknown>'const form = new FormData();
form.append('File', '<string>');
form.append('Type', '<unknown>');
const options = {method: 'POST', headers: {'X-InStockRx-Api-Key': '<api-key>'}};
options.body = form;
fetch('https://sandbox-api.instockrx.com/marketplace-listings/{id}/photos', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox-api.instockrx.com/marketplace-listings/{id}/photos"
files = { "File": ("example-file", open("example-file", "rb")) }
payload = { "Type": "<unknown>" }
headers = {"X-InStockRx-Api-Key": "<api-key>"}
response = requests.post(url, data=payload, files=files, 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.
Response
200
Succeeded. The response shape for this operation is not yet in the published contract — it is live ahead of the document.