| GET | /stock/{brand}/movement | Get movements |
|---|
import java.math.*
import java.util.*
import net.servicestack.client.*
open class GetMovements : MovementsRequest(), IPagedRequest
{
/**
* Index of the result set returned
*/
@ApiMember(Description="Index of the result set returned")
var page:Int? = null
/**
* Size of the result set returned
*/
@ApiMember(Description="Size of the result set returned")
var items:Int? = null
/**
* Omit precise record count - save on performance
*/
@ApiMember(Description="Omit precise record count - save on performance")
var noCount:Boolean? = null
}
open class MovementsRequest
{
/**
* Brand
*/
@ApiMember(Description="Brand", IsRequired=true)
var brand:String? = null
/**
* POS Legacy
*/
@ApiMember(Description="POS Legacy", IsRequired=true)
var posCodes:ArrayList<String> = ArrayList<String>()
/**
* Movement Type Ids
*/
@ApiMember(Description="Movement Type Ids")
var movementTypeIds:ArrayList<Int> = ArrayList<Int>()
/**
* Search Key (Article or SerialNumber)
*/
@ApiMember(Description="Search Key (Article or SerialNumber)")
var searchKey:String? = null
/**
* In Stock Since date from
*/
@ApiMember(Description="In Stock Since date from ")
var dateFrom:Date? = null
/**
* In Stock Since date to
*/
@ApiMember(Description="In Stock Since date to")
var dateTo:Date? = null
/**
* Sort by date could be: 'DateDESC' or 'DateASC' (default is descending)
*/
@ApiMember(Description="Sort by date could be: 'DateDESC' or 'DateASC' (default is descending) ")
var sortBy:String? = null
}
open class GetMovementsResponse
{
/**
* Total Pages
*/
@ApiMember(Description="Total Pages", IsRequired=true)
var totalPages:Int? = null
/**
* Total Results
*/
@ApiMember(Description="Total Results", IsRequired=true)
var totalResults:Int? = null
/**
* Index of the result set returned
*/
@ApiMember(Description="Index of the result set returned", IsRequired=true)
var page:Int? = null
/**
* Size of the result set returned
*/
@ApiMember(Description="Size of the result set returned", IsRequired=true)
var items:Int? = null
/**
* List of movements
*/
@ApiMember(Description="List of movements", IsRequired=true)
var elements:ArrayList<Movement> = ArrayList<Movement>()
}
open class Movement
{
/**
* Movement Id
*/
@ApiMember(Description="Movement Id", IsRequired=true)
var movementId:Int? = null
/**
* Pos Code
*/
@ApiMember(Description="Pos Code", IsRequired=true)
var posCode:String? = null
/**
* Pos Name
*/
@ApiMember(Description="Pos Name", IsRequired=true)
var posName:String? = null
/**
* Created By
*/
@ApiMember(Description="Created By", IsRequired=true)
var createdBy:String? = null
/**
* Movement Date
*/
@ApiMember(Description="Movement Date", IsRequired=true)
var movementDate:String? = null
/**
* Article Code
*/
@ApiMember(Description="Article Code", IsRequired=true)
var articleCode:String? = null
/**
* Serial Number
*/
@ApiMember(Description="Serial Number", IsRequired=true)
var serialNumber:String? = null
/**
* Quantity
*/
@ApiMember(Description="Quantity", IsRequired=true)
var quantity:Int? = null
/**
* Movement Type Id
*/
@ApiMember(Description="Movement Type Id", IsRequired=true)
var movementTypeId:Int? = null
/**
* Comments
*/
@ApiMember(Description="Comments", IsRequired=true)
var comments:String? = null
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /stock/{brand}/movement HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"totalPages":0,"totalResults":0,"page":0,"items":0}