TicketUserServices

<back to all web services

WebshopOrderLedgerRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdminRequires the permission:ReadData
The following routes are available for this service:
GET/Webshop/Order/Ledger/{OrderId}
import Foundation
import ServiceStack

public class WebshopOrderLedgerRequest : Codable
{
    public var orderId:Int?
    public var ownerId:Int?

    required public init(){}
}

public class WebshopOrderLedgerResult : Codable
{
    public var order:WebshopOrderSummary?
    public var transactions:[WebshopOrderTransaction] = []
    public var statusCode:Int?
    public var message:String?

    required public init(){}
}

public class WebshopOrderSummary : Codable
{
    public var id:Int?
    public var orderReference:String?
    public var ownerId:Int?
    public var status:String?
    public var totalMinor:Int?
    public var deliveryFeeMinor:Int?
    public var totalDiscountMinor:Int?
    public var currency:String?
    public var buyerName:String?
    public var buyerEmail:String?
    public var buyerPhone:String?
    public var address:String?
    public var city:String?
    public var zipCode:String?
    public var country:String?
    public var deliveryType:String?
    public var droppOrderId:String?
    public var droppLocationId:String?
    public var needsDeliveryAttention:Bool?
    public var paymentMethodId:String?
    public var paymentId:String?
    public var paymentReference:String?
    public var discountCode:String?
    public var giftPaidMinor:Int?
    public var createdAt:Date?
    public var updatedAt:Date?
    public var lines:[WebshopOrderLineSummary] = []

    required public init(){}
}

public class WebshopOrderLineSummary : Codable
{
    public var id:Int?
    public var productId:Int?
    public var variantId:Int?
    public var productName:String?
    public var size:String?
    public var color:String?
    public var unitPriceMinor:Int?
    public var quantity:Int?
    public var lineTotalMinor:Int?
    public var status:String?
    public var payoutInfoId:Int?
    public var payoutTag:String?

    required public init(){}
}

public class WebshopOrderTransaction : Codable
{
    public var id:Int?
    public var orderId:Int?
    // @StringLength(20)
    public var kind:String?

    public var amountMinor:Int?
    // @StringLength(50)
    public var paymentReference:String?

    // @StringLength(300)
    public var note:String?

    // @StringLength(100)
    public var idempotencyKey:String?

    public var createdAt:Date?
    // @StringLength(100)
    public var createdBy:String?

    required public init(){}
}


Swift WebshopOrderLedgerRequest DTOs

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

HTTP + JSV

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

GET /Webshop/Order/Ledger/{OrderId} HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	order: 
	{
		id: 0,
		orderReference: String,
		ownerId: 0,
		status: String,
		totalMinor: 0,
		deliveryFeeMinor: 0,
		totalDiscountMinor: 0,
		currency: String,
		buyerName: String,
		buyerEmail: String,
		buyerPhone: String,
		address: String,
		city: String,
		zipCode: String,
		country: String,
		deliveryType: String,
		droppOrderId: String,
		droppLocationId: String,
		needsDeliveryAttention: False,
		paymentMethodId: String,
		paymentId: String,
		paymentReference: String,
		discountCode: String,
		giftPaidMinor: 0,
		createdAt: 0001-01-01,
		updatedAt: 0001-01-01,
		lines: 
		[
			{
				id: 0,
				productId: 0,
				variantId: 0,
				productName: String,
				size: String,
				color: String,
				unitPriceMinor: 0,
				quantity: 0,
				lineTotalMinor: 0,
				status: String,
				payoutInfoId: 0,
				payoutTag: String
			}
		]
	},
	transactions: 
	[
		{
			id: 0,
			orderId: 0,
			kind: String,
			amountMinor: 0,
			paymentReference: String,
			note: String,
			idempotencyKey: String,
			createdAt: 0001-01-01,
			createdBy: String
		}
	],
	statusCode: 0,
	message: String
}