Hmx Accounts

<back to all web services

GetPurchaseOrders

The following routes are available for this service:
GET/api/purchaseordersSearch for PurchaseOrders
import java.math.*
import java.util.*
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


open class GetPurchaseOrders
{
    var userId:String? = null
    var fromDate:Date? = null
    var toDate:Date? = null
    @SerializedName("void") var Void:Boolean? = null
    var paid:Boolean? = null
    var transactionIdentifier:String? = null
    var couponCode:String? = null
}

open class GetPurchaseOrdersResponse
{
    var results:ArrayList<PurchaseOrderDto> = ArrayList<PurchaseOrderDto>()
}

open class PurchaseOrderDto
{
    var id:Int? = null
    var userId:String? = null
    var createdDate:Date? = null
    var paymentType:String? = null
    @SerializedName("void") var Void:Boolean? = null
    var paid:Boolean? = null
    var transactionIdentifier:String? = null
    var couponCode:String? = null
    var orderItems:ArrayList<PurchaseOrderItem> = ArrayList<PurchaseOrderItem>()
    var payer:String? = null
    var billingAddressLine1:String? = null
    var billingAddressCity:String? = null
    var billingAddressState:String? = null
    var billingAddressPostalCode:String? = null
    var billingAddressCountryCode:String? = null
}

open class PurchaseOrderItem
{
    var id:Int? = null
    @References(PurchaseOrder.class)
    var purchaseOrderId:Int? = null

    @References(Product.class)
    var productId:String? = null

    var productName:String? = null
    var quantity:Int? = null
    var price:BigDecimal? = null
    var discountDescription:String? = null
    var discountSource:String? = null
    var discount:BigDecimal? = null
    var createdDate:Date? = null
}

Kotlin GetPurchaseOrders DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /api/purchaseorders HTTP/1.1 
Host: accounts.dev.healthmonix.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetPurchaseOrdersResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Hmx.Accounts.ServiceModels">
  <Results>
    <PurchaseOrderDto>
      <BillingAddressCity>String</BillingAddressCity>
      <BillingAddressCountryCode>String</BillingAddressCountryCode>
      <BillingAddressLine1>String</BillingAddressLine1>
      <BillingAddressPostalCode>String</BillingAddressPostalCode>
      <BillingAddressState>String</BillingAddressState>
      <CouponCode>String</CouponCode>
      <CreatedDate>0001-01-01T00:00:00</CreatedDate>
      <Id>0</Id>
      <OrderItems xmlns:d4p1="http://schemas.datacontract.org/2004/07/Hmx.Accounts.Models">
        <d4p1:PurchaseOrderItem>
          <d4p1:CreatedDate>0001-01-01T00:00:00</d4p1:CreatedDate>
          <d4p1:Discount>0</d4p1:Discount>
          <d4p1:DiscountDescription>String</d4p1:DiscountDescription>
          <d4p1:DiscountSource>String</d4p1:DiscountSource>
          <d4p1:Id>0</d4p1:Id>
          <d4p1:Price>0</d4p1:Price>
          <d4p1:ProductId>String</d4p1:ProductId>
          <d4p1:ProductName>String</d4p1:ProductName>
          <d4p1:PurchaseOrderId>0</d4p1:PurchaseOrderId>
          <d4p1:Quantity>0</d4p1:Quantity>
        </d4p1:PurchaseOrderItem>
      </OrderItems>
      <Paid>false</Paid>
      <Payer>String</Payer>
      <PaymentType>String</PaymentType>
      <TransactionIdentifier>String</TransactionIdentifier>
      <UserId>String</UserId>
      <Void>false</Void>
    </PurchaseOrderDto>
  </Results>
</GetPurchaseOrdersResponse>