Trendsic Platform Service

<back to all web services

MaterialRequest

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

public class dtos
{

    public static class MaterialRequest
    {
        public Integer MaterialID = null;
        public ArrayList<Material> Material = new ArrayList<Material>();
        
        public Integer getMaterialID() { return MaterialID; }
        public MaterialRequest setMaterialID(Integer value) { this.MaterialID = value; return this; }
        public ArrayList<Material> getMaterial() { return Material; }
        public MaterialRequest setMaterial(ArrayList<Material> value) { this.Material = value; return this; }
    }

    public static class Material
    {
        public Integer MaterialID = null;
        public String MaterialName = null;
        public Short MaterialTypeID = null;
        public Short MaterialStatusID = null;
        public Integer Quantity = null;
        public String Supplier = null;
        public Date OrderDate = null;
        public Date DeliveryDate = null;
        public Date OnSiteDate = null;
        public String MaterialLocation = null;
        public String Manufacturer = null;
        public String SerialNumber = null;
        public String BarCode = null;
        public String TrackingInfo = null;
        public String MaterialDescription = null;
        public String Notes = null;
        public String ImageURL = null;
        public String DetailsURL = null;
        public UUID CreatedByUID = null;
        public Boolean Active = null;
        public Date RecordCreatedDate = null;
        public Integer StatusId = null;
        public String MaterialTypeName = null;
        public Double Cost = null;
        public String MaterialStatusName = null;
        public ArrayList<Project> Projects = new ArrayList<Project>();
        
        public Integer getMaterialID() { return MaterialID; }
        public Material setMaterialID(Integer value) { this.MaterialID = value; return this; }
        public String getMaterialName() { return MaterialName; }
        public Material setMaterialName(String value) { this.MaterialName = value; return this; }
        public Short getMaterialTypeID() { return MaterialTypeID; }
        public Material setMaterialTypeID(Short value) { this.MaterialTypeID = value; return this; }
        public Short getMaterialStatusID() { return MaterialStatusID; }
        public Material setMaterialStatusID(Short value) { this.MaterialStatusID = value; return this; }
        public Integer getQuantity() { return Quantity; }
        public Material setQuantity(Integer value) { this.Quantity = value; return this; }
        public String getSupplier() { return Supplier; }
        public Material setSupplier(String value) { this.Supplier = value; return this; }
        public Date getOrderDate() { return OrderDate; }
        public Material setOrderDate(Date value) { this.OrderDate = value; return this; }
        public Date getDeliveryDate() { return DeliveryDate; }
        public Material setDeliveryDate(Date value) { this.DeliveryDate = value; return this; }
        public Date getOnSiteDate() { return OnSiteDate; }
        public Material setOnSiteDate(Date value) { this.OnSiteDate = value; return this; }
        public String getMaterialLocation() { return MaterialLocation; }
        public Material setMaterialLocation(String value) { this.MaterialLocation = value; return this; }
        public String getManufacturer() { return Manufacturer; }
        public Material setManufacturer(String value) { this.Manufacturer = value; return this; }
        public String getSerialNumber() { return SerialNumber; }
        public Material setSerialNumber(String value) { this.SerialNumber = value; return this; }
        public String getBarCode() { return BarCode; }
        public Material setBarCode(String value) { this.BarCode = value; return this; }
        public String getTrackingInfo() { return TrackingInfo; }
        public Material setTrackingInfo(String value) { this.TrackingInfo = value; return this; }
        public String getMaterialDescription() { return MaterialDescription; }
        public Material setMaterialDescription(String value) { this.MaterialDescription = value; return this; }
        public String getNotes() { return Notes; }
        public Material setNotes(String value) { this.Notes = value; return this; }
        public String getImageURL() { return ImageURL; }
        public Material setImageURL(String value) { this.ImageURL = value; return this; }
        public String getDetailsURL() { return DetailsURL; }
        public Material setDetailsURL(String value) { this.DetailsURL = value; return this; }
        public UUID getCreatedByUID() { return CreatedByUID; }
        public Material setCreatedByUID(UUID value) { this.CreatedByUID = value; return this; }
        public Boolean isActive() { return Active; }
        public Material setActive(Boolean value) { this.Active = value; return this; }
        public Date getRecordCreatedDate() { return RecordCreatedDate; }
        public Material setRecordCreatedDate(Date value) { this.RecordCreatedDate = value; return this; }
        public Integer getStatusId() { return StatusId; }
        public Material setStatusId(Integer value) { this.StatusId = value; return this; }
        public String getMaterialTypeName() { return MaterialTypeName; }
        public Material setMaterialTypeName(String value) { this.MaterialTypeName = value; return this; }
        public Double getCost() { return Cost; }
        public Material setCost(Double value) { this.Cost = value; return this; }
        public String getMaterialStatusName() { return MaterialStatusName; }
        public Material setMaterialStatusName(String value) { this.MaterialStatusName = value; return this; }
        public ArrayList<Project> getProjects() { return Projects; }
        public Material setProjects(ArrayList<Project> value) { this.Projects = value; return this; }
    }

    public static class Project
    {
        public Integer ProjectID = null;
        public UUID ProjectUID = null;
        public String ProjectName = null;
        public String ImageURL = null;
        public String ImageKey = null;
        public String ClientName = null;
        public String ClientPhone = null;
        public String ClientEmail = null;
        public Boolean NotifyCustomerOnVisitCompletion = null;
        public Integer ClientContactID = null;
        public Integer ProjectManagerID = null;
        public String ProjectManagerName = null;
        public Date StartDate = null;
        public Date EndDate = null;
        public Date ActualStartDate = null;
        public Date ActualEndDate = null;
        public Integer JobCount = null;
        public Integer CrewMemberCount = null;
        public String CrewAvatarsJson = null;
        public String CrewNamesSearch = null;
        public Integer EquipmentCount = null;
        public Integer MaterialCount = null;
        public Short ProjectStatusID = null;
        public String ProjectStatusDescription = null;
        public BigDecimal Budget = null;
        public BigDecimal CostToDate = null;
        public String ProjectLocation = null;
        public String ProjectType = null;
        public String ProjectSponsor = null;
        public String CreatedBy = null;
        public Date CreatedAt = null;
        public Date UpdatedAt = null;
        public String ProjectDescription = null;
        public String Scope = null;
        public Integer StatusId = null;
        public UUID BranchId = null;
        public String BranchName = null;
        public Location Location = null;
        
        public Integer getProjectID() { return ProjectID; }
        public Project setProjectID(Integer value) { this.ProjectID = value; return this; }
        public UUID getProjectUID() { return ProjectUID; }
        public Project setProjectUID(UUID value) { this.ProjectUID = value; return this; }
        public String getProjectName() { return ProjectName; }
        public Project setProjectName(String value) { this.ProjectName = value; return this; }
        public String getImageURL() { return ImageURL; }
        public Project setImageURL(String value) { this.ImageURL = value; return this; }
        public String getImageKey() { return ImageKey; }
        public Project setImageKey(String value) { this.ImageKey = value; return this; }
        public String getClientName() { return ClientName; }
        public Project setClientName(String value) { this.ClientName = value; return this; }
        public String getClientPhone() { return ClientPhone; }
        public Project setClientPhone(String value) { this.ClientPhone = value; return this; }
        public String getClientEmail() { return ClientEmail; }
        public Project setClientEmail(String value) { this.ClientEmail = value; return this; }
        public Boolean isNotifyCustomerOnVisitCompletion() { return NotifyCustomerOnVisitCompletion; }
        public Project setNotifyCustomerOnVisitCompletion(Boolean value) { this.NotifyCustomerOnVisitCompletion = value; return this; }
        public Integer getClientContactID() { return ClientContactID; }
        public Project setClientContactID(Integer value) { this.ClientContactID = value; return this; }
        public Integer getProjectManagerID() { return ProjectManagerID; }
        public Project setProjectManagerID(Integer value) { this.ProjectManagerID = value; return this; }
        public String getProjectManagerName() { return ProjectManagerName; }
        public Project setProjectManagerName(String value) { this.ProjectManagerName = value; return this; }
        public Date getStartDate() { return StartDate; }
        public Project setStartDate(Date value) { this.StartDate = value; return this; }
        public Date getEndDate() { return EndDate; }
        public Project setEndDate(Date value) { this.EndDate = value; return this; }
        public Date getActualStartDate() { return ActualStartDate; }
        public Project setActualStartDate(Date value) { this.ActualStartDate = value; return this; }
        public Date getActualEndDate() { return ActualEndDate; }
        public Project setActualEndDate(Date value) { this.ActualEndDate = value; return this; }
        public Integer getJobCount() { return JobCount; }
        public Project setJobCount(Integer value) { this.JobCount = value; return this; }
        public Integer getCrewMemberCount() { return CrewMemberCount; }
        public Project setCrewMemberCount(Integer value) { this.CrewMemberCount = value; return this; }
        public String getCrewAvatarsJson() { return CrewAvatarsJson; }
        public Project setCrewAvatarsJson(String value) { this.CrewAvatarsJson = value; return this; }
        public String getCrewNamesSearch() { return CrewNamesSearch; }
        public Project setCrewNamesSearch(String value) { this.CrewNamesSearch = value; return this; }
        public Integer getEquipmentCount() { return EquipmentCount; }
        public Project setEquipmentCount(Integer value) { this.EquipmentCount = value; return this; }
        public Integer getMaterialCount() { return MaterialCount; }
        public Project setMaterialCount(Integer value) { this.MaterialCount = value; return this; }
        public Short getProjectStatusID() { return ProjectStatusID; }
        public Project setProjectStatusID(Short value) { this.ProjectStatusID = value; return this; }
        public String getProjectStatusDescription() { return ProjectStatusDescription; }
        public Project setProjectStatusDescription(String value) { this.ProjectStatusDescription = value; return this; }
        public BigDecimal getBudget() { return Budget; }
        public Project setBudget(BigDecimal value) { this.Budget = value; return this; }
        public BigDecimal getCostToDate() { return CostToDate; }
        public Project setCostToDate(BigDecimal value) { this.CostToDate = value; return this; }
        public String getProjectLocation() { return ProjectLocation; }
        public Project setProjectLocation(String value) { this.ProjectLocation = value; return this; }
        public String getProjectType() { return ProjectType; }
        public Project setProjectType(String value) { this.ProjectType = value; return this; }
        public String getProjectSponsor() { return ProjectSponsor; }
        public Project setProjectSponsor(String value) { this.ProjectSponsor = value; return this; }
        public String getCreatedBy() { return CreatedBy; }
        public Project setCreatedBy(String value) { this.CreatedBy = value; return this; }
        public Date getCreatedAt() { return CreatedAt; }
        public Project setCreatedAt(Date value) { this.CreatedAt = value; return this; }
        public Date getUpdatedAt() { return UpdatedAt; }
        public Project setUpdatedAt(Date value) { this.UpdatedAt = value; return this; }
        public String getProjectDescription() { return ProjectDescription; }
        public Project setProjectDescription(String value) { this.ProjectDescription = value; return this; }
        public String getScope() { return Scope; }
        public Project setScope(String value) { this.Scope = value; return this; }
        public Integer getStatusId() { return StatusId; }
        public Project setStatusId(Integer value) { this.StatusId = value; return this; }
        public UUID getBranchId() { return BranchId; }
        public Project setBranchId(UUID value) { this.BranchId = value; return this; }
        public String getBranchName() { return BranchName; }
        public Project setBranchName(String value) { this.BranchName = value; return this; }
        public Location getLocation() { return Location; }
        public Project setLocation(Location value) { this.Location = value; return this; }
    }

    public static class Location
    {
        public UUID Id = null;
        public UUID ClientId = null;
        public String Name = null;
        public String Address1 = null;
        public String Address2 = null;
        public String City = null;
        public String State = null;
        public String Zip = null;
        public String Phone = null;
        public String Fax = null;
        public String URL = null;
        public String Email = null;
        public String TimeZone = null;
        public Boolean Active = null;
        public Date EntDate = null;
        public Date ModDate = null;
        public String LocationImage = null;
        
        public UUID getId() { return Id; }
        public Location setId(UUID value) { this.Id = value; return this; }
        public UUID getClientId() { return ClientId; }
        public Location setClientId(UUID value) { this.ClientId = value; return this; }
        public String getName() { return Name; }
        public Location setName(String value) { this.Name = value; return this; }
        public String getAddress1() { return Address1; }
        public Location setAddress1(String value) { this.Address1 = value; return this; }
        public String getAddress2() { return Address2; }
        public Location setAddress2(String value) { this.Address2 = value; return this; }
        public String getCity() { return City; }
        public Location setCity(String value) { this.City = value; return this; }
        public String getState() { return State; }
        public Location setState(String value) { this.State = value; return this; }
        public String getZip() { return Zip; }
        public Location setZip(String value) { this.Zip = value; return this; }
        public String getPhone() { return Phone; }
        public Location setPhone(String value) { this.Phone = value; return this; }
        public String getFax() { return Fax; }
        public Location setFax(String value) { this.Fax = value; return this; }
        public String getUrl() { return URL; }
        public Location setUrl(String value) { this.URL = value; return this; }
        public String getEmail() { return Email; }
        public Location setEmail(String value) { this.Email = value; return this; }
        public String getTimeZone() { return TimeZone; }
        public Location setTimeZone(String value) { this.TimeZone = value; return this; }
        public Boolean isActive() { return Active; }
        public Location setActive(Boolean value) { this.Active = value; return this; }
        public Date getEntDate() { return EntDate; }
        public Location setEntDate(Date value) { this.EntDate = value; return this; }
        public Date getModDate() { return ModDate; }
        public Location setModDate(Date value) { this.ModDate = value; return this; }
        public String getLocationImage() { return LocationImage; }
        public Location setLocationImage(String value) { this.LocationImage = value; return this; }
    }

    public static class MaterialResponse
    {
        public ResponseStatus ResponseStatus = null;
        public ArrayList<Material> Material = new ArrayList<Material>();
        
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public MaterialResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
        public ArrayList<Material> getMaterial() { return Material; }
        public MaterialResponse setMaterial(ArrayList<Material> value) { this.Material = value; return this; }
    }

}

Java MaterialRequest DTOs

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

HTTP + XML

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

POST /v1/Material HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<MaterialRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Material>
    <Material>
      <Active>false</Active>
      <BarCode>String</BarCode>
      <Cost>0</Cost>
      <CreatedByUID>00000000-0000-0000-0000-000000000000</CreatedByUID>
      <DeliveryDate>0001-01-01T00:00:00</DeliveryDate>
      <DetailsURL>String</DetailsURL>
      <ImageURL>String</ImageURL>
      <Manufacturer>String</Manufacturer>
      <MaterialDescription>String</MaterialDescription>
      <MaterialID>0</MaterialID>
      <MaterialLocation>String</MaterialLocation>
      <MaterialName>String</MaterialName>
      <MaterialStatusID>0</MaterialStatusID>
      <MaterialStatusName>String</MaterialStatusName>
      <MaterialTypeID>0</MaterialTypeID>
      <MaterialTypeName>String</MaterialTypeName>
      <Notes>String</Notes>
      <OnSiteDate>0001-01-01T00:00:00</OnSiteDate>
      <OrderDate>0001-01-01T00:00:00</OrderDate>
      <Projects>
        <Project>
          <ActualEndDate>0001-01-01T00:00:00</ActualEndDate>
          <ActualStartDate>0001-01-01T00:00:00</ActualStartDate>
          <BranchId>00000000-0000-0000-0000-000000000000</BranchId>
          <BranchName>String</BranchName>
          <Budget>0</Budget>
          <ClientContactID>0</ClientContactID>
          <ClientEmail>String</ClientEmail>
          <ClientName>String</ClientName>
          <ClientPhone>String</ClientPhone>
          <CostToDate>0</CostToDate>
          <CreatedAt>0001-01-01T00:00:00</CreatedAt>
          <CreatedBy>String</CreatedBy>
          <CrewAvatarsJson>String</CrewAvatarsJson>
          <CrewMemberCount>0</CrewMemberCount>
          <CrewNamesSearch>String</CrewNamesSearch>
          <EndDate>0001-01-01T00:00:00</EndDate>
          <EquipmentCount>0</EquipmentCount>
          <ImageKey>String</ImageKey>
          <ImageURL>String</ImageURL>
          <JobCount>0</JobCount>
          <Location>
            <Active>false</Active>
            <Address1>String</Address1>
            <Address2>String</Address2>
            <City>String</City>
            <ClientId>00000000-0000-0000-0000-000000000000</ClientId>
            <Email>String</Email>
            <EntDate>0001-01-01T00:00:00</EntDate>
            <Fax>String</Fax>
            <Id>00000000-0000-0000-0000-000000000000</Id>
            <LocationImage>String</LocationImage>
            <ModDate>0001-01-01T00:00:00</ModDate>
            <Name>String</Name>
            <Phone>String</Phone>
            <State>String</State>
            <TimeZone>String</TimeZone>
            <URL>String</URL>
            <Zip>String</Zip>
          </Location>
          <MaterialCount>0</MaterialCount>
          <NotifyCustomerOnVisitCompletion>false</NotifyCustomerOnVisitCompletion>
          <ProjectDescription>String</ProjectDescription>
          <ProjectID>0</ProjectID>
          <ProjectLocation>String</ProjectLocation>
          <ProjectManagerID>0</ProjectManagerID>
          <ProjectManagerName>String</ProjectManagerName>
          <ProjectName>String</ProjectName>
          <ProjectSponsor>String</ProjectSponsor>
          <ProjectStatusDescription>String</ProjectStatusDescription>
          <ProjectStatusID>0</ProjectStatusID>
          <ProjectType>String</ProjectType>
          <ProjectUID>00000000-0000-0000-0000-000000000000</ProjectUID>
          <Scope>String</Scope>
          <StartDate>0001-01-01T00:00:00</StartDate>
          <StatusId>0</StatusId>
          <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
        </Project>
      </Projects>
      <Quantity>0</Quantity>
      <RecordCreatedDate>0001-01-01T00:00:00</RecordCreatedDate>
      <SerialNumber>String</SerialNumber>
      <StatusId>0</StatusId>
      <Supplier>String</Supplier>
      <TrackingInfo>String</TrackingInfo>
    </Material>
  </Material>
  <MaterialID>0</MaterialID>
</MaterialRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<MaterialResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Material>
    <Material>
      <Active>false</Active>
      <BarCode>String</BarCode>
      <Cost>0</Cost>
      <CreatedByUID>00000000-0000-0000-0000-000000000000</CreatedByUID>
      <DeliveryDate>0001-01-01T00:00:00</DeliveryDate>
      <DetailsURL>String</DetailsURL>
      <ImageURL>String</ImageURL>
      <Manufacturer>String</Manufacturer>
      <MaterialDescription>String</MaterialDescription>
      <MaterialID>0</MaterialID>
      <MaterialLocation>String</MaterialLocation>
      <MaterialName>String</MaterialName>
      <MaterialStatusID>0</MaterialStatusID>
      <MaterialStatusName>String</MaterialStatusName>
      <MaterialTypeID>0</MaterialTypeID>
      <MaterialTypeName>String</MaterialTypeName>
      <Notes>String</Notes>
      <OnSiteDate>0001-01-01T00:00:00</OnSiteDate>
      <OrderDate>0001-01-01T00:00:00</OrderDate>
      <Projects>
        <Project>
          <ActualEndDate>0001-01-01T00:00:00</ActualEndDate>
          <ActualStartDate>0001-01-01T00:00:00</ActualStartDate>
          <BranchId>00000000-0000-0000-0000-000000000000</BranchId>
          <BranchName>String</BranchName>
          <Budget>0</Budget>
          <ClientContactID>0</ClientContactID>
          <ClientEmail>String</ClientEmail>
          <ClientName>String</ClientName>
          <ClientPhone>String</ClientPhone>
          <CostToDate>0</CostToDate>
          <CreatedAt>0001-01-01T00:00:00</CreatedAt>
          <CreatedBy>String</CreatedBy>
          <CrewAvatarsJson>String</CrewAvatarsJson>
          <CrewMemberCount>0</CrewMemberCount>
          <CrewNamesSearch>String</CrewNamesSearch>
          <EndDate>0001-01-01T00:00:00</EndDate>
          <EquipmentCount>0</EquipmentCount>
          <ImageKey>String</ImageKey>
          <ImageURL>String</ImageURL>
          <JobCount>0</JobCount>
          <Location>
            <Active>false</Active>
            <Address1>String</Address1>
            <Address2>String</Address2>
            <City>String</City>
            <ClientId>00000000-0000-0000-0000-000000000000</ClientId>
            <Email>String</Email>
            <EntDate>0001-01-01T00:00:00</EntDate>
            <Fax>String</Fax>
            <Id>00000000-0000-0000-0000-000000000000</Id>
            <LocationImage>String</LocationImage>
            <ModDate>0001-01-01T00:00:00</ModDate>
            <Name>String</Name>
            <Phone>String</Phone>
            <State>String</State>
            <TimeZone>String</TimeZone>
            <URL>String</URL>
            <Zip>String</Zip>
          </Location>
          <MaterialCount>0</MaterialCount>
          <NotifyCustomerOnVisitCompletion>false</NotifyCustomerOnVisitCompletion>
          <ProjectDescription>String</ProjectDescription>
          <ProjectID>0</ProjectID>
          <ProjectLocation>String</ProjectLocation>
          <ProjectManagerID>0</ProjectManagerID>
          <ProjectManagerName>String</ProjectManagerName>
          <ProjectName>String</ProjectName>
          <ProjectSponsor>String</ProjectSponsor>
          <ProjectStatusDescription>String</ProjectStatusDescription>
          <ProjectStatusID>0</ProjectStatusID>
          <ProjectType>String</ProjectType>
          <ProjectUID>00000000-0000-0000-0000-000000000000</ProjectUID>
          <Scope>String</Scope>
          <StartDate>0001-01-01T00:00:00</StartDate>
          <StatusId>0</StatusId>
          <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
        </Project>
      </Projects>
      <Quantity>0</Quantity>
      <RecordCreatedDate>0001-01-01T00:00:00</RecordCreatedDate>
      <SerialNumber>String</SerialNumber>
      <StatusId>0</StatusId>
      <Supplier>String</Supplier>
      <TrackingInfo>String</TrackingInfo>
    </Material>
  </Material>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</MaterialResponse>