TicketUserServices

<back to all web services

WebshopVariantRestockRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdminRequired permission:Tickets.Add
The following routes are available for this service:
POST/Webshop/Variant/Restock
import Foundation
import ServiceStack

public class WebshopVariantRestockRequest : Codable
{
    public var variantId:Int?
    public var kind:String?
    public var quantity:Int?
    public var note:String?
    public var idempotencyKey:String?
    public var ownerId:Int?

    required public init(){}
}

public class WebshopVariantResult : Codable
{
    public var variant:WebshopVariantSummary?
    public var statusCode:Int?
    public var message:String?

    required public init(){}
}

public class WebshopVariantSummary : Codable
{
    public var id:Int?
    public var productId:Int?
    public var size:String?
    public var color:String?
    public var stockOnHand:Int?
    public var quantitySold:Int?
    public var availableQuantity:Int?
    public var status:String?

    required public init(){}
}


Swift WebshopVariantRestockRequest 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.

POST /Webshop/Variant/Restock HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	variantId: 0,
	kind: String,
	quantity: 0,
	note: String,
	idempotencyKey: String,
	ownerId: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	variant: 
	{
		id: 0,
		productId: 0,
		size: String,
		color: String,
		stockOnHand: 0,
		quantitySold: 0,
		availableQuantity: 0,
		status: String
	},
	statusCode: 0,
	message: String
}