| POST | /stock/{brand}/export | Export Stock Data |
|---|
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 ExportStock : StockRequest()
{
/**
* Product Categories
*/
@ApiMember(Description="Product Categories")
open var productCategories:ArrayList<ProductCategory>? = null
/**
* Export Request ID of the API Consumers
*/
@ApiMember(Description="Export Request ID of the API Consumers", IsRequired=true)
open var downloadRequestId:String? = null
}
open class StockRequest
{
/**
* Brand
*/
@ApiMember(Description="Brand", IsRequired=true)
open var brand:String? = null
/**
* POS Legacy
*/
@ApiMember(Description="POS Legacy")
open var posCodes:ArrayList<String>? = null
/**
* Article Codes
*/
@ApiMember(Description="Article Codes")
open var articleCodes:ArrayList<String>? = null
/**
* Include Extra Info
*/
@ApiMember(Description="Include Extra Info")
open var includeExtraInfo:Boolean? = null
/**
* Cluster Id
*/
@ApiMember(Description="Cluster Id")
open var clusterIds:ArrayList<String>? = null
/**
* Include Consignment NotAuthorized POS
*/
@ApiMember(Description="Include Consignment NotAuthorized POS")
open var includeConsignmentNotAuthorizedPOS: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
/**
* In Stock Since date from
*/
@ApiMember(Description="In Stock Since date from ")
open var dateFrom:Date? = null
/**
* In Stock Since date to
*/
@ApiMember(Description="In Stock Since date to")
open var dateTo:Date? = null
/**
* Item type, 'standard' OR 'consigned'. By default, all are coming
*/
@ApiMember(Description="Item type, 'standard' OR 'consigned'. By default, all are coming")
@SerializedName("type") open var Type:String? = 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 ProductCategory
{
/**
* Brand Category ID
*/
@ApiMember(Description="Brand Category ID")
open var brandCategoryId:String? = null
/**
* Grand Category ID
*/
@ApiMember(Description="Grand Category ID", IsRequired=true)
open var grandCategoryId:String? = null
/**
* Master Category ID
*/
@ApiMember(Description="Master Category ID")
open var masterCategoryId:String? = null
/**
* Category ID
*/
@ApiMember(Description="Category ID")
open var categoryId:String? = null
/**
* Sub Category ID
*/
@ApiMember(Description="Sub Category ID")
open var subCategoryId:String? = null
}
open class ExportStockResponse
{
/**
* Unique Identifier of the Export Request created
*/
@ApiMember(Description="Unique Identifier of the Export Request created", IsRequired=true)
open var asyncTaskId:UUID? = 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.
POST /stock/{brand}/export HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"productCategories":[{"brandCategoryId":"String","grandCategoryId":"String","masterCategoryId":"String","categoryId":"String","subCategoryId":"String"}],"downloadRequestId":"String","brand":"String","posCodes":["String"],"articleCodes":["String"],"includeExtraInfo":false,"clusterIds":["String"],"includeConsignmentNotAuthorizedPOS":false,"includeRSP":false,"dateFrom":"\/Date(-62135596800000-0000)\/","dateTo":"\/Date(-62135596800000-0000)\/","type":"String","storageLocationId":"String","inventorySegment":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"asyncTaskId":"00000000000000000000000000000000"}