| POST | /stock/{brand}/transferBulk | Bulk Transfer Stock from one POS to another |
|---|
import Foundation
import ServiceStack
public class TransferStockBulk : Codable
{
/**
* Brand Trigram
*/
// @ApiMember(Description="Brand Trigram", IsRequired=true)
public var brand:String
/**
* POS of the stock origin
*/
// @ApiMember(Description="POS of the stock origin", IsRequired=true)
public var posCodeOrigin:String
/**
* POS of the stock destination
*/
// @ApiMember(Description="POS of the stock destination", IsRequired=true)
public var posCodeDestination:String
/**
* Items to be transferred
*/
// @ApiMember(Description="Items to be transferred", IsRequired=true)
public var items:[Item] = []
required public init(){}
}
public class Item : Codable
{
/**
* Article Code of the item to be transferred
*/
// @ApiMember(Description="Article Code of the item to be transferred", IsRequired=true)
public var articleCode:String
/**
* Quantity of the the item to be transferred
*/
// @ApiMember(Description="Quantity of the the item to be transferred", IsRequired=true)
public var quantity:Int
/**
* Serial Numbers of the item to be transferred
*/
// @ApiMember(Description="Serial Numbers of the item to be transferred")
public var serialNumbers:[String] = []
required public init(){}
}
public class TransferStockBulkResponse : Codable
{
/**
* Response of items
*/
// @ApiMember(Description="Response of items", IsRequired=true)
public var items:[ItemResponse] = []
required public init(){}
}
public class ItemResponse : Codable
{
/**
* Article Code of the item response
*/
// @ApiMember(Description="Article Code of the item response", IsRequired=true)
public var articleCode:String
/**
* Status of Stock Transfer: 1 means done, 2 means might take a while because consignment transfers need to be approved by SAP
*/
// @ApiMember(Description="Status of Stock Transfer: 1 means done, 2 means might take a while because consignment transfers need to be approved by SAP", IsRequired=true)
public var stockTransferStatusId:Int
/**
* Errors of items
*/
// @ApiMember(Description="Errors of items", IsRequired=true)
public var errors:[Lookup<String>] = []
required public init(){}
}
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 /stock/{brand}/transferBulk HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"brand":"String","posCodeOrigin":"String","posCodeDestination":"String","items":[{"articleCode":"String","quantity":0,"serialNumbers":["String"]}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"items":[{"articleCode":"String","stockTransferStatusId":0,"errors":[{"id":"String","description":"String"}]}]}