| POST | /purchase/{brand}/export | Export Order Data |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class ExportOrder
{
/**
* Brand Trigram, e.g. CAR, IWC
*/
@ApiMember(Description="Brand Trigram, e.g. CAR, IWC", IsRequired=true)
public String brand = null;
/**
* POS Legacy
*/
@ApiMember(Description="POS Legacy", IsRequired=true)
public ArrayList<String> posCodes = null;
/**
* Date To
*/
@ApiMember(Description="Date To")
public Date dateTo = null;
/**
* Date From
*/
@ApiMember(Description="Date From")
public Date dateFrom = null;
/**
* Possible order statues: B (Backorder), C (Created), D (Draft), I (In transit)N (Pending), P (Shipped), PS (Partially shipped), R (Reserved), X (RP Simulated), Z (Deleted)
*/
@ApiMember(Description="Possible order statues: B (Backorder), C (Created), D (Draft), I (In transit)N (Pending), P (Shipped), PS (Partially shipped), R (Reserved), X (RP Simulated), Z (Deleted)")
public ArrayList<String> status = null;
/**
* Reason Code e.g. Y00, Y06
*/
@ApiMember(Description="Reason Code e.g. Y00, Y06")
public ArrayList<String> reasonCode = null;
/**
* Product Categories
*/
@ApiMember(Description="Product Categories")
public ArrayList<ProductCategory> productCategories = null;
/**
* Final Ship To Pos Codes
*/
@ApiMember(Description="Final Ship To Pos Codes")
public ArrayList<String> finalShipTo = null;
/**
* Export Request ID of the API Consumers
*/
@ApiMember(Description="Export Request ID of the API Consumers", IsRequired=true)
public String downloadRequestId = null;
public String getBrand() { return brand; }
public ExportOrder setBrand(String value) { this.brand = value; return this; }
public ArrayList<String> getPosCodes() { return posCodes; }
public ExportOrder setPosCodes(ArrayList<String> value) { this.posCodes = value; return this; }
public Date getDateTo() { return dateTo; }
public ExportOrder setDateTo(Date value) { this.dateTo = value; return this; }
public Date getDateFrom() { return dateFrom; }
public ExportOrder setDateFrom(Date value) { this.dateFrom = value; return this; }
public ArrayList<String> getStatus() { return status; }
public ExportOrder setStatus(ArrayList<String> value) { this.status = value; return this; }
public ArrayList<String> getReasonCode() { return reasonCode; }
public ExportOrder setReasonCode(ArrayList<String> value) { this.reasonCode = value; return this; }
public ArrayList<ProductCategory> getProductCategories() { return productCategories; }
public ExportOrder setProductCategories(ArrayList<ProductCategory> value) { this.productCategories = value; return this; }
public ArrayList<String> getFinalShipTo() { return finalShipTo; }
public ExportOrder setFinalShipTo(ArrayList<String> value) { this.finalShipTo = value; return this; }
public String getDownloadRequestId() { return downloadRequestId; }
public ExportOrder setDownloadRequestId(String value) { this.downloadRequestId = value; return this; }
}
public static class ProductCategory
{
/**
* Brand Category ID
*/
@ApiMember(Description="Brand Category ID")
public String brandCategoryId = null;
/**
* Grand Category ID
*/
@ApiMember(Description="Grand Category ID", IsRequired=true)
public String grandCategoryId = null;
/**
* Master Category ID
*/
@ApiMember(Description="Master Category ID")
public String masterCategoryId = null;
/**
* Category ID
*/
@ApiMember(Description="Category ID")
public String categoryId = null;
/**
* Sub Category ID
*/
@ApiMember(Description="Sub Category ID")
public String subCategoryId = null;
public String getBrandCategoryId() { return brandCategoryId; }
public ProductCategory setBrandCategoryId(String value) { this.brandCategoryId = value; return this; }
public String getGrandCategoryId() { return grandCategoryId; }
public ProductCategory setGrandCategoryId(String value) { this.grandCategoryId = value; return this; }
public String getMasterCategoryId() { return masterCategoryId; }
public ProductCategory setMasterCategoryId(String value) { this.masterCategoryId = value; return this; }
public String getCategoryId() { return categoryId; }
public ProductCategory setCategoryId(String value) { this.categoryId = value; return this; }
public String getSubCategoryId() { return subCategoryId; }
public ProductCategory setSubCategoryId(String value) { this.subCategoryId = value; return this; }
}
public static class ExportOrderResponse
{
/**
* Unique Identifier of the Export Request created
*/
@ApiMember(Description="Unique Identifier of the Export Request created", IsRequired=true)
public UUID asyncTaskId = null;
public UUID getAsyncTaskId() { return asyncTaskId; }
public ExportOrderResponse setAsyncTaskId(UUID value) { this.asyncTaskId = value; return this; }
}
}
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 /purchase/{brand}/export HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"brand":"String","posCodes":["String"],"dateTo":"\/Date(-62135596800000-0000)\/","dateFrom":"\/Date(-62135596800000-0000)\/","status":["String"],"reasonCode":["String"],"productCategories":[{"brandCategoryId":"String","grandCategoryId":"String","masterCategoryId":"String","categoryId":"String","subCategoryId":"String"}],"finalShipTo":["String"],"downloadRequestId":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"asyncTaskId":"00000000000000000000000000000000"}