| Requires any of the roles: | Admin, TeamAdmin | Required permission: | Tickets.Add |
| 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 .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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: application/json
Content-Type: application/json
Content-Length: length
{"variantId":0,"kind":"String","quantity":0,"note":"String","idempotencyKey":"String","ownerId":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"variant":{"id":0,"productId":0,"size":"String","color":"String","stockOnHand":0,"quantitySold":0,"availableQuantity":0,"status":"String"},"statusCode":0,"message":"String"}