Transitions the listing from Pending to Purchased. Side effects:
Initiates a buyer→internal funds transfer on the chosen payment method.
Creates a new bundle, or joins an existing Pending bundle (same seller/buyer) if bundleId is supplied.
Purchases an EasyPost label if rateId is supplied; otherwise records the manual carrier / trackingCode / shippingLabelUrl.
Use If-Match (ETag from GET /marketplace-listings/{id}) to guard
against a race where the listing changed between when the buyer saw it
and the purchase call. Mismatch returns 412 Precondition Failed
(problem.type = "stale-resource").
Cold-chain rules: max 6 cold-chain items per bundle; adding a 7th forces
a new bundle. Cold-chain shipments cannot ship Fri–Sun (enforced when
the seller calls /ship).
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
If-Match
string
The ETag from your most recent read of this resource, to avoid overwriting a change someone else made in the meantime. A stale value is 412 stale-resource and nothing is modified. * means "any current version". Omitting it is not an error — it means last write wins.
Examples:
"W/\"AAAAAAAAB9E=\""
"*"
Path Parameters
id
string<uuid>
required
Body
application/json
Body for POST /marketplace-listings/{id}/purchase. Pair with If-Match
(ETag from a recent GET on the listing) to guard against concurrent
edits — mismatch returns 412 Precondition Failed.
paymentMethod
object
required
Tagged reference to a stored payment method. Today only type = Dwolla
is accepted on purchase calls. Forward-compatible: if a new rail is
added in a future minor revision, partners that hardcode Dwolla will
keep working; partners that surface the rail to their users can add it
without an SDK upgrade.
Show child attributes
bundleId
string<uuid>
Join an existing Pending bundle from the same seller. Omit to let
the system create a new bundle. If supplied and the bundle would
exceed the cold-chain cap, the server returns
409 bundle-full-cold-chain (the partner may retry without
bundleId to land in a fresh bundle).
shippingSelection
EasyPost-managed · object
Exactly one shape must be supplied. EasyPost-managed uses a rateId
from a prior shipping-rates call; manual lets the buyer supply their
own carrier and tracking number.
EasyPost-managed
Buyer-supplied tracking (manual)
Show child attributes
shipByDate
string<date>
Buyer's requested ship-by date. Must be in the future.
buyersMessage
string
Maximum string length: 500
referralCode
string
Maximum string length: 64
Response
OK — listing is now Purchased; response includes the listing and the bundle it landed in.
listing
object
required
Show child attributes
bundle
object
required
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"InStockRx API","description":"Partner API for the InStockRx pharmacy marketplace.","colors":{"primary":"#EA6318","light":"#F58A4B","dark":"#B54B12"},"logo":{"light":"/logo/light.svg","dark":"/logo/dark.svg","href":"https://www.instockrx.com"},"favicon":"/favicon.svg","api":{"playground":{"display":"interactive"},"examples":{"languages":["bash","javascript","python"]}},"navbar":{"links":[{"href":"mailto:info@instockrx.com","label":"Support"}],"primary":{"type":"button","label":"Get sandbox access","href":"https://sandbox.instockrx.com"}},"footer":{"socials":{"website":"https://www.instockrx.com"}},"integrations":{"telemetry":{"enabled":false}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"hasAudioNarration":false,"customDomains":[],"gitSource":{"type":"github","owner":"local","repo":"local","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"local","isBase":true},"buildId":"local","clientVersion":"0.0.4342"},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false,"isLoggedInCli":false,"mintExport":{}},"customCss":[]}
{"page":{"pagePath":"v2/api-reference/marketplace-listings/buyer-purchases-a-single-marketplace-listing","slug":"/v2/api-reference/marketplace-listings/buyer-purchases-a-single-marketplace-listing","pageMetadata":{"openapi":"/spec/v2.json post /marketplace-listings/{id}/purchase","description":"**Scope:** `listings:write`.\n\nTransitions the listing from `Pending` to `Purchased`. Side effects:\n- Initiates a buyer→internal funds transfer on the chosen payment method.\n- Creates a new bundle, or joins an existing `Pending` bundle (same seller/buyer) if `bundleId` is supplied.\n- Purchases an EasyPost label if `rateId` is supplied; otherwise records the manual `carrier` / `trackingCode` / `shippingLabelUrl`.\n\nUse `If-Match` (ETag from `GET /marketplace-listings/{id}`) to guard\nagainst a race where the listing changed between when the buyer saw it\nand the purchase call. Mismatch returns `412 Precondition Failed`\n(`problem.type = \"stale-resource\"`).\n\nCold-chain rules: max 6 cold-chain items per bundle; adding a 7th forces\na new bundle. Cold-chain shipments cannot ship Fri–Sun (enforced when\nthe seller calls `/ship`).\n","href":"/v2/api-reference/marketplace-listings/buyer-purchases-a-single-marketplace-listing","title":"Buyer purchases a single marketplace listing"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n li: \"li\",\n p: \"p\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Scope:\"\n }), \" \", _jsx(_components.code, {\n children: \"listings:write\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Transitions the listing from \", _jsx(_components.code, {\n children: \"Pending\"\n }), \" to \", _jsx(_components.code, {\n children: \"Purchased\"\n }), \". Side effects:\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsx(_components.li, {\n children: \"Initiates a buyer→internal funds transfer on the chosen payment method.\"\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Creates a new bundle, or joins an existing \", _jsx(_components.code, {\n children: \"Pending\"\n }), \" bundle (same seller/buyer) if \", _jsx(_components.code, {\n children: \"bundleId\"\n }), \" is supplied.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Purchases an EasyPost label if \", _jsx(_components.code, {\n children: \"rateId\"\n }), \" is supplied; otherwise records the manual \", _jsx(_components.code, {\n children: \"carrier\"\n }), \" / \", _jsx(_components.code, {\n children: \"trackingCode\"\n }), \" / \", _jsx(_components.code, {\n children: \"shippingLabelUrl\"\n }), \".\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Use \", _jsx(_components.code, {\n children: \"If-Match\"\n }), \" (ETag from \", _jsx(_components.code, {\n children: \"GET /marketplace-listings/{id}\"\n }), \") to guard\\nagainst a race where the listing changed between when the buyer saw it\\nand the purchase call. Mismatch returns \", _jsx(_components.code, {\n children: \"412 Precondition Failed\"\n }), \"\\n(\", _jsx(_components.code, {\n children: \"problem.type = \\\"stale-resource\\\"\"\n }), \").\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Cold-chain rules: max 6 cold-chain items per bundle; adding a 7th forces\\na new bundle. Cold-chain shipments cannot ship Fri–Sun (enforced when\\nthe seller calls \", _jsx(_components.code, {\n children: \"/ship\"\n }), \").\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"openapi":"/spec/v2.json post /marketplace-listings/{id}/purchase","description":"**Scope:** `listings:write`.\n\nTransitions the listing from `Pending` to `Purchased`. Side effects:\n- Initiates a buyer→internal funds transfer on the chosen payment method.\n- Creates a new bundle, or joins an existing `Pending` bundle (same seller/buyer) if `bundleId` is supplied.\n- Purchases an EasyPost label if `rateId` is supplied; otherwise records the manual `carrier` / `trackingCode` / `shippingLabelUrl`.\n\nUse `If-Match` (ETag from `GET /marketplace-listings/{id}`) to guard\nagainst a race where the listing changed between when the buyer saw it\nand the purchase call. Mismatch returns `412 Precondition Failed`\n(`problem.type = \"stale-resource\"`).\n\nCold-chain rules: max 6 cold-chain items per bundle; adding a 7th forces\na new bundle. Cold-chain shipments cannot ship Fri–Sun (enforced when\nthe seller calls `/ship`).\n","href":"/v2/api-reference/marketplace-listings/buyer-purchases-a-single-marketplace-listing","title":"Buyer purchases a single marketplace listing"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Marketplace Listings"],"operationId":"purchaseMarketplaceListing","summary":"Buyer purchases a single marketplace listing","description":"**Scope:** `listings:write`.\n\nTransitions the listing from `Pending` to `Purchased`. Side effects:\n- Initiates a buyer→internal funds transfer on the chosen payment method.\n- Creates a new bundle, or joins an existing `Pending` bundle (same seller/buyer) if `bundleId` is supplied.\n- Purchases an EasyPost label if `rateId` is supplied; otherwise records the manual `carrier` / `trackingCode` / `shippingLabelUrl`.\n\nUse `If-Match` (ETag from `GET /marketplace-listings/{id}`) to guard\nagainst a race where the listing changed between when the buyer saw it\nand the purchase call. Mismatch returns `412 Precondition Failed`\n(`problem.type = \"stale-resource\"`).\n\nCold-chain rules: max 6 cold-chain items per bundle; adding a 7th forces\na new bundle. Cold-chain shipments cannot ship Fri–Sun (enforced when\nthe seller calls `/ship`).\n","security":["f842c669-6c72-456d-8d3c-3eb6aea5a4ea"],"parameters":["f4ef6ad2-8a10-46a3-bb13-af9094285c9d","d8a72adf-6ec4-485a-afa4-1c88de3972d5","5e9967a3-9f88-49e6-aa4c-eaed26d7f611","08a40af8-b9c9-4223-a6ba-193fa050127b"],"requestBody":"e3ef13d9-cfae-4d40-aec7-add62b3d6796","responses":{"200":"1bfe44cb-1a16-4080-bf6e-1efbc06203b2","400":"84a1c4cc-7c97-4cc6-9d79-f72423780cbd","404":"df10dba2-d478-4d8a-8d55-2b00b00fe9a0","409":"825f4864-9397-4e35-8ca6-e91b95ac0291","412":"a4ce973b-fd22-4720-a422-103a615cd063","422":"3eedb5ca-b459-4432-8a42-5777dee24cda"},"method":"post","type":"path","servers":["3c745605-736a-4471-bbcd-908508c3013a","3efbdca7-d8e5-4edb-9fb3-d74a49562593"],"path":"/marketplace-listings/{id}/purchase","baseUrlOptions":["https://sandbox-api.instockrx.com","https://api.instockrx.com"],"title":"Buyer purchases a single marketplace listing","codeSamples":[],"requestExampleLanguages":["bash","javascript","python"],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"f4ef6ad2-8a10-46a3-bb13-af9094285c9d":{"in":"header","name":"X-Pharmacy-Id","required":false,"description":"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.","schema":{"type":"string","format":"uuid","isRequired":false,"description":"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.","uniqueKey":"","typeLabel":"string\u003cuuid>"}},"d8a72adf-6ec4-485a-afa4-1c88de3972d5":{"in":"header","name":"Idempotency-Key","required":false,"description":"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.","schema":{"type":"string","minLength":1,"maxLength":255,"isRequired":false,"description":"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.","uniqueKey":"","typeLabel":"string"}},"5e9967a3-9f88-49e6-aa4c-eaed26d7f611":{"in":"header","name":"If-Match","required":false,"description":"The `ETag` from your most recent read of this resource, to avoid overwriting a change someone else made in the meantime. A stale value is `412 stale-resource` and nothing is modified. `*` means \"any current version\". Omitting it is not an error — it means last write wins.","schema":{"type":"string","examples":["W/\"AAAAAAAAB9E=\"","*"],"isRequired":false,"description":"The `ETag` from your most recent read of this resource, to avoid overwriting a change someone else made in the meantime. A stale value is `412 stale-resource` and nothing is modified. `*` means \"any current version\". Omitting it is not an error — it means last write wins.","uniqueKey":"","typeLabel":"string"}},"08a40af8-b9c9-4223-a6ba-193fa050127b":{"in":"header","name":"Idempotency-Key","required":false,"description":"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.","schema":{"type":"string","minLength":1,"maxLength":255,"isRequired":false,"description":"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.","uniqueKey":"","typeLabel":"string"}},"7265bec6-0b5f-4977-8fb4-75d378531935":{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"","typeLabel":"string\u003cuuid>"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Body for `POST /marketplace-listings/{id}/purchase`. Pair with `If-Match`\n(ETag from a recent GET on the listing) to guard against concurrent\nedits — mismatch returns `412 Precondition Failed`.\n","required":["paymentMethod"],"properties":{"paymentMethod":{"type":"object","description":"Tagged reference to a stored payment method. Today only `type = Dwolla`\nis accepted on purchase calls. Forward-compatible: if a new rail is\nadded in a future minor revision, partners that hardcode `Dwolla` will\nkeep working; partners that surface the rail to their users can add it\nwithout an SDK upgrade.\n","required":["type","id"],"properties":{"type":{"type":"string","description":"Discriminator for `PaymentMethod`. V2 surfaces `Dwolla` today; `Orum`\nand `Stripe` are reserved for future minor revisions (non-breaking\nadditions to this enum).\n","enum":["Dwolla"],"isRequired":true,"uniqueKey":"paymentMethod.type","typeLabel":"enum\u003cstring>"},"id":{"type":"string","format":"uuid","description":"ID from `GET /payment-methods`.","isRequired":true,"uniqueKey":"paymentMethod.id","typeLabel":"string\u003cuuid>"}},"isRequired":true,"uniqueKey":"paymentMethod","typeLabel":"object"},"bundleId":{"type":"string","format":"uuid","description":"Join an existing `Pending` bundle from the same seller. Omit to let\nthe system create a new bundle. If supplied and the bundle would\nexceed the cold-chain cap, the server returns\n`409 bundle-full-cold-chain` (the partner may retry without\n`bundleId` to land in a fresh bundle).\n","uniqueKey":"bundleId","typeLabel":"string\u003cuuid>"},"shippingSelection":{"oneOf":[{"type":"object","title":"EasyPost-managed","description":"Exactly one shape must be supplied. EasyPost-managed uses a `rateId`\nfrom a prior `shipping-rates` call; manual lets the buyer supply their\nown carrier and tracking number.\n","required":["rateId","carrier"],"properties":{"rateId":{"type":"string","description":"From `POST /marketplace-listings/{id}/shipping-rates`.","isRequired":true,"uniqueKey":"shippingSelection.oneOf.0.rateId","typeLabel":"string"},"carrier":{"type":"string","examples":["UPS","FedEx","USPS"],"isRequired":true,"uniqueKey":"shippingSelection.oneOf.0.carrier","typeLabel":"string"}},"uniqueKey":"shippingSelection.oneOf.0","typeLabel":"EasyPost-managed · object"},{"type":"object","title":"Buyer-supplied tracking (manual)","description":"Exactly one shape must be supplied. EasyPost-managed uses a `rateId`\nfrom a prior `shipping-rates` call; manual lets the buyer supply their\nown carrier and tracking number.\n","required":["carrier","trackingCode"],"properties":{"carrier":{"type":"string","isRequired":true,"uniqueKey":"shippingSelection.oneOf.1.carrier","typeLabel":"string"},"trackingCode":{"type":"string","minLength":4,"maxLength":64,"isRequired":true,"uniqueKey":"shippingSelection.oneOf.1.trackingCode","typeLabel":"string"},"shippingLabelUrl":{"type":"string","format":"uri","uniqueKey":"shippingSelection.oneOf.1.shippingLabelUrl","typeLabel":"string\u003curi>"}},"uniqueKey":"shippingSelection.oneOf.1","typeLabel":"Buyer-supplied tracking (manual) · object"}],"uniqueKey":"shippingSelection","typeLabel":"EasyPost-managed · object | Buyer-supplied tracking (manual) · object"},"shipByDate":{"type":"string","format":"date","description":"Buyer's requested ship-by date. Must be in the future.","uniqueKey":"shipByDate","typeLabel":"string\u003cdate>"},"buyersMessage":{"type":"string","maxLength":500,"uniqueKey":"buyersMessage","typeLabel":"string"},"referralCode":{"type":"string","maxLength":64,"uniqueKey":"referralCode","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"paymentMethod":{"type":"Dwolla","id":"3c90c3cc-0d44-4b50-8888-8dd25736052a"},"bundleId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","shippingSelection":{"rateId":"\u003cstring>","carrier":"UPS"},"shipByDate":"2023-12-25","buyersMessage":"\u003cstring>","referralCode":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"1bfe44cb-1a16-4080-bf6e-1efbc06203b2":{"description":"OK — listing is now `Purchased`; response includes the listing and the bundle it landed in.","content":{"application/json":{"schema":{"type":"object","required":["listing","bundle"],"properties":{"listing":{"type":"object","required":["id","status","sellerPharmacyId","nationalDrugCode"],"properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"listing.id","typeLabel":"string\u003cuuid>"},"status":{"type":"string","description":"Lifecycle of a marketplace listing. V1 values 3 (PaymentConfirmed) and\n4 (SaleConfirmed) are commented out in C# and excluded here.\nThe wire value `ShippingReceivedNotConfirmed` corresponds to the C#\nmember `ShippingNotReceived` (overridden via `[EnumMember(Value=…)]`).\n","enum":["Pending","Purchased","Cancelled","ShippingConfirmed","ShippingReceivedConfirmed","ShippingReceivedNotConfirmed","Paused"],"isRequired":true,"uniqueKey":"listing.status","typeLabel":"enum\u003cstring>"},"nationalDrugCode":{"type":"string","isRequired":true,"uniqueKey":"listing.nationalDrugCode","typeLabel":"string"},"sellerPharmacyId":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"listing.sellerPharmacyId","typeLabel":"string\u003cuuid>"},"deliveryStatus":{"type":"string","enum":["Unknown","PreTransit","InTransit","OutForDelivery","Delivered","AvailableForPickup","ReturnToSender","Failure","Cancelled","Error"],"uniqueKey":"listing.deliveryStatus","typeLabel":"enum\u003cstring>"},"paymentStatus":{"type":"string","description":"Where a listing's payment has got to. Confirmed against\n`Inview.Domain/Enum/MarketplaceListingPaymentStatus.cs`; the live document never\nemits this enum, because it appears only on responses, so the drift check cannot\nconfirm it and a reader has to.\n","enum":["NotInitiated","Pending","PaymentConfirmed","PaymentSentToSeller","SellerReceivedPayment","Refunded","FailedDueToInsufficientFunds","Cancelled"],"uniqueKey":"listing.paymentStatus","typeLabel":"enum\u003cstring>"},"nationalDrugCodeNormalized":{"type":"string","uniqueKey":"listing.nationalDrugCodeNormalized","typeLabel":"string"},"labelerName":{"type":"string","uniqueKey":"listing.labelerName","typeLabel":"string"},"packageName":{"type":"string","uniqueKey":"listing.packageName","typeLabel":"string"},"drugPackageForm":{"type":"string","uniqueKey":"listing.drugPackageForm","typeLabel":"string"},"drugPackageStrength":{"type":"string","uniqueKey":"listing.drugPackageStrength","typeLabel":"string"},"quantityUnitQualifier":{"type":"string","uniqueKey":"listing.quantityUnitQualifier","typeLabel":"string"},"price":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,2})?$","description":"USD amount as a decimal string, up to two decimal places.","examples":["42.50","0.01","1200"],"uniqueKey":"listing.price","typeLabel":"string"},"pricePerQuantity":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,2})?$","description":"USD amount as a decimal string, up to two decimal places.","examples":["42.50","0.01","1200"],"uniqueKey":"listing.pricePerQuantity","typeLabel":"string"},"quantity":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Non-negative decimal quantity (up to 6 decimal places).","examples":["1","30","0.5","0.125"],"uniqueKey":"listing.quantity","typeLabel":"string"},"inventoryQuantity":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Non-negative decimal quantity (up to 6 decimal places).","examples":["1","30","0.5","0.125"],"uniqueKey":"listing.inventoryQuantity","typeLabel":"string"},"expirationDate":{"type":"string","format":"date","uniqueKey":"listing.expirationDate","typeLabel":"string\u003cdate>"},"lotNumber":{"type":"string","uniqueKey":"listing.lotNumber","typeLabel":"string"},"gtin":{"type":"string","uniqueKey":"listing.gtin","typeLabel":"string"},"serialNumber":{"type":"string","uniqueKey":"listing.serialNumber","typeLabel":"string"},"fullPackage":{"type":"boolean","uniqueKey":"listing.fullPackage","typeLabel":"boolean"},"originalPackage":{"type":"boolean","uniqueKey":"listing.originalPackage","typeLabel":"boolean"},"sealedPackage":{"type":"boolean","uniqueKey":"listing.sealedPackage","typeLabel":"boolean"},"tornPackageLabel":{"type":"boolean","uniqueKey":"listing.tornPackageLabel","typeLabel":"boolean"},"additionalPackageNotes":{"type":"string","uniqueKey":"listing.additionalPackageNotes","typeLabel":"string"},"branded":{"type":"boolean","uniqueKey":"listing.branded","typeLabel":"boolean"},"generic":{"type":"boolean","uniqueKey":"listing.generic","typeLabel":"boolean"},"sellerPharmacyName":{"type":"string","uniqueKey":"listing.sellerPharmacyName","typeLabel":"string"},"sellerPharmacyDBA":{"type":"string","uniqueKey":"listing.sellerPharmacyDBA","typeLabel":"string"},"sellerPharmacyNpi":{"type":"string","pattern":"^\\d{10}$","description":"NPI as a fixed-width 10-digit string. v2 treats an NPI as an opaque identifier\nrather than a number, consistent with how it handles NDC, GTIN and other\nhealthcare identifiers. CMS-issued NPIs always start with `1` or `2`, so\nleading-zero NPIs do not arise in practice, but string typing rules out the\nbroader class of integer-identifier truncation bugs that v1 was open to.\n","examples":["1234567890","2987654321"],"uniqueKey":"listing.sellerPharmacyNpi","typeLabel":"string"},"sellerPharmacyPhone":{"type":"string","uniqueKey":"listing.sellerPharmacyPhone","typeLabel":"string"},"sellerPharmacyAddress":{"type":"object","properties":{"line1":{"type":"string","uniqueKey":"listing.sellerPharmacyAddress.line1","typeLabel":"string"},"line2":{"type":"string","uniqueKey":"listing.sellerPharmacyAddress.line2","typeLabel":"string"},"city":{"type":"string","uniqueKey":"listing.sellerPharmacyAddress.city","typeLabel":"string"},"stateAcronym":{"type":"string","pattern":"^[A-Z]{2}$","uniqueKey":"listing.sellerPharmacyAddress.stateAcronym","typeLabel":"string"},"postalCode":{"type":"string","pattern":"^\\d{5}(-\\d{4})?$","uniqueKey":"listing.sellerPharmacyAddress.postalCode","typeLabel":"string"}},"uniqueKey":"listing.sellerPharmacyAddress","typeLabel":"object"},"buyerPharmacyName":{"type":"string","uniqueKey":"listing.buyerPharmacyName","typeLabel":"string"},"buyingPharmacyName":{"type":"string","uniqueKey":"listing.buyingPharmacyName","typeLabel":"string"},"buyingPharmacyDBA":{"type":"string","uniqueKey":"listing.buyingPharmacyDBA","typeLabel":"string"},"buyingPharmacyNpi":{"type":"string","pattern":"^\\d{10}$","description":"NPI as a fixed-width 10-digit string. v2 treats an NPI as an opaque identifier\nrather than a number, consistent with how it handles NDC, GTIN and other\nhealthcare identifiers. CMS-issued NPIs always start with `1` or `2`, so\nleading-zero NPIs do not arise in practice, but string typing rules out the\nbroader class of integer-identifier truncation bugs that v1 was open to.\n","examples":["1234567890","2987654321"],"uniqueKey":"listing.buyingPharmacyNpi","typeLabel":"string"},"buyingPharmacyPhone":{"type":"string","uniqueKey":"listing.buyingPharmacyPhone","typeLabel":"string"},"buyingPharmacyAddress":{"type":"object","properties":{"line1":{"type":"string","uniqueKey":"listing.buyingPharmacyAddress.line1","typeLabel":"string"},"line2":{"type":"string","uniqueKey":"listing.buyingPharmacyAddress.line2","typeLabel":"string"},"city":{"type":"string","uniqueKey":"listing.buyingPharmacyAddress.city","typeLabel":"string"},"stateAcronym":{"type":"string","pattern":"^[A-Z]{2}$","uniqueKey":"listing.buyingPharmacyAddress.stateAcronym","typeLabel":"string"},"postalCode":{"type":"string","pattern":"^\\d{5}(-\\d{4})?$","uniqueKey":"listing.buyingPharmacyAddress.postalCode","typeLabel":"string"}},"uniqueKey":"listing.buyingPharmacyAddress","typeLabel":"object"},"buyersMessage":{"type":"string","uniqueKey":"listing.buyersMessage","typeLabel":"string"},"listingDate":{"type":"string","format":"date-time","uniqueKey":"listing.listingDate","typeLabel":"string\u003cdate-time>"},"soldDate":{"type":"string","format":"date-time","uniqueKey":"listing.soldDate","typeLabel":"string\u003cdate-time>"},"shippingConfirmDate":{"type":"string","format":"date-time","uniqueKey":"listing.shippingConfirmDate","typeLabel":"string\u003cdate-time>"},"shippingReceivedConfirmDate":{"type":"string","format":"date-time","uniqueKey":"listing.shippingReceivedConfirmDate","typeLabel":"string\u003cdate-time>"},"paymentConfirmedDate":{"type":"string","format":"date-time","uniqueKey":"listing.paymentConfirmedDate","typeLabel":"string\u003cdate-time>"},"shipByDate":{"type":"string","format":"date","uniqueKey":"listing.shipByDate","typeLabel":"string\u003cdate>"},"cancelledDate":{"type":"string","format":"date-time","uniqueKey":"listing.cancelledDate","typeLabel":"string\u003cdate-time>"},"cancellationReason":{"type":"string","description":"On reads, any of the eight values may appear — `ReturnCompleted` when a completed\nreturn cancelled the sale, `ShipByDateExpired` when the seller missed the ship-by\ndate, and `DuplicateOfAcceptedCashOffer` when the listing was cancelled as a\nduplicate of a cash offer that had already been accepted, and `AdminRefund` when an\nInStockRx admin refunded the order after the seller had already been paid.\n\nOn writes (`POST /marketplace-listings/{id}/cancel`) only `SellerCancelled` and\n`BuyerCancelled` are accepted, and the one you send must match the side you are\nacting as: a seller sends `SellerCancelled`, a buyer sends `BuyerCancelled`. The\nauto-trigger values are reserved for system use. Anything else is\n`400 invalid-cancellation-reason`.\n\nChoosing the right value matters beyond bookkeeping: `BuyerCancelled` on a listing\nthat is still `Purchased` makes the backend **auto-relist** the item under the same\nseller. A seller-initiated cancel mislabelled as `BuyerCancelled` would spawn an\nunwanted replacement listing. After the listing is marked shipped no cancel\nrelists, whichever reason is used.\n","enum":["SellerCancelled","PharmacyInventoryQuantityAutoTrigger","AutomaticDrugExpired","BuyerCancelled","ReturnCompleted","ShipByDateExpired","DuplicateOfAcceptedCashOffer","AdminRefund"],"uniqueKey":"listing.cancellationReason","typeLabel":"enum\u003cstring>"},"cancellationDescription":{"type":"string","uniqueKey":"listing.cancellationDescription","typeLabel":"string"},"receivedDetails":{"type":"object","description":"What the buyer reported having received. `null` until confirm-receipt is called with a non-empty `receivedDetails`.","properties":{"gtin":{"type":"string","pattern":"^\\d{14}$","uniqueKey":"listing.receivedDetails.gtin","typeLabel":"string"},"serialNumber":{"type":"string","minLength":1,"maxLength":64,"uniqueKey":"listing.receivedDetails.serialNumber","typeLabel":"string"},"lotNumber":{"type":"string","minLength":1,"maxLength":64,"uniqueKey":"listing.receivedDetails.lotNumber","typeLabel":"string"},"expirationDate":{"type":"string","format":"date","uniqueKey":"listing.receivedDetails.expirationDate","typeLabel":"string\u003cdate>"},"nationalDrugCode":{"type":"string","uniqueKey":"listing.receivedDetails.nationalDrugCode","typeLabel":"string"}},"uniqueKey":"listing.receivedDetails","typeLabel":"object"},"receivedDetailsMatch":{"type":"boolean","description":"Server-computed comparison of `receivedDetails` against the\nseller-declared pedigree on the listing. `true` if every field the\nbuyer supplied agreed with the listing; `false` if any disagreed;\n`null` if no comparison was performed (no `receivedDetails`\nsupplied or `confirmationType` was `NotChecked` / `Skipped`).\nDrives whether the seller earns a positive rating bump on receipt.\n","uniqueKey":"listing.receivedDetailsMatch","typeLabel":"boolean"},"receivedDetailsConfirmationType":{"type":"string","description":"How the buyer obtained the values in `receivedDetails`.","enum":["NotChecked","Skipped","Scanned","Manual","AutoFilled"],"uniqueKey":"listing.receivedDetailsConfirmationType","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"listing","typeLabel":"object"},"bundle":{"type":"object","required":["id","status","buyingPharmacyId","sellingPharmacyId","items"],"properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"bundle.id","typeLabel":"string\u003cuuid>"},"status":{"type":"string","description":"Lifecycle of a Bundle (shipment grouping).\n\n- `Pending` — created, not yet being worked\n- `InProcess` — being assembled for shipment\n- `Shipped` — a label was bought and the bundle is in transit\n- `Delivered` — the carrier reported delivery\n- `Cancelled` — the bundle will not ship\n- `Merged` — the bundle's items were folded into another bundle, which now owns them\n\nPer-item receipt remains the source of truth for completion: an item is only settled\nonce it is `ShippingReceivedConfirmed`, whatever the bundle says.\n","enum":["Pending","InProcess","Shipped","Cancelled","Delivered","Merged"],"isRequired":true,"uniqueKey":"bundle.status","typeLabel":"enum\u003cstring>"},"buyingPharmacyId":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"bundle.buyingPharmacyId","typeLabel":"string\u003cuuid>"},"sellingPharmacyId":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"bundle.sellingPharmacyId","typeLabel":"string\u003cuuid>"},"items":{"type":"array","items":{"type":"object","required":["marketplaceListingId","status"],"properties":{"marketplaceListingId":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"bundle.\\items.items.[INDEX].marketplaceListingId","typeLabel":"string\u003cuuid>"},"status":{"type":"string","description":"Lifecycle of a marketplace listing. V1 values 3 (PaymentConfirmed) and\n4 (SaleConfirmed) are commented out in C# and excluded here.\nThe wire value `ShippingReceivedNotConfirmed` corresponds to the C#\nmember `ShippingNotReceived` (overridden via `[EnumMember(Value=…)]`).\n","enum":["Pending","Purchased","Cancelled","ShippingConfirmed","ShippingReceivedConfirmed","ShippingReceivedNotConfirmed","Paused"],"isRequired":true,"uniqueKey":"bundle.\\items.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"isPrimary":{"type":"boolean","description":"First item in the bundle (drives shipment defaults).","uniqueKey":"bundle.\\items.items.[INDEX].isPrimary","typeLabel":"boolean"},"packageName":{"type":"string","uniqueKey":"bundle.\\items.items.[INDEX].packageName","typeLabel":"string"},"drugPackageForm":{"type":"string","uniqueKey":"bundle.\\items.items.[INDEX].drugPackageForm","typeLabel":"string"},"drugPackageStrength":{"type":"string","uniqueKey":"bundle.\\items.items.[INDEX].drugPackageStrength","typeLabel":"string"},"quantity":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Non-negative decimal quantity (up to 6 decimal places).","examples":["1","30","0.5","0.125"],"uniqueKey":"bundle.\\items.items.[INDEX].quantity","typeLabel":"string"},"price":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,2})?$","description":"USD amount as a decimal string, up to two decimal places.","examples":["42.50","0.01","1200"],"uniqueKey":"bundle.\\items.items.[INDEX].price","typeLabel":"string"},"shipByDate":{"type":"string","format":"date","uniqueKey":"bundle.\\items.items.[INDEX].shipByDate","typeLabel":"string\u003cdate>"},"deliveryDays":{"type":"integer","minimum":0,"uniqueKey":"bundle.\\items.items.[INDEX].deliveryDays","typeLabel":"integer"},"isColdChain":{"type":"boolean","uniqueKey":"bundle.\\items.items.[INDEX].isColdChain","typeLabel":"boolean"},"hasReturn":{"type":"boolean","uniqueKey":"bundle.\\items.items.[INDEX].hasReturn","typeLabel":"boolean"}},"uniqueKey":"bundle.\\items.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"bundle.\\items","typeLabel":"object[]"},"bundleCode":{"type":"string","description":"Human-readable code, e.g. `ABCD-20260529-001`.","uniqueKey":"bundle.bundleCode","typeLabel":"string"},"deliveryStatus":{"type":"string","enum":["Unknown","PreTransit","InTransit","OutForDelivery","Delivered","AvailableForPickup","ReturnToSender","Failure","Cancelled","Error"],"uniqueKey":"bundle.deliveryStatus","typeLabel":"enum\u003cstring>"},"listingStatus":{"type":"string","description":"Worst-case status across all items.","enum":["Pending","Purchased","Cancelled","ShippingConfirmed","ShippingReceivedConfirmed","ShippingReceivedNotConfirmed","Paused"],"uniqueKey":"bundle.listingStatus","typeLabel":"enum\u003cstring>"},"paymentStatus":{"type":"string","description":"Where a listing's payment has got to. Confirmed against\n`Inview.Domain/Enum/MarketplaceListingPaymentStatus.cs`; the live document never\nemits this enum, because it appears only on responses, so the drift check cannot\nconfirm it and a reader has to.\n","enum":["NotInitiated","Pending","PaymentConfirmed","PaymentSentToSeller","SellerReceivedPayment","Refunded","FailedDueToInsufficientFunds","Cancelled"],"uniqueKey":"bundle.paymentStatus","typeLabel":"enum\u003cstring>"},"isColdChain":{"type":"boolean","uniqueKey":"bundle.isColdChain","typeLabel":"boolean"},"requiresShippingSelection":{"type":"boolean","description":"True if the next purchase joining this bundle must supply `shippingSelection`.","uniqueKey":"bundle.requiresShippingSelection","typeLabel":"boolean"},"canAcceptColdChainItem":{"type":"boolean","description":"False once the cold-chain cap (6) is reached.","uniqueKey":"bundle.canAcceptColdChainItem","typeLabel":"boolean"},"buyingPharmacyName":{"type":"string","uniqueKey":"bundle.buyingPharmacyName","typeLabel":"string"},"sellingPharmacyName":{"type":"string","uniqueKey":"bundle.sellingPharmacyName","typeLabel":"string"},"soldDate":{"type":"string","format":"date-time","uniqueKey":"bundle.soldDate","typeLabel":"string\u003cdate-time>"},"shipByDate":{"type":"string","format":"date","uniqueKey":"bundle.shipByDate","typeLabel":"string\u003cdate>"},"shippedDate":{"type":"string","format":"date-time","uniqueKey":"bundle.shippedDate","typeLabel":"string\u003cdate-time>"},"minPickupDateTime":{"type":"string","format":"date-time","uniqueKey":"bundle.minPickupDateTime","typeLabel":"string\u003cdate-time>"},"maxPickupDateTime":{"type":"string","format":"date-time","uniqueKey":"bundle.maxPickupDateTime","typeLabel":"string\u003cdate-time>"},"insureShieldQuotePremium":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,2})?$","description":"USD amount as a decimal string, up to two decimal places.","examples":["42.50","0.01","1200"],"uniqueKey":"bundle.insureShieldQuotePremium","typeLabel":"string"},"insureShieldQuotePurchasedAt":{"type":"string","format":"date-time","uniqueKey":"bundle.insureShieldQuotePurchasedAt","typeLabel":"string\u003cdate-time>"}},"isRequired":true,"uniqueKey":"bundle","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"listing":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","status":"Pending","nationalDrugCode":"\u003cstring>","sellerPharmacyId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","deliveryStatus":"Unknown","paymentStatus":"NotInitiated","nationalDrugCodeNormalized":"\u003cstring>","labelerName":"\u003cstring>","packageName":"\u003cstring>","drugPackageForm":"\u003cstring>","drugPackageStrength":"\u003cstring>","quantityUnitQualifier":"\u003cstring>","price":"42.50","pricePerQuantity":"42.50","quantity":"1","inventoryQuantity":"1","expirationDate":"2023-12-25","lotNumber":"\u003cstring>","gtin":"\u003cstring>","serialNumber":"\u003cstring>","fullPackage":true,"originalPackage":true,"sealedPackage":true,"tornPackageLabel":true,"additionalPackageNotes":"\u003cstring>","branded":true,"generic":true,"sellerPharmacyName":"\u003cstring>","sellerPharmacyDBA":"\u003cstring>","sellerPharmacyNpi":"1234567890","sellerPharmacyPhone":"\u003cstring>","sellerPharmacyAddress":{"line1":"\u003cstring>","line2":"\u003cstring>","city":"\u003cstring>","stateAcronym":"\u003cstring>","postalCode":"\u003cstring>"},"buyerPharmacyName":"\u003cstring>","buyingPharmacyName":"\u003cstring>","buyingPharmacyDBA":"\u003cstring>","buyingPharmacyNpi":"1234567890","buyingPharmacyPhone":"\u003cstring>","buyingPharmacyAddress":{"line1":"\u003cstring>","line2":"\u003cstring>","city":"\u003cstring>","stateAcronym":"\u003cstring>","postalCode":"\u003cstring>"},"buyersMessage":"\u003cstring>","listingDate":"2023-11-07T05:31:56Z","soldDate":"2023-11-07T05:31:56Z","shippingConfirmDate":"2023-11-07T05:31:56Z","shippingReceivedConfirmDate":"2023-11-07T05:31:56Z","paymentConfirmedDate":"2023-11-07T05:31:56Z","shipByDate":"2023-12-25","cancelledDate":"2023-11-07T05:31:56Z","cancellationReason":"SellerCancelled","cancellationDescription":"\u003cstring>","receivedDetails":{"gtin":"\u003cstring>","serialNumber":"\u003cstring>","lotNumber":"\u003cstring>","expirationDate":"2023-12-25","nationalDrugCode":"\u003cstring>"},"receivedDetailsMatch":true,"receivedDetailsConfirmationType":"NotChecked"},"bundle":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","status":"Pending","buyingPharmacyId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","sellingPharmacyId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","items":[{"marketplaceListingId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","status":"Pending","isPrimary":true,"packageName":"\u003cstring>","drugPackageForm":"\u003cstring>","drugPackageStrength":"\u003cstring>","quantity":"1","price":"42.50","shipByDate":"2023-12-25","deliveryDays":1,"isColdChain":true,"hasReturn":true}],"bundleCode":"\u003cstring>","deliveryStatus":"Unknown","listingStatus":"Pending","paymentStatus":"NotInitiated","isColdChain":true,"requiresShippingSelection":true,"canAcceptColdChainItem":true,"buyingPharmacyName":"\u003cstring>","sellingPharmacyName":"\u003cstring>","soldDate":"2023-11-07T05:31:56Z","shipByDate":"2023-12-25","shippedDate":"2023-11-07T05:31:56Z","minPickupDateTime":"2023-11-07T05:31:56Z","maxPickupDateTime":"2023-11-07T05:31:56Z","insureShieldQuotePremium":"42.50","insureShieldQuotePurchasedAt":"2023-11-07T05:31:56Z"}}}},"exampleType":"generated"}},"exampleType":"generated"},"84a1c4cc-7c97-4cc6-9d79-f72423780cbd":{"description":"Validation or malformed request.","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 problem details.","required":["type","title","status"],"properties":{"type":{"type":"string","format":"uri","examples":["https://api.instockrx.com/problems/listing-not-available"],"isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","minimum":100,"maximum":599,"isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","uniqueKey":"instance","typeLabel":"string"},"requestId":{"type":"string","uniqueKey":"requestId","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","required":["field","code","message"],"properties":{"field":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].field","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"https://api.instockrx.com/problems/listing-not-available","title":"\u003cstring>","status":349,"detail":"\u003cstring>","instance":"\u003cstring>","requestId":"\u003cstring>","errors":[{"field":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"df10dba2-d478-4d8a-8d55-2b00b00fe9a0":{"description":"Resource does not exist or caller cannot see it.","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 problem details.","required":["type","title","status"],"properties":{"type":{"type":"string","format":"uri","examples":["https://api.instockrx.com/problems/listing-not-available"],"isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","minimum":100,"maximum":599,"isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","uniqueKey":"instance","typeLabel":"string"},"requestId":{"type":"string","uniqueKey":"requestId","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","required":["field","code","message"],"properties":{"field":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].field","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"https://api.instockrx.com/problems/listing-not-available","title":"\u003cstring>","status":349,"detail":"\u003cstring>","instance":"\u003cstring>","requestId":"\u003cstring>","errors":[{"field":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"825f4864-9397-4e35-8ca6-e91b95ac0291":{"description":"Conflict. `problem.type` carries the blocker code, drawn from the same set as\n`PurchaseReadinessBlocker.code`, so handling can be shared between the pre-flight\nand the live error.\n\nThe purchase runs the readiness check itself and returns the **first** blocker it\nfinds, so any of these can appear: `pharmacy-on-probation`,\n`buyer-charges-disabled`, `no-verified-payment-method`, `address-is-po-box`,\n`gln-required`, `hospital-approval-pending`, `state-license-required`,\n`state-license-expired`, `dea-license-required`, `dea-license-expired`,\n`self-purchase-forbidden`, `listing-not-pending`, `seller-blacklisted-buyer`,\n`bundle-full-cold-chain`.\n\nWhen the request names a funding source, `payment-method-not-found` and\n`payment-method-not-verified` are checked too. A purchase into a bundle can also\nreturn `bundle-mixed-sellers`.\n\n`hospital-approval-pending` is the class-of-trade approval check; the slug keeps\nthe older name.\n\nPre-flighting with `GET /pharmacies/{id}/purchase-readiness` still saves a round\ntrip, but it is no longer the only place these are enforced.\n","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 problem details.","required":["type","title","status"],"properties":{"type":{"type":"string","format":"uri","examples":["https://api.instockrx.com/problems/listing-not-available"],"isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","minimum":100,"maximum":599,"isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","uniqueKey":"instance","typeLabel":"string"},"requestId":{"type":"string","uniqueKey":"requestId","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","required":["field","code","message"],"properties":{"field":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].field","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"https://api.instockrx.com/problems/listing-not-available","title":"\u003cstring>","status":349,"detail":"\u003cstring>","instance":"\u003cstring>","requestId":"\u003cstring>","errors":[{"field":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"a4ce973b-fd22-4720-a422-103a615cd063":{"description":"ETag did not match.","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 problem details.","required":["type","title","status"],"properties":{"type":{"type":"string","format":"uri","examples":["https://api.instockrx.com/problems/listing-not-available"],"isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","minimum":100,"maximum":599,"isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","uniqueKey":"instance","typeLabel":"string"},"requestId":{"type":"string","uniqueKey":"requestId","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","required":["field","code","message"],"properties":{"field":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].field","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"https://api.instockrx.com/problems/listing-not-available","title":"\u003cstring>","status":349,"detail":"\u003cstring>","instance":"\u003cstring>","requestId":"\u003cstring>","errors":[{"field":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"3eedb5ca-b459-4432-8a42-5777dee24cda":{"description":"Semantically inconsistent request.","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 problem details.","required":["type","title","status"],"properties":{"type":{"type":"string","format":"uri","examples":["https://api.instockrx.com/problems/listing-not-available"],"isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","minimum":100,"maximum":599,"isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","uniqueKey":"instance","typeLabel":"string"},"requestId":{"type":"string","uniqueKey":"requestId","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","required":["field","code","message"],"properties":{"field":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].field","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"https://api.instockrx.com/problems/listing-not-available","title":"\u003cstring>","status":349,"detail":"\u003cstring>","instance":"\u003cstring>","requestId":"\u003cstring>","errors":[{"field":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"f842c669-6c72-456d-8d3c-3eb6aea5a4ea":{"ApiKey":{"type":"apiKey","name":"X-InStockRx-Api-Key","in":"header","description":"Scoped partner API key. Send the whole key, e.g. `ik_live_a1b2c3…`, on every request.","scopes":[],"schemeName":"ApiKey"}}},"servers":{"3c745605-736a-4471-bbcd-908508c3013a":{"url":"https://sandbox-api.instockrx.com","description":"Sandbox"},"3efbdca7-d8e5-4edb-9fb3-d74a49562593":{"url":"https://api.instockrx.com","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","name":"X-InStockRx-Api-Key","in":"header","description":"Scoped partner API key. Send the whole key, e.g. `ik_live_a1b2c3…`, on every request.","scopes":[],"schemeName":"ApiKey"},"schema":{"title":"X-InStockRx-Api-Key","type":"string","description":"Scoped partner API key. Send the whole key, e.g. `ik_live_a1b2c3…`, on every request.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKey","name":"X-InStockRx-Api-Key"}],"title":"ApiKey"}]},"originalFileLocation":"spec/v2.json"},"subdomain":"localhost","siteName":"InStockRx API","title":"Buyer purchases a single marketplace listing - InStockRx API","navMaps":{"firstHrefInVersion":{"v2":{"href":"/v2/api-reference/marketplace-listings/buyer-purchases-a-single-marketplace-listing","matchLevel":0},"v1":{"href":"/api-reference/cash-offers/creates-a-new-cash-offer","matchLevel":2}},"firstHrefInLanguage":{}},"originalFileLocation":"v2/api-reference/marketplace-listings/buyer-purchases-a-single-marketplace-listing.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Scope: listings:write. Transitions the listing from Pending to Purchased. Side effects: - Initiates a buyer→internal funds transfer on the chosen payment method. - Creates a new bundle, or joins an existing Pending bundle (same seller/buyer) if bundleId is supplied. - Purchases an EasyPost label if rateId is supplied; otherwise records the manual carrier / trackingCode / shippingLabelUrl. Use If-Match (ETag from GET /marketplace-listings/{id}) to guard against a race where the listing changed between when the buyer saw it and the purchase call. Mismatch returns 412 Precondition Failed (problem.type = \u0026quot;stale-resource\u0026quot;). Cold-chain rules: max 6 cold-chain items per bundle; adding a 7th forces a new bundle. Cold-chain shipments cannot ship Fri–Sun (enforced when the seller calls /ship).\">\u003cmeta data-mint-head name=\"application-name\" content=\"InStockRx API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/favicons/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/favicons/favicon-32x32.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/favicons/favicon-16x16.png\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/favicons/favicon.ico\">\u003cmeta data-mint-head property=\"og:title\" content=\"Buyer purchases a single marketplace listing - InStockRx API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Scope: listings:write. Transitions the listing from Pending to Purchased. Side effects: - Initiates a buyer→internal funds transfer on the chosen payment method. - Creates a new bundle, or joins an existing Pending bundle (same seller/buyer) if bundleId is supplied. - Purchases an EasyPost label if rateId is supplied; otherwise records the manual carrier / trackingCode / shippingLabelUrl. Use If-Match (ETag from GET /marketplace-listings/{id}) to guard against a race where the listing changed between when the buyer saw it and the purchase call. Mismatch returns 412 Precondition Failed (problem.type = \u0026quot;stale-resource\u0026quot;). Cold-chain rules: max 6 cold-chain items per bundle; adding a 7th forces a new bundle. Cold-chain shipments cannot ship Fri–Sun (enforced when the seller calls /ship).\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"InStockRx API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://local./v2/api-reference/marketplace-listings/buyer-purchases-a-single-marketplace-listing\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Buyer purchases a single marketplace listing - InStockRx API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Scope: listings:write. Transitions the listing from Pending to Purchased. Side effects: - Initiates a buyer→internal funds transfer on the chosen payment method. - Creates a new bundle, or joins an existing Pending bundle (same seller/buyer) if bundleId is supplied. - Purchases an EasyPost label if rateId is supplied; otherwise records the manual carrier / trackingCode / shippingLabelUrl. Use If-Match (ETag from GET /marketplace-listings/{id}) to guard against a race where the listing changed between when the buyer saw it and the purchase call. Mismatch returns 412 Precondition Failed (problem.type = \u0026quot;stale-resource\u0026quot;). Cold-chain rules: max 6 cold-chain items per bundle; adding a 7th forces a new bundle. Cold-chain shipments cannot ship Fri–Sun (enforced when the seller calls /ship).\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/favicons/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"InStockRx API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#EA6318\">\u003clink data-mint-head rel=\"canonical\" href=\"https://local./v2/api-reference/marketplace-listings/buyer-purchases-a-single-marketplace-listing\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/v2/api-reference/marketplace-listings/buyer-purchases-a-single-marketplace-listing.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"InStockRx API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"InStockRx API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/v2/api-reference/marketplace-listings/buyer-purchases-a-single-marketplace-listing.md","siteName":"InStockRx API","nav":{"versions":[{"version":"v2","tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/v2/introduction"}]},{"tab":"API reference","groups":[{"group":"Overview","pages":[{"title":"API reference","href":"/v2/api-reference/overview"}]},{"group":"Endpoints","pages":[{"group":"Cash Offers","pages":[{"title":"Create a cash offer","openapi":"/spec/v2.json post /cash-offers","href":"/v2/api-reference/cash-offers/create-a-cash-offer"},{"title":"Get a cash offer","openapi":"/spec/v2.json get /cash-offers/{id}","href":"/v2/api-reference/cash-offers/get-a-cash-offer"},{"title":"Update a cash offer","openapi":"/spec/v2.json put /cash-offers/{id}","href":"/v2/api-reference/cash-offers/update-a-cash-offer"},{"title":"Accept a cash offer (seller)","openapi":"/spec/v2.json post /cash-offers/{id}/accept","href":"/v2/api-reference/cash-offers/accept-a-cash-offer-seller"},{"title":"Decline a cash offer (seller)","openapi":"/spec/v2.json post /cash-offers/{id}/decline","href":"/v2/api-reference/cash-offers/decline-a-cash-offer-seller"},{"title":"Cancel a cash offer (buyer)","openapi":"/spec/v2.json post /cash-offers/{id}/cancel","href":"/v2/api-reference/cash-offers/cancel-a-cash-offer-buyer"},{"title":"Search cash offers","openapi":"/spec/v2.json post /cash-offers/search","href":"/v2/api-reference/cash-offers/search-cash-offers"}]},{"group":"Marketplace Listings","pages":[{"title":"Create a marketplace listing","openapi":"/spec/v2.json post /marketplace-listings","href":"/v2/api-reference/marketplace-listings/create-a-marketplace-listing"},{"title":"Get a marketplace listing","openapi":"/spec/v2.json get /marketplace-listings/{id}","href":"/v2/api-reference/marketplace-listings/get-a-marketplace-listing"},{"title":"Update a marketplace listing","openapi":"/spec/v2.json put /marketplace-listings/{id}","href":"/v2/api-reference/marketplace-listings/update-a-marketplace-listing"},{"title":"Delete a marketplace listing","openapi":"/spec/v2.json delete /marketplace-listings/{id}","href":"/v2/api-reference/marketplace-listings/delete-a-marketplace-listing"},{"title":"Cancel a marketplace listing","openapi":"/spec/v2.json post /marketplace-listings/{id}/cancel","href":"/v2/api-reference/marketplace-listings/cancel-a-marketplace-listing"},{"title":"Search marketplace listings","openapi":"/spec/v2.json post /marketplace-listings/search","href":"/v2/api-reference/marketplace-listings/search-marketplace-listings"},{"title":"Quote shipping rates for a marketplace listing","description":"**Scope:** `listings:read`.\n\nReturns carrier rates for shipping this listing from the seller to the\ncaller (buyer). Use the returned `rateId` in a subsequent purchase call\nif the buyer chooses EasyPost-managed shipping. The buyer can instead\nskip this call and supply manual `carrier` / `trackingCode` /\n`shippingLabelUrl` at purchase time.\n","openapi":"/spec/v2.json post /marketplace-listings/{id}/shipping-rates","href":"/v2/api-reference/marketplace-listings/quote-shipping-rates-for-a-marketplace-listing"},{"title":"Buyer purchases a single marketplace listing","openapi":"/spec/v2.json post /marketplace-listings/{id}/purchase","href":"/v2/api-reference/marketplace-listings/buyer-purchases-a-single-marketplace-listing"},{"title":"Buyer purchases multiple marketplace listings (partial-success batch)","description":"**Scope:** `listings:write`.\n\nBatch counterpart to `POST /marketplace-listings/{id}/purchase`. The\nrequest groups listings into bundles; each bundle attempts an atomic\npurchase independently. The response's `allSucceeded` is `true` only if\nevery bundle succeeded; otherwise inspect `bundles[].succeeded`,\n`purchasedListingIds`, `failedListingIds`, and `errorCode` per bundle.\n\nListings within a single bundle MUST be from the same seller. The server\nvalidates this and rejects with `409 bundle-mixed-sellers` if violated.\n\nIdempotent on `Idempotency-Key`. A replay returns the cached envelope.\n","openapi":"/spec/v2.json post /marketplace-listings/checkout","href":"/v2/api-reference/marketplace-listings/buyer-purchases-multiple-marketplace-listings-partial-success-batch"},{"title":"Seller confirms shipment of a purchased listing","openapi":"/spec/v2.json post /marketplace-listings/{id}/ship","href":"/v2/api-reference/marketplace-listings/seller-confirms-shipment-of-a-purchased-listing"},{"title":"Buyer confirms receipt of a shipped listing","openapi":"/spec/v2.json post /marketplace-listings/{id}/confirm-receipt","href":"/v2/api-reference/marketplace-listings/buyer-confirms-receipt-of-a-shipped-listing"},{"title":"Buyer reports a shipped listing as not received / damaged in transit","openapi":"/spec/v2.json post /marketplace-listings/{id}/report-not-received","href":"/v2/api-reference/marketplace-listings/buyer-reports-a-shipped-listing-as-not-received-damaged-in-transit"}]},{"group":"Bundles","pages":[{"title":"List bundles (optionally filtered by status / counterparty)","openapi":"/spec/v2.json get /bundles","href":"/v2/api-reference/bundles/list-bundles-optionally-filtered-by-status-counterparty"},{"title":"Get a bundle","openapi":"/spec/v2.json get /bundles/{id}","href":"/v2/api-reference/bundles/get-a-bundle"},{"title":"Buyer confirms receipt of every item in a bundle","openapi":"/spec/v2.json post /bundles/{id}/confirm-receipt","href":"/v2/api-reference/bundles/buyer-confirms-receipt-of-every-item-in-a-bundle"}]},{"group":"Payment Methods","pages":[{"title":"List the buyer's stored payment methods","openapi":"/spec/v2.json get /payment-methods","href":"/v2/api-reference/payment-methods/list-the-buyers-stored-payment-methods"}]},{"group":"Draft Listings","pages":[{"title":"Create a draft marketplace listing","openapi":"/spec/v2.json post /draft-listings","href":"/v2/api-reference/draft-listings/create-a-draft-marketplace-listing"},{"title":"Get a draft listing","openapi":"/spec/v2.json get /draft-listings/{id}","href":"/v2/api-reference/draft-listings/get-a-draft-listing"},{"title":"Update a draft listing","openapi":"/spec/v2.json put /draft-listings/{id}","href":"/v2/api-reference/draft-listings/update-a-draft-listing"},{"title":"Delete a draft listing","openapi":"/spec/v2.json delete /draft-listings/{id}","href":"/v2/api-reference/draft-listings/delete-a-draft-listing"},{"title":"Search draft listings","openapi":"/spec/v2.json post /draft-listings/search","href":"/v2/api-reference/draft-listings/search-draft-listings"}]},{"group":"Returns","pages":[{"title":"Initiate a return (buyer)","openapi":"/spec/v2.json post /returns","href":"/v2/api-reference/returns/initiate-a-return-buyer"},{"title":"Get a return","openapi":"/spec/v2.json get /returns/{id}","href":"/v2/api-reference/returns/get-a-return"},{"title":"Buyer marks the return as shipped","openapi":"/spec/v2.json post /returns/{id}/buyer-ship","href":"/v2/api-reference/returns/buyer-marks-the-return-as-shipped"},{"title":"Seller confirms (or denies) receipt of the returned items","openapi":"/spec/v2.json post /returns/{id}/seller-confirm-receipt","href":"/v2/api-reference/returns/seller-confirms-or-denies-receipt-of-the-returned-items"},{"title":"Download a return-related document","openapi":"/spec/v2.json get /returns/{id}/documents/{documentType}","href":"/v2/api-reference/returns/download-a-return-related-document"},{"title":"Search returns","openapi":"/spec/v2.json post /returns/search","href":"/v2/api-reference/returns/search-returns"},{"title":"Record return shipping details","openapi":"/spec/v2.json post /returns/{id}/ship-details","href":"/v2/api-reference/returns/record-return-shipping-details"}]},{"group":"Notifications","pages":[{"title":"List notifications for the credential's user","openapi":"/spec/v2.json get /notifications","href":"/v2/api-reference/notifications/list-notifications-for-the-credentials-user"},{"title":"Mark read/unread/dismissed","openapi":"/spec/v2.json patch /notifications/{id}","href":"/v2/api-reference/notifications/mark-readunreaddismissed"},{"title":"Dismiss many notifications at once","openapi":"/spec/v2.json post /notifications/bulk-dismiss","href":"/v2/api-reference/notifications/dismiss-many-notifications-at-once"},{"title":"Get notification preferences for a pharmacy","openapi":"/spec/v2.json get /pharmacies/{pharmacyId}/notification-preferences","href":"/v2/api-reference/notifications/get-notification-preferences-for-a-pharmacy"},{"title":"Update notification preferences","openapi":"/spec/v2.json put /pharmacies/{pharmacyId}/notification-preferences","href":"/v2/api-reference/notifications/update-notification-preferences"}]},{"group":"Evergreen Cash Offer Preferences","pages":[{"title":"Create an evergreen cash-offer preference","openapi":"/spec/v2.json post /evergreen-cash-offer-preferences","href":"/v2/api-reference/evergreen-cash-offer-preferences/create-an-evergreen-cash-offer-preference"},{"title":"Get an evergreen preference","openapi":"/spec/v2.json get /evergreen-cash-offer-preferences/{id}","href":"/v2/api-reference/evergreen-cash-offer-preferences/get-an-evergreen-preference"},{"title":"Update an evergreen preference","openapi":"/spec/v2.json put /evergreen-cash-offer-preferences/{id}","href":"/v2/api-reference/evergreen-cash-offer-preferences/update-an-evergreen-preference"},{"title":"Cancel pending cash offers spawned by this preference","openapi":"/spec/v2.json post /evergreen-cash-offer-preferences/{id}/cancel-pending","href":"/v2/api-reference/evergreen-cash-offer-preferences/cancel-pending-cash-offers-spawned-by-this-preference"},{"title":"Search evergreen preferences","openapi":"/spec/v2.json post /evergreen-cash-offer-preferences/search","href":"/v2/api-reference/evergreen-cash-offer-preferences/search-evergreen-preferences"}]},{"group":"Drug Packages","pages":[{"title":"Get drug-package metadata by NDC","openapi":"/spec/v2.json get /drug-packages/{nationalDrugCode}","href":"/v2/api-reference/drug-packages/get-drug-package-metadata-by-ndc"},{"title":"Search drug packages","openapi":"/spec/v2.json post /drug-packages/search","href":"/v2/api-reference/drug-packages/search-drug-packages"},{"title":"Drug-name autocomplete","openapi":"/spec/v2.json get /drug-packages/autocomplete","href":"/v2/api-reference/drug-packages/drug-name-autocomplete"}]},{"group":"Pharmacies","pages":[{"title":"Search pharmacies in the credential's group(s)","openapi":"/spec/v2.json get /pharmacies","href":"/v2/api-reference/pharmacies/search-pharmacies-in-the-credentials-groups"},{"title":"Pre-flight check for whether a pharmacy can purchase","openapi":"/spec/v2.json get /pharmacies/{pharmacyId}/purchase-readiness","href":"/v2/api-reference/pharmacies/pre-flight-check-for-whether-a-pharmacy-can-purchase"}]},{"group":"Utility","pages":[{"title":"Retrieve transaction statistics for an NDC","openapi":"/spec/v2.json get /ndc-transaction-statistics","href":"/v2/api-reference/utility/retrieve-transaction-statistics-for-an-ndc"},{"title":"Read the current NPI roster for the credential's group","openapi":"/spec/v2.json get /groups/npi-list","href":"/v2/api-reference/utility/read-the-current-npi-roster-for-the-credentials-group"},{"title":"Replace the NPI roster for the credential's group","openapi":"/spec/v2.json put /groups/npi-list","href":"/v2/api-reference/utility/replace-the-npi-roster-for-the-credentials-group"},{"title":"Read the signup link for the credential's group","openapi":"/spec/v2.json get /groups/signup-link","href":"/v2/api-reference/utility/read-the-signup-link-for-the-credentials-group"}]},{"group":"Webhook Endpoints","pages":[{"title":"List webhook endpoints","openapi":"/spec/v2.json get /webhook-endpoints","href":"/v2/api-reference/webhook-endpoints/list-webhook-endpoints"},{"title":"Subscribe to events","openapi":"/spec/v2.json post /webhook-endpoints","href":"/v2/api-reference/webhook-endpoints/subscribe-to-events"},{"title":"Get a webhook endpoint","openapi":"/spec/v2.json get /webhook-endpoints/{id}","href":"/v2/api-reference/webhook-endpoints/get-a-webhook-endpoint"},{"title":"Update a webhook endpoint","openapi":"/spec/v2.json put /webhook-endpoints/{id}","href":"/v2/api-reference/webhook-endpoints/update-a-webhook-endpoint"},{"title":"Delete a webhook endpoint","openapi":"/spec/v2.json delete /webhook-endpoints/{id}","href":"/v2/api-reference/webhook-endpoints/delete-a-webhook-endpoint"},{"title":"Rotate the signing secret","openapi":"/spec/v2.json post /webhook-endpoints/{id}/rotate-secret","href":"/v2/api-reference/webhook-endpoints/rotate-the-signing-secret"},{"title":"Replay events to this endpoint","openapi":"/spec/v2.json post /webhook-endpoints/{id}/replay","href":"/v2/api-reference/webhook-endpoints/replay-events-to-this-endpoint"}]},{"group":"Draft listings","pages":[{"title":"Finalize a draft listing","openapi":"/spec/v2.json post /draft-listings/{id}/finalize","href":"/v2/api-reference/draft-listings/finalize-a-draft-listing"}]},{"group":"Marketplace listings","pages":[{"title":"Attach photos to a listing","openapi":"/spec/v2.json post /marketplace-listings/{id}/photos","href":"/v2/api-reference/marketplace-listings/attach-photos-to-a-listing"},{"title":"Get the seller's contact details","openapi":"/spec/v2.json get /marketplace-listings/{id}/seller-contact","href":"/v2/api-reference/marketplace-listings/get-the-sellers-contact-details"}]},{"group":"API Reference","pages":[{"title":"A marketplace listing was created","openapi":"/spec/v2.json webhook marketplace_listing.created","href":"/v2/api-reference/a-marketplace-listing-was-created"},{"title":"A marketplace listing was updated price quantity status…","openapi":"/spec/v2.json webhook marketplace_listing.updated","href":"/v2/api-reference/a-marketplace-listing-was-updated-price-quantity-status…"},{"title":"A marketplace listing was purchased","openapi":"/spec/v2.json webhook marketplace_listing.purchased","href":"/v2/api-reference/a-marketplace-listing-was-purchased"},{"title":"A marketplace listing was cancelled","openapi":"/spec/v2.json webhook marketplace_listing.cancelled","href":"/v2/api-reference/a-marketplace-listing-was-cancelled"},{"title":"Seller confirmed shipment of a purchased listing","openapi":"/spec/v2.json webhook marketplace_listing.shipped","href":"/v2/api-reference/seller-confirmed-shipment-of-a-purchased-listing"},{"title":"Buyer confirmed receipt of a shipped listing","openapi":"/spec/v2.json webhook marketplace_listing.received","href":"/v2/api-reference/buyer-confirmed-receipt-of-a-shipped-listing"},{"title":"Buyer reported a shipped listing as not received damaged in transit","openapi":"/spec/v2.json webhook marketplace_listing.not_received","href":"/v2/api-reference/buyer-reported-a-shipped-listing-as-not-received-damaged-in-transit"},{"title":"A bundle was created on a buyer purchase","openapi":"/spec/v2.json webhook bundle.created","href":"/v2/api-reference/a-bundle-was-created-on-a-buyer-purchase"},{"title":"A bundle was shipped first items shipping was confirmed","openapi":"/spec/v2.json webhook bundle.shipped","href":"/v2/api-reference/a-bundle-was-shipped-first-items-shipping-was-confirmed"},{"title":"Every item in a bundle has been received","openapi":"/spec/v2.json webhook bundle.received","href":"/v2/api-reference/every-item-in-a-bundle-has-been-received"},{"title":"A cash offer was accepted by a seller","openapi":"/spec/v2.json webhook cash_offer.accepted","href":"/v2/api-reference/a-cash-offer-was-accepted-by-a-seller"},{"title":"A cash offer was declined","openapi":"/spec/v2.json webhook cash_offer.declined","href":"/v2/api-reference/a-cash-offer-was-declined"},{"title":"A cash offer was cancelled by the buyer","openapi":"/spec/v2.json webhook cash_offer.cancelled","href":"/v2/api-reference/a-cash-offer-was-cancelled-by-the-buyer"},{"title":"A return was initiated","openapi":"/spec/v2.json webhook return.requested","href":"/v2/api-reference/a-return-was-initiated"},{"title":"A return was shipped back to the seller","openapi":"/spec/v2.json webhook return.shipped","href":"/v2/api-reference/a-return-was-shipped-back-to-the-seller"},{"title":"A return completed seller confirmed receipt","openapi":"/spec/v2.json webhook return.completed","href":"/v2/api-reference/a-return-completed-seller-confirmed-receipt"}]}]}]}]},{"version":"v1","pages":[{"title":"v1","href":"/api-reference/cash-offers/creates-a-new-cash-offer"}]}]},"basePath":"","title":"Buyer purchases a single marketplace listing - InStockRx API","buildId":"b8b92e8dc392","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Be5oznUz.js","snippetPresets-CfxpbzzD.js","utils-WbBega9h.js","style-to-object-BY3JEAdk.js","utils-kDtb4zyI.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-DkWLdYrp.js","conditional-requirements-CFM0id0Q.js","cloneDeep-BaiIuF4F.js","_Uint8Array-C3lkX7eq.js","isObject-FP1Yky1u.js","ApiExamples-Dmuj6HvB.js","usePlaygroundInputsStore-1rKiMY8d.js","shallow-B7__N5wH.js","isEqual-COF04FiJ.js","CodeSnippets-BsHoAxkP.js","CodeSnippet-D-mUaQGT.js","use-playground-group-access-BE_fLSpn.js","Page-BzZxJmpC.js","api-description-markdown-BZswaBs0.js","DynamicMarkdown-CHHGzH8g.js","SectionHeading-CTqU8fbJ.js","MethodPill-B2KftbhX.js","getPastedJson-xRRRYgC0.js","Check2Icon-C25sO8L1.js","axios-CsQoIw0U.js","Markdown-BAXIOcCc.js","AssistantPageLink-BskiyoKM.js","dist-BRf2-mCa.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}