Trendsic Platform Service

<back to all web services

MaterialTypeRequest

Requires Authentication
The following routes are available for this service:
GET,POST,PUT,DELETE,OPTIONS/v1/MaterialType/{MaterialTypeID}
GET,POST,PUT,DELETE,OPTIONS/v1/MaterialType
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class MaterialTypeRequest
    {
        public Integer MaterialTypeID = null;
        public ArrayList<MaterialType> MaterialType = new ArrayList<MaterialType>();
        
        public Integer getMaterialTypeID() { return MaterialTypeID; }
        public MaterialTypeRequest setMaterialTypeID(Integer value) { this.MaterialTypeID = value; return this; }
        public ArrayList<MaterialType> getMaterialType() { return MaterialType; }
        public MaterialTypeRequest setMaterialType(ArrayList<MaterialType> value) { this.MaterialType = value; return this; }
    }

    public static class MaterialType
    {
        public Short MaterialTypeID = null;
        public String MaterialTypeName = null;
        
        public Short getMaterialTypeID() { return MaterialTypeID; }
        public MaterialType setMaterialTypeID(Short value) { this.MaterialTypeID = value; return this; }
        public String getMaterialTypeName() { return MaterialTypeName; }
        public MaterialType setMaterialTypeName(String value) { this.MaterialTypeName = value; return this; }
    }

    public static class MaterialTypeResponse
    {
        public ResponseStatus ResponseStatus = null;
        public ArrayList<MaterialType> MaterialType = new ArrayList<MaterialType>();
        
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public MaterialTypeResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
        public ArrayList<MaterialType> getMaterialType() { return MaterialType; }
        public MaterialTypeResponse setMaterialType(ArrayList<MaterialType> value) { this.MaterialType = value; return this; }
    }

}

Java MaterialTypeRequest DTOs

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

HTTP + JSV

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

POST /v1/MaterialType/{MaterialTypeID} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	MaterialTypeID: 0,
	MaterialType: 
	[
		{
			MaterialTypeID: 0,
			MaterialTypeName: String
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	MaterialType: 
	[
		{
			MaterialTypeID: 0,
			MaterialTypeName: String
		}
	]
}