| GET | /stock/{brand}/{posCode} | Get Paginated Stock |
|---|
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
open class GetStockPaginated : IPagedRequest
{
/**
* Brand
*/
@ApiMember(Description="Brand", IsRequired=true)
open var brand:String? = null
/**
* POS Legacy
*/
@ApiMember(Description="POS Legacy", IsRequired=true)
open var posCode:String? = null
/**
* Search Key (Article or SerialNumber)
*/
@ApiMember(Description="Search Key (Article or SerialNumber)")
open var searchKey:String? = null
/**
* Index of the result set returned
*/
@ApiMember(Description="Index of the result set returned")
override var page:Int? = null
/**
* Size of the result set returned
*/
@ApiMember(Description="Size of the result set returned")
override var items:Int? = null
/**
* Omit precise record count - save on performance
*/
@ApiMember(Description="Omit precise record count - save on performance")
override var noCount:Boolean? = null
/**
* Sorting expression
*/
@ApiMember(Description="Sorting expression")
override var sortBy:String? = null
/**
* Parameter - Include Chain POSes Stock
*/
@ApiMember(Description="Parameter - Include Chain POSes Stock ")
open var includeChainPosesStock:Boolean? = null
/**
* Include Retail Sales Price in the Output, by default: false
*/
@ApiMember(Description="Include Retail Sales Price in the Output, by default: false")
open var includeRSP:Boolean? = null
/**
* Storage Location Identifier e.g. CPO, NEW, REP
*/
@ApiMember(Description="Storage Location Identifier e.g. CPO, NEW, REP")
open var storageLocationId:String? = null
/**
* Inventory segment e.g. CPO or null
*/
@ApiMember(Description="Inventory segment e.g. CPO or null")
open var inventorySegment:String? = null
}
open class GetStockPaginatedResponse
{
/**
* Total Pages
*/
@ApiMember(Description="Total Pages", IsRequired=true)
open var totalPages:Int? = null
/**
* Total Results
*/
@ApiMember(Description="Total Results", IsRequired=true)
open var totalResults:Int? = null
/**
* Index of the result set returned
*/
@ApiMember(Description="Index of the result set returned", IsRequired=true)
open var page:Int? = null
/**
* Size of the result set returned
*/
@ApiMember(Description="Size of the result set returned", IsRequired=true)
open var items:Int? = null
/**
* List of movements
*/
@ApiMember(Description="List of movements", IsRequired=true)
open var elements:ArrayList<PaginatedStockElement>? = null
}
open class PaginatedStockElement
{
/**
* Pos Code
*/
@ApiMember(Description="Pos Code", IsRequired=true)
open var posCode:String? = null
/**
* Pos Code To Be Displayed
*/
@ApiMember(Description="Pos Code To Be Displayed", IsRequired=true)
open var posCodeToBeDisplayed:String? = null
/**
* Article Code
*/
@ApiMember(Description="Article Code", IsRequired=true)
open var articleCode:String? = null
/**
* Serial Number
*/
@ApiMember(Description="Serial Number")
open var serialNumber:String? = null
/**
* Current Stock Quantity
*/
@ApiMember(Description="Current Stock Quantity", IsRequired=true)
open var quantity:Int? = null
/**
* Type e.g. consignment or standard
*/
@ApiMember(Description="Type e.g. consignment or standard", IsRequired=true)
@SerializedName("type") open var Type:String? = null
/**
* Is Consignment Sellable
*/
@ApiMember(Description="Is Consignment Sellable ", IsRequired=true)
open var isConsignmentSellable:Boolean? = null
/**
* Retail Sales Price
*/
@ApiMember(Description="Retail Sales Price", IsRequired=true)
open var retailSalesPrice:RetailSalesPrice? = null
/**
* Storage Location
*/
@ApiMember(Description="Storage Location")
open var storageLocation:StorageLocation? = null
}
open class RetailSalesPrice
{
/**
* Currency Iso Code
*/
@ApiMember(Description="Currency Iso Code", IsRequired=true)
open var currencyIsoCode:String? = null
/**
* Value
*/
@ApiMember(Description="Value", IsRequired=true)
open var value:BigDecimal? = null
}
open class StorageLocation
{
/**
* Storage Location Identifier
*/
@ApiMember(Description="Storage Location Identifier", IsRequired=true)
open var storageLocationId:String? = null
/**
* Storage Location Description
*/
@ApiMember(Description="Storage Location Description")
open var storageLocationDs: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}/{posCode} 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}