ServiceStack Home (Live)

<back to all web services

ViewOrder

Requires Authentication
The following routes are available for this service:
All Verbs/account/orders/{Id}
GET/ViewOrder
GET/ViewOrder/{Id}
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using MyApp.ServiceModel;

namespace MyApp.ServiceModel
{
    public partial class Order
        : IAddress
    {
        public virtual int Id { get; set; }
        public virtual int CustomerId { get; set; }
        public virtual string ProductName { get; set; }
        public virtual string FirstName { get; set; }
        public virtual string LastName { get; set; }
        public virtual string Email { get; set; }
        public virtual string Company { get; set; }
        public virtual string PhoneNumber { get; set; }
        public virtual string AddressLine1 { get; set; }
        public virtual string AddressLine2 { get; set; }
        public virtual string AddressCity { get; set; }
        public virtual string AddressZip { get; set; }
        public virtual string AddressState { get; set; }
        public virtual string AddressCountry { get; set; }
        public virtual bool AgreeTerms { get; set; }
        public virtual string Notes { get; set; }
        public virtual string Last4 { get; set; }
        public virtual int SubTotal { get; set; }
        public virtual string CouponId { get; set; }
        public virtual int Discount { get; set; }
        public virtual int Tax { get; set; }
        public virtual int Total { get; set; }
        public virtual int ItemQuantity { get; set; }
        public virtual int? AuthorizedQuantity { get; set; }
        public virtual int? SubscriptionId { get; set; }
        public virtual string LicenseRef { get; set; }
        public virtual int? PaymentId { get; set; }
        public virtual int? EmailId { get; set; }
        public virtual bool Paid { get; set; }
        public virtual DateTime CreatedDate { get; set; }
        public virtual DateTime ModifiedDate { get; set; }
        public virtual string ModifiedBy { get; set; }
        public virtual DateTime? CancelledDate { get; set; }
        public virtual string CancelledReason { get; set; }
        public virtual string IpAddress { get; set; }
        public virtual List<OrderDetail> OrderDetails { get; set; }
    }

    public partial class OrderDetail
    {
        public virtual int Id { get; set; }
        public virtual int OrderId { get; set; }
        public virtual int SkuId { get; set; }
        public virtual SkuType SkuType { get; set; }
        public virtual int Price { get; set; }
        public virtual string Description { get; set; }
        public virtual int Quantity { get; set; }
        public virtual int Total { get; set; }
    }

    public enum SkuType
    {
        Product,
        PerDev,
        PerCore,
        Site,
        Support,
        Training,
        Register,
        Payment,
    }

    public partial class ViewOrder
    {
        public virtual int Id { get; set; }
    }

}

C# ViewOrder DTOs

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

HTTP + OTHER

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

POST /account/orders/{Id} HTTP/1.1 
Host: account.servicestack.net 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"id":0,"customerId":0,"productName":"String","firstName":"String","lastName":"String","email":"String","company":"String","phoneNumber":"String","addressLine1":"String","addressLine2":"String","addressCity":"String","addressZip":"String","addressState":"String","addressCountry":"String","agreeTerms":false,"notes":"String","last4":"String","subTotal":0,"couponId":"String","discount":0,"tax":0,"total":0,"itemQuantity":0,"authorizedQuantity":0,"subscriptionId":0,"licenseRef":"String","paymentId":0,"emailId":0,"paid":false,"createdDate":"\/Date(-62135596800000-0000)\/","modifiedDate":"\/Date(-62135596800000-0000)\/","modifiedBy":"String","cancelledDate":"\/Date(-62135596800000-0000)\/","cancelledReason":"String","ipAddress":"String","orderDetails":[{"id":0,"orderId":0,"skuId":0,"skuType":"Product","price":0,"description":"String","quantity":0,"total":0}]}