POST
Create a cash offer

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

Body

application/json
nationalDrugCode
string
required
requestedQuantity
string
required

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

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

"1"

"30"

"0.5"

"0.125"

price
string
required

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

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

"42.50"

"0.01"

"1200"

buyingPharmacyMessage
string
Maximum string length: 500
minimalExpirationDate
string<date>
requireFullPackage
boolean
default:false
requireSealedPackage
boolean
default:false
requireOriginalPackage
boolean
default:false
requireIntactPackageLabel
boolean
default:false
shippingRequestMethod
enum<string>

Speed/cost preference for shipping (not "who arranges").

Available options:
Custom,
Cheapest,
Medium,
ASAP
maxShippingPrice
string

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

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

"42.50"

"0.01"

"1200"

shipByDate
string<date>
showOnlyInState
boolean
default:false

Response

Created

A buyer's request to purchase a quantity of an NDC at a stated price. Internally also called a "marketplace listing request" — both names denote the same object.

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

Lifecycle status of a cash offer (a.k.a. marketplace listing request). Once Accepted, the offer spawns a MarketplaceListing whose own lifecycle takes over — there is no terminal "Completed" status.

Available options:
Pending,
Declined,
Cancelled,
Accepted,
Expired,
Paused
nationalDrugCode
string
required
buyingPharmacyId
string<uuid>
required
requestedQuantity
string
required

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

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

"1"

"30"

"0.5"

"0.125"

price
string
required

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

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

"42.50"

"0.01"

"1200"

nationalDrugCodeNormalized
string
labelerName
string
packageName
string
drugPackageForm
string
drugPackageStrength
string
quantityUnitQualifier
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
buyingPharmacyMessage
string
sellingPharmacyId
string<uuid>
sellingPharmacyName
string
sellingPharmacyDBA
string
sellingPharmacyNpi
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"

sellingPharmacyPhone
string
sellingPharmacyAddress
object
sellingPharmacyMessage
string

Seller's response message (set on accept/decline).

sellingPharmacyResponseDate
string<date-time>
minimalExpirationDate
string<date>
requireFullPackage
boolean
requireSealedPackage
boolean
requireOriginalPackage
boolean
requireIntactPackageLabel
boolean
shippingRequestMethod
enum<string>

Speed/cost preference for shipping (not "who arranges").

Available options:
Custom,
Cheapest,
Medium,
ASAP
maxShippingPrice
string

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

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

"42.50"

"0.01"

"1200"

shipByDate
string<date>
showOnlyInState
boolean
resultingMarketplaceListingId
string<uuid>

Populated when the offer was accepted and produced a listing.

evergreenCashOfferPreferenceId
string<uuid>

Set when this offer was auto-created from an evergreen preference.

createdAt
string<date-time>
updatedAt
string<date-time>