POST
Seller confirms shipment of a purchased listing

Authorizations

X-InStockRx-Api-Key
string
header
required

Scoped partner API key. Send the whole key, e.g. ik_live_a1b2c3…, on every request.

Headers

X-Pharmacy-Id
string<uuid>

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.

Idempotency-Key
string

Makes this request safe to retry. A retry carrying the same key replays the original response rather than acting twice, and is marked X-Idempotent-Replay: true. The same key with a different body is 409. Records are kept for 24 hours.

Required string length: 1 - 255

Path Parameters

id
string<uuid>
required

Body

application/json

Body for POST /marketplace-listings/{id}/ship. DSCSA pedigree fields are required. If the bundle is cold-chain, ship-day must be Mon–Thu.

gtin
string
required

DSCSA pedigree — 14-digit GTIN.

Pattern: ^\d{14}$
serialNumber
string
required
Required string length: 1 - 64
lotNumber
string
required
Required string length: 1 - 64
expirationDate
string<date>
required
sellerNotes
string
Maximum string length: 500

Response

OK

id
string<uuid>
required
status
enum<string>
required

Lifecycle of a marketplace listing. V1 values 3 (PaymentConfirmed) and 4 (SaleConfirmed) are commented out in C# and excluded here. The wire value ShippingReceivedNotConfirmed corresponds to the C# member ShippingNotReceived (overridden via [EnumMember(Value=…)]).

Available options:
Pending,
Purchased,
Cancelled,
ShippingConfirmed,
ShippingReceivedConfirmed,
ShippingReceivedNotConfirmed,
Paused
nationalDrugCode
string
required
sellerPharmacyId
string<uuid>
required
deliveryStatus
enum<string>
Available options:
Unknown,
PreTransit,
InTransit,
OutForDelivery,
Delivered,
AvailableForPickup,
ReturnToSender,
Failure,
Cancelled,
Error
paymentStatus
enum<string>

Where a listing's payment has got to. Confirmed against Inview.Domain/Enum/MarketplaceListingPaymentStatus.cs; the live document never emits this enum, because it appears only on responses, so the drift check cannot confirm it and a reader has to.

Available options:
NotInitiated,
Pending,
PaymentConfirmed,
PaymentSentToSeller,
SellerReceivedPayment,
Refunded,
FailedDueToInsufficientFunds,
Cancelled
nationalDrugCodeNormalized
string
labelerName
string
packageName
string
drugPackageForm
string
drugPackageStrength
string
quantityUnitQualifier
string
price
string

USD amount as a decimal string, up to two decimal places.

Pattern: ^-?\d+(\.\d{1,2})?$
Examples:

"42.50"

"0.01"

"1200"

pricePerQuantity
string

USD amount as a decimal string, up to two decimal places.

Pattern: ^-?\d+(\.\d{1,2})?$
Examples:

"42.50"

"0.01"

"1200"

quantity
string

Non-negative decimal quantity (up to 6 decimal places).

Pattern: ^\d+(\.\d{1,6})?$
Examples:

"1"

"30"

"0.5"

"0.125"

inventoryQuantity
string

Non-negative decimal quantity (up to 6 decimal places).

Pattern: ^\d+(\.\d{1,6})?$
Examples:

"1"

"30"

"0.5"

"0.125"

expirationDate
string<date>
lotNumber
string
gtin
string
serialNumber
string
fullPackage
boolean
originalPackage
boolean
sealedPackage
boolean
tornPackageLabel
boolean
additionalPackageNotes
string
branded
boolean
generic
boolean
sellerPharmacyName
string
sellerPharmacyDBA
string
sellerPharmacyNpi
string

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.

Pattern: ^\d{10}$
Examples:

"1234567890"

"2987654321"

sellerPharmacyPhone
string
sellerPharmacyAddress
object
buyerPharmacyName
string
buyingPharmacyName
string
buyingPharmacyDBA
string
buyingPharmacyNpi
string

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.

Pattern: ^\d{10}$
Examples:

"1234567890"

"2987654321"

buyingPharmacyPhone
string
buyingPharmacyAddress
object
buyersMessage
string
listingDate
string<date-time>
soldDate
string<date-time>
shippingConfirmDate
string<date-time>
shippingReceivedConfirmDate
string<date-time>
paymentConfirmedDate
string<date-time>
shipByDate
string<date>
cancelledDate
string<date-time>
cancellationReason
enum<string>

On reads, any of the eight values may appear — ReturnCompleted when a completed return cancelled the sale, ShipByDateExpired when the seller missed the ship-by date, and DuplicateOfAcceptedCashOffer when the listing was cancelled as a duplicate of a cash offer that had already been accepted, and AdminRefund when an InStockRx admin refunded the order after the seller had already been paid.

On writes (POST /marketplace-listings/{id}/cancel) only SellerCancelled and BuyerCancelled are accepted, and the one you send must match the side you are acting as: a seller sends SellerCancelled, a buyer sends BuyerCancelled. The auto-trigger values are reserved for system use. Anything else is 400 invalid-cancellation-reason.

Choosing the right value matters beyond bookkeeping: BuyerCancelled on a listing that is still Purchased makes the backend auto-relist the item under the same seller. A seller-initiated cancel mislabelled as BuyerCancelled would spawn an unwanted replacement listing. After the listing is marked shipped no cancel relists, whichever reason is used.

Available options:
SellerCancelled,
PharmacyInventoryQuantityAutoTrigger,
AutomaticDrugExpired,
BuyerCancelled,
ReturnCompleted,
ShipByDateExpired,
DuplicateOfAcceptedCashOffer,
AdminRefund
cancellationDescription
string
receivedDetails
object

What the buyer reported having received. null until confirm-receipt is called with a non-empty receivedDetails.

receivedDetailsMatch
boolean

Server-computed comparison of receivedDetails against the seller-declared pedigree on the listing. true if every field the buyer supplied agreed with the listing; false if any disagreed; null if no comparison was performed (no receivedDetails supplied or confirmationType was NotChecked / Skipped). Drives whether the seller earns a positive rating bump on receipt.

receivedDetailsConfirmationType
enum<string>

How the buyer obtained the values in receivedDetails.

Available options:
NotChecked,
Skipped,
Scanned,
Manual,
AutoFilled