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}

export class WebshopOrderLineSummary
{
    public id?: number;
    public productId?: number;
    public variantId?: number;
    public productName?: string;
    public size?: string;
    public color?: string;
    public unitPriceMinor?: number;
    public quantity?: number;
    public lineTotalMinor?: number;
    public status?: string;
    public payoutInfoId?: number;
    public payoutTag?: string;

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

export class WebshopOrderSummary
{
    public id?: number;
    public orderReference?: string;
    public ownerId?: number;
    public status?: string;
    public totalMinor?: number;
    public deliveryFeeMinor?: number;
    public totalDiscountMinor?: number;
    public currency?: string;
    public buyerName?: string;
    public buyerEmail?: string;
    public buyerPhone?: string;
    public address?: string;
    public city?: string;
    public zipCode?: string;
    public country?: string;
    public deliveryType?: string;
    public droppOrderId?: string;
    public droppLocationId?: string;
    public needsDeliveryAttention?: boolean;
    public paymentMethodId?: string;
    public paymentId?: string;
    public paymentReference?: string;
    public discountCode?: string;
    public giftPaidMinor?: number;
    public createdAt?: string;
    public updatedAt?: string;
    public lines?: WebshopOrderLineSummary[];

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

export class WebshopOrderTransaction
{
    public id?: number;
    public orderId?: number;
    // @StringLength(20)
    public kind?: string;

    public amountMinor?: number;
    // @StringLength(50)
    public paymentReference?: string;

    // @StringLength(300)
    public note?: string;

    // @StringLength(100)
    public idempotencyKey?: string;

    public createdAt?: string;
    // @StringLength(100)
    public createdBy?: string;

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

export class WebshopOrderLedgerResult
{
    public order?: WebshopOrderSummary;
    public transactions?: WebshopOrderTransaction[];
    public statusCode?: number;
    public message?: string;

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

export class WebshopOrderLedgerRequest
{
    public orderId?: number;
    public ownerId?: number;

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

TypeScript 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
}