Create Order
Definition
Service Location: https://gateway.pharmx.com.au/Gateway3/OrderManagement.asmx
Method Name: CreateOrder
Creates a purchase order and returns a unique PharmX order ID.
Parameters
userDetail
UserDetail
User credentials to authenticate the request.
The purchase order to be created.
Returns
CreateOrderResult
ActionResult (with an array of GatewayOrderAcknowledgement)
Upon a successful request, the GatewayOrderAcknowledgement will be available as the only object in the Documents
array. The Id
represents the PharmX order ID, which will need to be persisted for subsequent order-specific requests.
A ResultCode
of "99", indicates order compliance has failed. Check order compliance should be requested prior to determine what action is required to resolve the compliance error.
Remarks
To retrieve order acknowledgement lines, the order must be retrieved via GetOrderAck.
Suppliers may require specific data to be set in the PurchaseOrder, otherwise the order may be cancelled. See Supplier-Specific Order Header Requirements for more information.
The PharmX order ID returned should be stored for future order-specific requests, e.g. invoices and order acknowledgements.
To ensure order are not rejected due to not meeting minimum order value, the account minimum can be retrieved in advance by calling ListAccounts and viewing the MinimumOrderValue
.
The minimum order value compliance check may be bypassed by setting the Freight
to 99
, indicating that the pharmacy accepts additional charges applied by the supplier as a result.
The order reference must be unique per site, otherwise PharmX treats this as a duplicate order and will return the existing order.