curl --request POST \
--url https://sandbox-api.instockrx.com/returns/{id}/seller-confirm-receipt \
--header 'Content-Type: application/json' \
--header 'X-InStockRx-Api-Key: <api-key>' \
--data '
{
"received": true,
"notes": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-InStockRx-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({received: true, notes: '<string>'})
};
fetch('https://sandbox-api.instockrx.com/returns/{id}/seller-confirm-receipt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox-api.instockrx.com/returns/{id}/seller-confirm-receipt"
payload = {
"received": True,
"notes": "<string>"
}
headers = {
"X-InStockRx-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "Requested",
"buyingPharmacyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sellingPharmacyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"marketplaceListingId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"listingCode": "<string>",
"drugName": "<string>",
"nationalDrugCode": "<string>",
"price": "42.50",
"quantity": "1",
"returnReason": "<string>",
"restockingFeeResponsibility": "InstockRx",
"restockingFeeAmount": "42.50",
"restockingFeeAmountToBuyer": "42.50",
"restockingFeeAmountToSeller": "42.50",
"achFeeResponsibility": "InstockRx",
"achFeeAmount": "42.50",
"achFeeAmountToBuyer": "42.50",
"achFeeAmountToSeller": "42.50",
"originalShippingFeeAmount": "42.50",
"returnGtin": "<string>",
"returnSerialNumber": "<string>",
"returnLotNumber": "<string>",
"returnPackageDescription": "<string>",
"returnExpirationDate": "2023-11-07T05:31:56Z",
"returnFullPackage": true,
"returnSealedPackage": true,
"returnOriginalPackage": true,
"returnTornPackageLabel": true
}
],
"requestedDate": "2023-11-07T05:31:56Z",
"approvedDate": "2023-11-07T05:31:56Z",
"notApprovedDate": "2023-11-07T05:31:56Z",
"shippedDate": "2023-11-07T05:31:56Z",
"receivedDate": "2023-11-07T05:31:56Z",
"dateShippingLabelCreated": "2023-11-07T05:31:56Z",
"buyingPharmacyName": "<string>",
"buyingPharmacyNpi": "1234567890",
"sellingPharmacyName": "<string>",
"sellingPharmacyNpi": "1234567890",
"carrier": "UPS",
"trackingCode": "<string>",
"shippingLabelUrl": "<string>",
"returnDeliveryStatus": "Unknown",
"shippingFeeResponsibility": "InstockRx",
"originalShippingFeeAmount": "42.50",
"returnShippingFeeAmount": "42.50",
"refundAmountToBuyer": "42.50",
"chargeAmountFromSeller": "42.50",
"adminNote": "<string>"
}{
"type": "https://api.instockrx.com/problems/listing-not-available",
"title": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}Seller confirms (or denies) receipt of the returned items
Scope: returns:write.
curl --request POST \
--url https://sandbox-api.instockrx.com/returns/{id}/seller-confirm-receipt \
--header 'Content-Type: application/json' \
--header 'X-InStockRx-Api-Key: <api-key>' \
--data '
{
"received": true,
"notes": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-InStockRx-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({received: true, notes: '<string>'})
};
fetch('https://sandbox-api.instockrx.com/returns/{id}/seller-confirm-receipt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox-api.instockrx.com/returns/{id}/seller-confirm-receipt"
payload = {
"received": True,
"notes": "<string>"
}
headers = {
"X-InStockRx-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "Requested",
"buyingPharmacyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sellingPharmacyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"marketplaceListingId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"listingCode": "<string>",
"drugName": "<string>",
"nationalDrugCode": "<string>",
"price": "42.50",
"quantity": "1",
"returnReason": "<string>",
"restockingFeeResponsibility": "InstockRx",
"restockingFeeAmount": "42.50",
"restockingFeeAmountToBuyer": "42.50",
"restockingFeeAmountToSeller": "42.50",
"achFeeResponsibility": "InstockRx",
"achFeeAmount": "42.50",
"achFeeAmountToBuyer": "42.50",
"achFeeAmountToSeller": "42.50",
"originalShippingFeeAmount": "42.50",
"returnGtin": "<string>",
"returnSerialNumber": "<string>",
"returnLotNumber": "<string>",
"returnPackageDescription": "<string>",
"returnExpirationDate": "2023-11-07T05:31:56Z",
"returnFullPackage": true,
"returnSealedPackage": true,
"returnOriginalPackage": true,
"returnTornPackageLabel": true
}
],
"requestedDate": "2023-11-07T05:31:56Z",
"approvedDate": "2023-11-07T05:31:56Z",
"notApprovedDate": "2023-11-07T05:31:56Z",
"shippedDate": "2023-11-07T05:31:56Z",
"receivedDate": "2023-11-07T05:31:56Z",
"dateShippingLabelCreated": "2023-11-07T05:31:56Z",
"buyingPharmacyName": "<string>",
"buyingPharmacyNpi": "1234567890",
"sellingPharmacyName": "<string>",
"sellingPharmacyNpi": "1234567890",
"carrier": "UPS",
"trackingCode": "<string>",
"shippingLabelUrl": "<string>",
"returnDeliveryStatus": "Unknown",
"shippingFeeResponsibility": "InstockRx",
"originalShippingFeeAmount": "42.50",
"returnShippingFeeAmount": "42.50",
"refundAmountToBuyer": "42.50",
"chargeAmountFromSeller": "42.50",
"adminNote": "<string>"
}{
"type": "https://api.instockrx.com/problems/listing-not-available",
"title": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}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
OK
Shape aligned with Inview.DTO.ReadMarketplaceListingReturnReadMarketplaceListingReturn
(per the internal swagger; the returns C# source is not in the
2026-05-29 backend dump). Field names match V2 conventions; the
backend's returnId is exposed as id here for consistency with
every other V2 resource.
Lifecycle of a marketplace listing return. These are the names the API accepts on status filters and returns on reads; any other value is refused with 400.
Requested— the buyer has asked; InStockRx has not decidedApproved— approved; the buyer must ship the goods backNotApproved— InStockRx rejected the requestShipped— the buyer has shipped it backNotReceived— the seller reported it as not receivedAwaitingRefundApproval— receipt confirmed (or auto-received). Every settlement leg except the buyer's bank refund has started; that refund waits on an InStockRx approvalCompleted— the refund was approved: the seller's payment is reversed and the buyer refundedRefundRejected— the refund was rejected after review. The legs started at receipt are unwound, the sale stands, and the buyer is not refundedClosedBuyerKeptItem— approved, but the buyer kept the goods. Closes in the seller's favour with no reversal
A return is still open at Requested, Approved, Shipped, NotReceived and AwaitingRefundApproval. The other four are terminal.
Requested, Approved, NotApproved, Shipped, NotReceived, Completed, ClosedBuyerKeptItem, AwaitingRefundApproval, RefundRejected NPI as a fixed-width 10-digit string. v2 treats an NPI as an opaque identifier
rather than a number, consistent with how it handles NDC, GTIN and other
healthcare identifiers. CMS-issued NPIs always start with 1 or 2, so
leading-zero NPIs do not arise in practice, but string typing rules out the
broader class of integer-identifier truncation bugs that v1 was open to.
^\d{10}$"1234567890"
"2987654321"
NPI as a fixed-width 10-digit string. v2 treats an NPI as an opaque identifier
rather than a number, consistent with how it handles NDC, GTIN and other
healthcare identifiers. CMS-issued NPIs always start with 1 or 2, so
leading-zero NPIs do not arise in practice, but string typing rules out the
broader class of integer-identifier truncation bugs that v1 was open to.
^\d{10}$"1234567890"
"2987654321"
Who pays the return-shipping fee.
InstockRx— InStockRx absorbs the feeBuyer— charged to the returning pharmacySeller— charged to the selling pharmacy
There is no Split: an earlier draft of this document listed one, inferred rather
than confirmed. The fee goes to exactly one party.
Confirmed against Inview.Domain/Enum/ReturnFeeResponsibility.cs; the live
document never emits it, so the drift check cannot.
InstockRx, Buyer, Seller