GET | /api/products/{id}/childproducts | Get Child Products for the product |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class GetChildProducts
{
public String id = null;
public String getId() { return id; }
public GetChildProducts setId(String value) { this.id = value; return this; }
}
public static class GetProductsResponse
{
public ArrayList<ProductDto> results = null;
public ArrayList<ProductDto> getResults() { return results; }
public GetProductsResponse setResults(ArrayList<ProductDto> value) { this.results = value; return this; }
}
public static class ProductDto
{
public String id = null;
public String name = null;
public String description = null;
public String longDescription = null;
public String details = null;
public BigDecimal price = null;
public String productType = null;
public Integer year = null;
public String applicationId = null;
public String requiredProductId = null;
public String scope = null;
public String feature = null;
public Boolean isVisible = null;
public String iconUrl = null;
public HashMap<Integer,BigDecimal> volumeDiscounts = null;
public String getId() { return id; }
public ProductDto setId(String value) { this.id = value; return this; }
public String getName() { return name; }
public ProductDto setName(String value) { this.name = value; return this; }
public String getDescription() { return description; }
public ProductDto setDescription(String value) { this.description = value; return this; }
public String getLongDescription() { return longDescription; }
public ProductDto setLongDescription(String value) { this.longDescription = value; return this; }
public String getDetails() { return details; }
public ProductDto setDetails(String value) { this.details = value; return this; }
public BigDecimal getPrice() { return price; }
public ProductDto setPrice(BigDecimal value) { this.price = value; return this; }
public String getProductType() { return productType; }
public ProductDto setProductType(String value) { this.productType = value; return this; }
public Integer getYear() { return year; }
public ProductDto setYear(Integer value) { this.year = value; return this; }
public String getApplicationId() { return applicationId; }
public ProductDto setApplicationId(String value) { this.applicationId = value; return this; }
public String getRequiredProductId() { return requiredProductId; }
public ProductDto setRequiredProductId(String value) { this.requiredProductId = value; return this; }
public String getScope() { return scope; }
public ProductDto setScope(String value) { this.scope = value; return this; }
public String getFeature() { return feature; }
public ProductDto setFeature(String value) { this.feature = value; return this; }
public Boolean getIsVisible() { return isVisible; }
public ProductDto setIsVisible(Boolean value) { this.isVisible = value; return this; }
public String getIconUrl() { return iconUrl; }
public ProductDto setIconUrl(String value) { this.iconUrl = value; return this; }
public HashMap<Integer,BigDecimal> getVolumeDiscounts() { return volumeDiscounts; }
public ProductDto setVolumeDiscounts(HashMap<Integer,BigDecimal> value) { this.volumeDiscounts = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/products/{id}/childproducts HTTP/1.1 Host: accounts.dev.healthmonix.com Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { results: [ { id: String, name: String, description: String, longDescription: String, details: String, price: 0, productType: String, year: 0, applicationId: String, requiredProductId: String, scope: String, feature: String, isVisible: False, iconUrl: String, volumeDiscounts: { 0: 0 } } ] }