Hmx Accounts

<back to all web services

GetPurchaseOrder

The following routes are available for this service:
GET/api/purchaseorders/{id}Get a PurchaseOrder
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Hmx.Accounts.ServiceModels
Imports Hmx.Accounts.Models

Namespace Global

    Namespace Hmx.Accounts.Models

        Public Partial Class PurchaseOrderItem
            Public Overridable Property Id As Integer
            <References(GetType(PurchaseOrder))>
            Public Overridable Property PurchaseOrderId As Integer

            <References(GetType(Product))>
            Public Overridable Property ProductId As String

            Public Overridable Property ProductName As String
            Public Overridable Property Quantity As Integer
            Public Overridable Property Price As Decimal
            Public Overridable Property DiscountDescription As String
            Public Overridable Property DiscountSource As String
            Public Overridable Property Discount As Decimal
            Public Overridable Property CreatedDate As Date
        End Class
    End Namespace

    Namespace Hmx.Accounts.ServiceModels

        Public Partial Class GetPurchaseOrder
            Public Overridable Property Id As Integer
        End Class

        Public Partial Class PurchaseOrderDto
            Public Sub New()
                OrderItems = New List(Of PurchaseOrderItem)
            End Sub

            Public Overridable Property Id As Integer
            Public Overridable Property UserId As String
            Public Overridable Property CreatedDate As Date
            Public Overridable Property PaymentType As String
            Public Overridable Property Void As Boolean
            Public Overridable Property Paid As Boolean
            Public Overridable Property TransactionIdentifier As String
            Public Overridable Property CouponCode As String
            Public Overridable Property OrderItems As List(Of PurchaseOrderItem)
            Public Overridable Property Payer As String
            Public Overridable Property BillingAddressLine1 As String
            Public Overridable Property BillingAddressCity As String
            Public Overridable Property BillingAddressState As String
            Public Overridable Property BillingAddressPostalCode As String
            Public Overridable Property BillingAddressCountryCode As String
        End Class
    End Namespace
End Namespace

VB.NET GetPurchaseOrder 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/{id} HTTP/1.1 
Host: accounts.dev.healthmonix.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<PurchaseOrderDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Hmx.Accounts.ServiceModels">
  <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:d2p1="http://schemas.datacontract.org/2004/07/Hmx.Accounts.Models">
    <d2p1:PurchaseOrderItem>
      <d2p1:CreatedDate>0001-01-01T00:00:00</d2p1:CreatedDate>
      <d2p1:Discount>0</d2p1:Discount>
      <d2p1:DiscountDescription>String</d2p1:DiscountDescription>
      <d2p1:DiscountSource>String</d2p1:DiscountSource>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:Price>0</d2p1:Price>
      <d2p1:ProductId>String</d2p1:ProductId>
      <d2p1:ProductName>String</d2p1:ProductName>
      <d2p1:PurchaseOrderId>0</d2p1:PurchaseOrderId>
      <d2p1:Quantity>0</d2p1:Quantity>
    </d2p1:PurchaseOrderItem>
  </OrderItems>
  <Paid>false</Paid>
  <Payer>String</Payer>
  <PaymentType>String</PaymentType>
  <TransactionIdentifier>String</TransactionIdentifier>
  <UserId>String</UserId>
  <Void>false</Void>
</PurchaseOrderDto>