Hmx Accounts

<back to all web services

GetProducts

Requires Authentication
The following routes are available for this service:
GET/api/productsSearch for Products
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class GetProducts
    {
        public String applicationId = null;
        public String feature = null;
        public String scope = null;
        public String name = null;
        public String productType = null;
        public Integer year = null;
        public String requiredProductId = null;
        public Boolean isVisible = null;
        
        public String getApplicationId() { return applicationId; }
        public GetProducts setApplicationId(String value) { this.applicationId = value; return this; }
        public String getFeature() { return feature; }
        public GetProducts setFeature(String value) { this.feature = value; return this; }
        public String getScope() { return scope; }
        public GetProducts setScope(String value) { this.scope = value; return this; }
        public String getName() { return name; }
        public GetProducts setName(String value) { this.name = value; return this; }
        public String getProductType() { return productType; }
        public GetProducts setProductType(String value) { this.productType = value; return this; }
        public Integer getYear() { return year; }
        public GetProducts setYear(Integer value) { this.year = value; return this; }
        public String getRequiredProductId() { return requiredProductId; }
        public GetProducts setRequiredProductId(String value) { this.requiredProductId = value; return this; }
        public Boolean getIsVisible() { return isVisible; }
        public GetProducts setIsVisible(Boolean value) { this.isVisible = 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; }
    }

}

Java GetProducts DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /api/products HTTP/1.1 
Host: accounts.dev.healthmonix.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
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}}]}