Shipments

Request a shipment (v2)

Request the next refill shipment for a patient. Returns 409 if the Rx is expired. Optional shipment_type cadence and address override are persisted onto the order and echoed in the response. One request per patient per UTC day; duplicate same-day requests return the existing order with idempotent: true.

post/api/v1/shipments/request

Request

  • Base URL: https://api.wyndly.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.wyndly.com/api/v1/shipments/request
  • Auth: none declared. Required headers: x-api-key

Headers

x-api-keystring required

API Key

Request body

patient_idinteger required

Patient ID to ship next refill to

prescription_idinteger nullable

Explicit prescription to draw from. Defaults to the patient's most recent prescription when omitted.

shipment_type'biannual' | 'quarterly'

Partner-supplied cadence label for a refill order.

Response

Successful Response

order_idstring required

UUID of the queued or existing fulfillment order

status'queued' | 'sent_to_pharmacy' | 'in_transit' | 'delivered' | 'cancelled' required

Valid drops_orders statuses — matches CHECK constraint in migration 020

shipment_type'biannual' | 'quarterly'

Partner-supplied cadence label for a refill order.

idempotentboolean required

True if a same-day duplicate request returned the existing order (either via duplicate-detection or race-condition recovery).

refills_remaininginteger required

Refills available AFTER this order

total_refillsinteger required

Total refills the prescription was issued for

rx_expiration_datestring nullable

Rx expiration date (YYYY-MM-DD)

needs_renewalboolean required

True when refills are exhausted or expiry is within 80 days (matches the rx_renewal_needed event trigger).

Changes

No recorded changes to this operation across all 1 revision of this API.