Hmx Accounts

<back to all web services

GetPurchaseOrder

The following routes are available for this service:
GET/api/purchaseorders/{id}Get a PurchaseOrder

export class PurchaseOrderItem
{
    public id?: number;
    // @References("typeof(Hmx.Accounts.Models.PurchaseOrder)")
    public purchaseOrderId?: number;

    // @References("typeof(Hmx.Accounts.Models.Product)")
    public productId?: string;

    public productName?: string;
    public quantity?: number;
    public price?: number;
    public discountDescription?: string;
    public discountSource?: string;
    public discount?: number;
    public createdDate?: string;

    public constructor(init?: Partial<PurchaseOrderItem>) { (Object as any).assign(this, init); }
}

export class PurchaseOrderDto
{
    public id?: number;
    public userId?: string;
    public createdDate?: string;
    public paymentType?: string;
    public void?: boolean;
    public paid?: boolean;
    public transactionIdentifier?: string;
    public couponCode?: string;
    public orderItems?: PurchaseOrderItem[];
    public payer?: string;
    public billingAddressLine1?: string;
    public billingAddressCity?: string;
    public billingAddressState?: string;
    public billingAddressPostalCode?: string;
    public billingAddressCountryCode?: string;

    public constructor(init?: Partial<PurchaseOrderDto>) { (Object as any).assign(this, init); }
}

export class GetPurchaseOrder
{
    public id?: number;

    public constructor(init?: Partial<GetPurchaseOrder>) { (Object as any).assign(this, init); }
}

TypeScript GetPurchaseOrder DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"id":0,"userId":"String","createdDate":"0001-01-01T00:00:00.0000000","paymentType":"String","void":false,"paid":false,"transactionIdentifier":"String","couponCode":"String","orderItems":[{"id":0,"purchaseOrderId":0,"productId":"String","productName":"String","quantity":0,"price":0,"discountDescription":"String","discountSource":"String","discount":0,"createdDate":"0001-01-01T00:00:00.0000000"}],"payer":"String","billingAddressLine1":"String","billingAddressCity":"String","billingAddressState":"String","billingAddressPostalCode":"String","billingAddressCountryCode":"String"}