MedAdvisor Refill Order API
The RefillOrder API from MedAdvisor — 14 operation(s) for refillorder.
The RefillOrder API from MedAdvisor — 14 operation(s) for refillorder.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/medadvisor-refillorder-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
version: v1
title: Pharmacy Unified API v1.0 Refill Order API
servers:
- url: https://pharmacy-unified.api.medadvisor.com.au
tags:
- name: RefillOrder
paths:
/api/v1/RefillOrder/PendingOrder/{orderId}:
get:
tags:
- RefillOrder
summary: 'Get full pending order with line items and resolved statuses (Epic 2 — Story 2.1).
Returns HTTP 404 when the order does not exist or does not belong to this pharmacy.'
operationId: RefillOrder_GetPendingOrder
parameters:
- name: orderId
in: path
required: true
schema:
type: integer
format: int32
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.PendingOrderModel'
text/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.PendingOrderModel'
application/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.PendingOrderModel'
text/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.PendingOrderModel'
security:
- Bearer: []
delete:
tags:
- RefillOrder
summary: 'Delete a pending order (Epic 2 — Story 2.5a, FR29).
Returns 404 when the order does not exist or does not belong to this pharmacy.'
operationId: RefillOrder_Delete
parameters:
- name: orderId
in: path
required: true
schema:
type: integer
format: int32
responses:
'204':
description: No Content
security:
- Bearer: []
/api/v1/RefillOrder/CompletedOrder/{orderId}:
get:
tags:
- RefillOrder
summary: 'Get a completed order with read-only details and PIA payment status (Epic 6 — Story 6.1).
Returns HTTP 404 when the order does not exist or does not belong to this pharmacy.'
operationId: RefillOrder_GetCompletedOrder
parameters:
- name: orderId
in: path
required: true
schema:
type: integer
format: int32
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.PendingOrderModel'
text/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.PendingOrderModel'
application/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.PendingOrderModel'
text/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.PendingOrderModel'
security:
- Bearer: []
/api/v1/RefillOrder/EScriptToken/{orderId}/{tokenId}:
get:
tags:
- RefillOrder
summary: 'Get full eScript token detail for a line item (Epic 3 — Story 3.2, FR15).
Returns 404 when the order does not belong to this pharmacy or the token is not found.'
operationId: RefillOrder_GetEScriptToken
parameters:
- name: orderId
in: path
required: true
schema:
type: integer
format: int32
- name: tokenId
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.EScriptTokenDetailModel'
text/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.EScriptTokenDetailModel'
application/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.EScriptTokenDetailModel'
text/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.EScriptTokenDetailModel'
security:
- Bearer: []
/api/v1/RefillOrder/Delivery/{orderId}:
put:
tags:
- RefillOrder
summary: 'Update delivery address fields, shipping method, or delivery status (Story 4.1 — FR18–FR20).
Returns 404 when the order does not exist, does not belong to this pharmacy, or is not a delivery order.'
operationId: RefillOrder_UpdateDelivery
parameters:
- name: orderId
in: path
required: true
schema:
type: integer
format: int32
responses:
'204':
description: No Content
security:
- Bearer: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.UpdateDeliveryRequest'
text/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.UpdateDeliveryRequest'
application/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.UpdateDeliveryRequest'
text/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.UpdateDeliveryRequest'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.UpdateDeliveryRequest'
required: true
/api/v1/RefillOrder/AddNote:
post:
tags:
- RefillOrder
summary: 'Add or update a pharmacy note on an order (Epic 5 — Story 5.1, FR24).
Returns 404 when the order does not belong to this pharmacy.'
operationId: RefillOrder_AddNote
responses:
'204':
description: No Content
security:
- Bearer: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.AddNoteRequest'
text/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.AddNoteRequest'
application/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.AddNoteRequest'
text/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.AddNoteRequest'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.AddNoteRequest'
required: true
/api/v1/RefillOrder/Complete:
post:
tags:
- RefillOrder
summary: 'Finalise (complete) a pending order (Story 2.5b — FR27).
Returns 404 when the order does not exist or does not belong to this pharmacy.
Returns 400 when the order has no line items to tally.'
operationId: RefillOrder_Complete
responses:
'204':
description: No Content
security:
- Bearer: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.CompleteOrderRequest'
text/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.CompleteOrderRequest'
application/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.CompleteOrderRequest'
text/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.CompleteOrderRequest'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.CompleteOrderRequest'
required: true
/api/v1/RefillOrder/ProcessPIA:
post:
tags:
- RefillOrder
summary: Process a Pay-in-Advance charge (Epic 4 — Story 4.3).
operationId: RefillOrder_ProcessPIA
responses:
'204':
description: No Content
security:
- Bearer: []
requestBody:
content:
application/json:
schema:
type: object
text/json:
schema:
type: object
application/xml:
schema:
type: object
text/xml:
schema:
type: object
application/x-www-form-urlencoded:
schema:
type: object
required: true
/api/v1/RefillOrder/SendEScript:
post:
tags:
- RefillOrder
summary: 'Send an eScript token to the dispensing system (Epic 3 — Story 3.3, FR16).
Always returns HTTP 200; the response body Code field indicates SUCCESS,
FALLBACK_TO_PLUSONE (Angular must call PlusOne JS bridge), or ERROR.
Returns 404 when the order does not belong to this pharmacy.'
operationId: RefillOrder_SendEScript
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.SendEScriptResponse'
text/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.SendEScriptResponse'
application/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.SendEScriptResponse'
text/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.SendEScriptResponse'
security:
- Bearer: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.SendEScriptRequest'
text/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.SendEScriptRequest'
application/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.SendEScriptRequest'
text/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.SendEScriptRequest'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.SendEScriptRequest'
required: true
/api/v1/RefillOrder/LineItem/{orderId}:
post:
tags:
- RefillOrder
summary: 'Add a custom line item to a pending order (Story 3.5 — FR13).
Returns the full updated order so the caller can refresh its list in one round-trip.
Returns 400 when the name is missing; 404 when the order does not belong to this pharmacy.'
operationId: RefillOrder_AddLineItem
parameters:
- name: orderId
in: path
required: true
schema:
type: integer
format: int32
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.PendingOrderModel'
text/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.PendingOrderModel'
application/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.PendingOrderModel'
text/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.PendingOrderModel'
security:
- Bearer: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.AddLineItemRequest'
text/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.AddLineItemRequest'
application/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.AddLineItemRequest'
text/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.AddLineItemRequest'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.AddLineItemRequest'
required: true
/api/v1/RefillOrder/UpdateLineItemStatus:
post:
tags:
- RefillOrder
summary: 'Update the status of a line item (Epic 3 — Story 3.1, FR6–FR9).
Returns 404 when the order or component does not belong to this pharmacy.
Returns 400 when action = OnOrder but followUpDate is absent.'
operationId: RefillOrder_UpdateLineItemStatus
responses:
'204':
description: No Content
security:
- Bearer: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.UpdateLineItemStatusRequest'
text/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.UpdateLineItemStatusRequest'
application/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.UpdateLineItemStatusRequest'
text/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.UpdateLineItemStatusRequest'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.UpdateLineItemStatusRequest'
required: true
/api/v1/RefillOrder/CompletedOrder/{orderId}/Refund:
post:
tags:
- RefillOrder
summary: 'Refund the PIA charge for a completed order (Epic 6 — Story 6.4, CRO-5).
Returns 404 when the order does not exist or does not belong to this pharmacy.
Returns 400 with an error message when the refund is rejected (gateway failure,
disbursed, already refunded, delay window, etc.).'
operationId: RefillOrder_RefundOrder
parameters:
- name: orderId
in: path
required: true
schema:
type: integer
format: int32
responses:
'204':
description: No Content
security:
- Bearer: []
/api/v1/RefillOrder/CompletedOrder/{orderId}/Reminder:
post:
tags:
- RefillOrder
summary: 'Send a reminder message to a patient for a completed order (Epic 6 — Story 6.2, CRO-2).
Returns 404 when the order does not exist or does not belong to this pharmacy.
Returns 400 when the message body is missing or empty.'
operationId: RefillOrder_SendReminder
parameters:
- name: orderId
in: path
required: true
schema:
type: integer
format: int32
responses:
'204':
description: No Content
security:
- Bearer: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.SendReminderRequest'
text/json:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.SendReminderRequest'
application/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.SendReminderRequest'
text/xml:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.SendReminderRequest'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.SendReminderRequest'
required: true
/api/v1/RefillOrder/CompletedOrder/{orderId}/ReturnToStock:
post:
tags:
- RefillOrder
summary: 'Return all items for a completed order to stock (Epic 6 — Story 6.3, CRO-3).
Returns 404 when the order does not exist or does not belong to this pharmacy.'
operationId: RefillOrder_ReturnToStock
parameters:
- name: orderId
in: path
required: true
schema:
type: integer
format: int32
responses:
'204':
description: No Content
security:
- Bearer: []
/api/v1/RefillOrder/LineItem/{orderId}/{lineItemId}:
delete:
tags:
- RefillOrder
summary: 'Delete a custom line item from a pending order (Story 3.5 — FR14).
Returns 404 when the order, item, or pharmacy context is not found, or the item
is not a custom item (only custom items may be deleted via this endpoint).'
operationId: RefillOrder_DeleteLineItem
parameters:
- name: orderId
in: path
required: true
schema:
type: integer
format: int32
- name: lineItemId
in: path
required: true
schema:
type: integer
format: int32
responses:
'204':
description: No Content
security:
- Bearer: []
components:
schemas:
MedAdvisor.PharmacyUnifiedAPI.v1.Models.UpdateLineItemStatusRequest:
description: 'Request body for POST /RefillOrder/UpdateLineItemStatus (RAP-6 — Story 3.1).
Carries the orderId + componentId so the service can verify component ownership
before delegating to the BLL.'
type: object
properties:
orderId:
format: int32
type: integer
componentId:
format: int32
type: integer
action:
format: int32
enum:
- 0
- 1
- 2
- 3
type: integer
followUpDate:
format: date-time
description: 'Required when {MedAdvisor.PharmacyUnifiedAPI.v1.Models.UpdateLineItemStatusRequest.Action} is {MedAdvisor.PharmacyUnifiedAPI.v1.Enums.UpdateLineItemAction.OnOrder}.
Stored as the estimated stock availability date ("cdatefollowup" BLL parameter).'
type: string
MedAdvisor.PharmacyUnifiedAPI.v1.Models.PendingOrderLineItemModel:
description: 'A single line item within a pending order, with its status pre-resolved server-side.
Used by the Angular Pending Order dialog (RAP-6 — Epic 2, Story 2.1).'
type: object
properties:
id:
format: int32
type: integer
drugLabelName:
description: 'Full display name: brand name + form + strength
(DrugLabelNameWithStrengthForm from RefillOrderComponentPending).
Shown as the primary label for OTC items; secondary label for non-OTC (Story 3.4).'
type: string
drugActiveName:
description: 'Active ingredient name (e.g. "Amoxicillin").
Shown as the primary (bold) label for non-OTC prescription items (Story 3.4, NFR-F1).
Null / empty for OTC items.'
type: string
repeatsRemaining:
format: int32
description: 'Remaining repeats on the script.
-1 means unknown (no previous dispense found or deferred script).'
type: integer
lastDispenseDate:
format: date-time
description: 'Date of the most recent dispense.
Null when RepeatsRemaining is -1 (deferred / no prior dispense).'
type: string
status:
format: int32
description: 'Pre-resolved line item status.
Mapped from ComponentStatus + ComponentOnOrderStatus + ComponentDeliveryStatus.
DUAL MAINTENANCE: mirrors ModelsMapper.Partial.cs:ToPatientRequestStatusModel().'
enum:
- 0
- 1
- 2
- 3
- 4
- 5
type: integer
careePatientId:
format: int32
description: 'Patient ID of the caree when this line item was added by a carer on behalf of
someone else. Null when the line item belongs to the order owner.
Required by Story 5.3 for the "For:" navigation link.'
type: integer
careeName:
description: Display name of the caree patient. Null when CareePatientId is null.
type: string
price:
format: double
type: number
gst:
format: double
type: number
isOtc:
description: Over-the-counter item (no script required — FR11).
type: boolean
isStructuredOtc:
description: Structured OTC item (FR12).
type: boolean
isNdss:
description: National Diabetes Services Scheme item (FR10).
type: boolean
isCustomItem:
description: Custom line item added by a pharmacist (FR13/FR14).
type: boolean
isDeferred:
description: Deferred script awaiting dispensing.
type: boolean
quantityOrdered:
format: int32
description: 'Number of units ordered. Shown as "Quantity ordered: N" for OTC items (FR11/FR12).'
type: integer
schedule:
description: Drug schedule (e.g. "S3", "S8"). An "S3" value shows the S3 badge on OTC items.
type: string
ndssCode:
description: NDSS code shown in blue beneath the drug name when IsNdss is true (FR10).
type: string
userNdss:
description: Patient's NDSS number shown in red when IsNdss is true (FR10).
type: string
packetSize:
format: int32
description: 'Packet size in units for Structured OTC items (FR12).
Used when PacketSizeSupplemental is null/empty.'
type: integer
packetSizeSupplemental:
description: Supplemental packet size descriptor (overrides PacketSize when non-empty).
type: string
drugSystemCode:
description: 'Internal drug system code.
Callers can test for RefillOrderComponentPending.RefillOrderDeliveryCostSystemCode
to identify the delivery cost line.'
type: string
hasEScript:
description: True when this line item has at least one associated eScript token.
type: boolean
eScriptTokens:
description: 'eScript tokens associated with this line item, sorted by prescription date descending
(matches MVC PendingOrder.cshtml ordering). Empty list when HasEScript is false.'
type: array
items:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.EScriptTokenSummaryModel'
scriptPhotoUrl:
type: string
scriptPhotoThumbnailUrl:
type: string
MedAdvisor.PharmacyUnifiedAPI.v1.Models.PendingOrderModel:
description: 'Order payload returned by GET /api/v1/RefillOrder/PendingOrder/{orderId} and
GET /api/v1/RefillOrder/CompletedOrder/{orderId}.
Used by the Angular Pending Order and Completed Order dialogs (RAP-6).'
type: object
properties:
id:
format: int32
type: integer
patientId:
format: int32
description: 'MedAdvisor user ID of the order owner.
Null for guest orders (no registered patient profile).
Required by FR37 (patient header navigation) and FR38 (caree navigation).'
type: integer
patientName:
description: 'Full formatted name: title + first name + last name.'
type: string
orderStatus:
description: Order-level status (Pending, Ready, PartiallyReady, etc.).
type: string
createDate:
format: date-time
type: string
phone:
description: 'Patient''s mobile number.
Populated for both guest and registered-patient orders.
Only used by the Completed Order dialog (Story 6.1); null when not available.'
type: string
isGuestOrder:
type: boolean
guestEmail:
description: Email on file for the guest. Null for registered-patient orders.
type: string
guestMobile:
description: Mobile number for the guest. Null for registered-patient orders.
type: string
isSmsGuestCommunicationPreference:
description: Guest prefers to be contacted by SMS.
type: boolean
isEmailGuestCommunicationPreference:
description: Guest prefers to be contacted by email.
type: boolean
isDelivery:
description: Order includes a delivery request.
type: boolean
hasEScript:
description: At least one line item has an associated eScript token.
type: boolean
isPayInAdvance:
description: Order is flagged for Pay-in-Advance.
type: boolean
isAsl:
description: Order was placed via ASL (ePrescribing).
type: boolean
supportGst:
type: boolean
pharmacyNotes:
type: string
piaChargeAmount:
format: double
description: 'Amount of the PIA charge. Null when no charge was attempted.
Source: RefillOrderPaymentStatus.TotalCost.'
type: number
piaChargeStatus:
description: '"Success" when the charge was captured (Status==1) or refunded (Status==3).
"Failed" when the charge was attempted but did not succeed.
Null when IsPayInAdvance is false or no charge record exists.'
type: string
isRefunded:
description: 'True when the PIA charge has been refunded or is no longer refundable
(disbursed, awaiting disbursement, or a previous refund attempt failed).
When true the Refund button is hidden even if PiaChargeStatus is "Success".'
type: boolean
piaCardAccount:
description: Masked card number e.g. "403587XXXXXX4977". Null when not captured.
type: string
piaCaptureDate:
format: date-time
description: UTC date/time the charge was captured. Null when not captured.
type: string
piaCardType:
description: '"Visa", "Mastercard", "American Express", or empty. Null when no charge.'
type: string
deliveryRecipientName:
description: Delivery recipient name.
type: string
deliveryAddress:
description: Formatted delivery address (read-only — FullAddressWithCommas).
type: string
deliveryPhone:
type: string
deliveryNotes:
type: string
deliveryAgentId:
format: int32
description: 'Currently assigned delivery agent enum value.
PharmacyDriver=1, Kings=2, AusPost=4. Null when not yet assigned.'
type: integer
deliveryCompleted:
description: True when the delivery has been marked as completed (FR20).
type: boolean
availableDeliveryAgents:
description: Delivery agents available for this pharmacy (FR19).
type: array
items:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.DeliveryAgentOptionModel'
totalPrice:
format: double
description: 'Sum of every component price including the Delivery-Cost line — this matches
the MVC PendingOrder.cshtml displayed total (NFR-F1 fidelity).
Required by Story 4.2 — pricing must not require a separate API call.'
type: number
totalGst:
format: double
description: Sum of every component's GST including the Delivery-Cost line (see TotalPrice).
type: number
lineItems:
type: array
items:
$ref: '#/components/schemas/MedAdvisor.PharmacyUnifiedAPI.v1.Models.PendingOrderLineItemModel'
isDeleted:
description: 'True when the order was soft-deleted (dismissed by the pharmacist).
Only meaningful in the completed order context — pending orders are never deleted.
When true the completed order dialog shows a "Dismissed" banner and hides action buttons.'
type: boolean
MedAdvisor.PharmacyUnifiedAPI.v1.Models.AddLineItemRequest:
description: Request body for POST /RefillOrder/LineItem/{orderId} (RAP-6 — Story 3.5, FR13).
type: object
properties:
name:
description: Custom item display name (max 50 chars, matching MVC input maxlength).
type: string
quantity:
format: int32
description: Quantity to dispense. Defaults to 1 when absent or zero.
type: integer
MedAdvisor.PharmacyUnifiedAPI.v1.Models.LineItemPriceEntry:
description: Per-component price entered by the pharmacist at PIA order completion.
type: object
properties:
componentId:
format: int32
type: integer
price:
format: double
description: 'Total price entered by the pharmacist. When GstApplies=true this is the GST-inclusive
amount; GST = Round(Price/11, 2), Net = Price - GST. Matches MVC behaviour.'
type: number
gstApplies:
description: True when the item is subject to GST.
type: boolean
MedAdvisor.PharmacyUnifiedAPI.v1.Models.SendReminderRequest:
description: Request body for POST /api/v1/RefillOrder/CompletedOrder/{orderId}/Reminder (Epic 6 — Story 6.2).
type: object
properties:
message:
type: string
MedAdvisor.PharmacyUnifiedAPI.v1.Models.SendEScriptRequest:
description: Request body for POST /RefillOrder/SendEScript (RAP-6 — Story 3.3, FR16).
type: object
properties:
orderId:
format: int32
type: integer
token:
type: string
MedAdvisor.PharmacyUnifiedAPI.v1.Models.AddNoteRequest:
description: Request body for POST /RefillOrder/AddNote (Epic 5 — Story 5.1, FR24).
type: object
properties:
orderId:
format: int32
type: integer
note:
description: Note text. Pass null or empty string to clear the existing note. Max 250 chars.
type: string
MedAdvisor.PharmacyUnifiedAPI.v1.Models.UpdateDeliveryRequest:
description: 'Request body for PUT /RefillOrder/Delivery/{orderId} (Story 4.1 — FR18, FR19, FR20).
All fields are optional — only non-null values are applied.'
type: object
properties:
recipientName:
description: Recipient name (FR18).
type: string
phone:
description: Recipient phone number (FR18).
type: string
notes:
description: Delivery notes for the courier (FR18).
type: string
deliveryAgent:
format: int32
description: 'Delivery agent integer value (FR19).
PharmacyDriver=1, Kings=2, AusPost=4.'
type: integer
markAsCompleted:
description: 'When true, marks the delivery as completed (FR20).
When false, clears the completed date.
Null leaves the current status unchanged.'
type: boolean
MedAdvisor.PharmacyUnifiedAPI.v1.Models.SendEScriptResponse:
description: "Response from POST /RefillOrder/SendEScript (RAP-6 — Story 3.3, FR16).\n \nAlways returned as HTTP 200 so Angular can distinguish the three outcomes without\nintercepting HTTP errors:\n SUCCESS — token sent to MedView Flow successfully.\n FALLBACK_TO_PLUSONE — pharmacy has no MedView Flow ID; Angular must call the\n PlusOne JS bridge (uicontroller.SendEScriptTokenToDispense).\n ERROR — MedView Flow returned an error; Message contains detail."
type: object
properties:
# --- truncated at 32 KB (36 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/medadvisor/refs/heads/main/openapi/medadvisor-refillorder-api-openapi.yml