Trendsic Platform Service

<back to all web services

FieldLogSubmitRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/fieldlog/submit
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class FieldLogSubmitRequest
    {
        public Integer ProjectId = null;
        public Integer JobId = null;
        public String LogDate = null;
        public String Notes = null;
        public String Weather = null;
        public Integer TempF = null;
        public Double WeatherDelayHours = null;
        public String ToolboxTalk = null;
        public Boolean IncidentOccurred = null;
        public String IncidentType = null;
        public String IncidentNote = null;
        public Integer IncidentPhotoCount = null;
        public ArrayList<FieldLogCrew> Crew = new ArrayList<FieldLogCrew>();
        public ArrayList<FieldLogEquipment> Equipment = new ArrayList<FieldLogEquipment>();
        public ArrayList<FieldLogSub> Subs = new ArrayList<FieldLogSub>();
        public ArrayList<FieldLogQuantity> Quantities = new ArrayList<FieldLogQuantity>();
        public ArrayList<FieldLogDelivery> Deliveries = new ArrayList<FieldLogDelivery>();
        public ArrayList<FieldLogConsumed> Consumed = new ArrayList<FieldLogConsumed>();
        
        public Integer getProjectId() { return ProjectId; }
        public FieldLogSubmitRequest setProjectId(Integer value) { this.ProjectId = value; return this; }
        public Integer getJobId() { return JobId; }
        public FieldLogSubmitRequest setJobId(Integer value) { this.JobId = value; return this; }
        public String getLogDate() { return LogDate; }
        public FieldLogSubmitRequest setLogDate(String value) { this.LogDate = value; return this; }
        public String getNotes() { return Notes; }
        public FieldLogSubmitRequest setNotes(String value) { this.Notes = value; return this; }
        public String getWeather() { return Weather; }
        public FieldLogSubmitRequest setWeather(String value) { this.Weather = value; return this; }
        public Integer getTempF() { return TempF; }
        public FieldLogSubmitRequest setTempF(Integer value) { this.TempF = value; return this; }
        public Double getWeatherDelayHours() { return WeatherDelayHours; }
        public FieldLogSubmitRequest setWeatherDelayHours(Double value) { this.WeatherDelayHours = value; return this; }
        public String getToolboxTalk() { return ToolboxTalk; }
        public FieldLogSubmitRequest setToolboxTalk(String value) { this.ToolboxTalk = value; return this; }
        public Boolean isIncidentOccurred() { return IncidentOccurred; }
        public FieldLogSubmitRequest setIncidentOccurred(Boolean value) { this.IncidentOccurred = value; return this; }
        public String getIncidentType() { return IncidentType; }
        public FieldLogSubmitRequest setIncidentType(String value) { this.IncidentType = value; return this; }
        public String getIncidentNote() { return IncidentNote; }
        public FieldLogSubmitRequest setIncidentNote(String value) { this.IncidentNote = value; return this; }
        public Integer getIncidentPhotoCount() { return IncidentPhotoCount; }
        public FieldLogSubmitRequest setIncidentPhotoCount(Integer value) { this.IncidentPhotoCount = value; return this; }
        public ArrayList<FieldLogCrew> getCrew() { return Crew; }
        public FieldLogSubmitRequest setCrew(ArrayList<FieldLogCrew> value) { this.Crew = value; return this; }
        public ArrayList<FieldLogEquipment> getEquipment() { return Equipment; }
        public FieldLogSubmitRequest setEquipment(ArrayList<FieldLogEquipment> value) { this.Equipment = value; return this; }
        public ArrayList<FieldLogSub> getSubs() { return Subs; }
        public FieldLogSubmitRequest setSubs(ArrayList<FieldLogSub> value) { this.Subs = value; return this; }
        public ArrayList<FieldLogQuantity> getQuantities() { return Quantities; }
        public FieldLogSubmitRequest setQuantities(ArrayList<FieldLogQuantity> value) { this.Quantities = value; return this; }
        public ArrayList<FieldLogDelivery> getDeliveries() { return Deliveries; }
        public FieldLogSubmitRequest setDeliveries(ArrayList<FieldLogDelivery> value) { this.Deliveries = value; return this; }
        public ArrayList<FieldLogConsumed> getConsumed() { return Consumed; }
        public FieldLogSubmitRequest setConsumed(ArrayList<FieldLogConsumed> value) { this.Consumed = value; return this; }
    }

    public static class FieldLogCrew
    {
        public Integer ContactId = null;
        public String StatusCode = null;
        public Double Hours = null;
        public String CostCode = null;
        public String SplitCostCode = null;
        public Double SplitHours = null;
        
        public Integer getContactId() { return ContactId; }
        public FieldLogCrew setContactId(Integer value) { this.ContactId = value; return this; }
        public String getStatusCode() { return StatusCode; }
        public FieldLogCrew setStatusCode(String value) { this.StatusCode = value; return this; }
        public Double getHours() { return Hours; }
        public FieldLogCrew setHours(Double value) { this.Hours = value; return this; }
        public String getCostCode() { return CostCode; }
        public FieldLogCrew setCostCode(String value) { this.CostCode = value; return this; }
        public String getSplitCostCode() { return SplitCostCode; }
        public FieldLogCrew setSplitCostCode(String value) { this.SplitCostCode = value; return this; }
        public Double getSplitHours() { return SplitHours; }
        public FieldLogCrew setSplitHours(Double value) { this.SplitHours = value; return this; }
    }

    public static class FieldLogEquipment
    {
        public Integer EquipmentId = null;
        public String EquipmentKey = null;
        public String StatusCode = null;
        public Double EngineHours = null;
        public Double FuelGallons = null;
        public String IdleReason = null;
        public String DownNote = null;
        
        public Integer getEquipmentId() { return EquipmentId; }
        public FieldLogEquipment setEquipmentId(Integer value) { this.EquipmentId = value; return this; }
        public String getEquipmentKey() { return EquipmentKey; }
        public FieldLogEquipment setEquipmentKey(String value) { this.EquipmentKey = value; return this; }
        public String getStatusCode() { return StatusCode; }
        public FieldLogEquipment setStatusCode(String value) { this.StatusCode = value; return this; }
        public Double getEngineHours() { return EngineHours; }
        public FieldLogEquipment setEngineHours(Double value) { this.EngineHours = value; return this; }
        public Double getFuelGallons() { return FuelGallons; }
        public FieldLogEquipment setFuelGallons(Double value) { this.FuelGallons = value; return this; }
        public String getIdleReason() { return IdleReason; }
        public FieldLogEquipment setIdleReason(String value) { this.IdleReason = value; return this; }
        public String getDownNote() { return DownNote; }
        public FieldLogEquipment setDownNote(String value) { this.DownNote = value; return this; }
    }

    public static class FieldLogSub
    {
        public Integer ContactId = null;
        public String Name = null;
        public String Trade = null;
        public Integer HeadCount = null;
        public Double HoursPer = null;
        public String SourceCode = null;
        public String Reporter = null;
        public String Note = null;
        public Boolean Verified = null;
        public String StateCode = null;
        
        public Integer getContactId() { return ContactId; }
        public FieldLogSub setContactId(Integer value) { this.ContactId = value; return this; }
        public String getName() { return Name; }
        public FieldLogSub setName(String value) { this.Name = value; return this; }
        public String getTrade() { return Trade; }
        public FieldLogSub setTrade(String value) { this.Trade = value; return this; }
        public Integer getHeadCount() { return HeadCount; }
        public FieldLogSub setHeadCount(Integer value) { this.HeadCount = value; return this; }
        public Double getHoursPer() { return HoursPer; }
        public FieldLogSub setHoursPer(Double value) { this.HoursPer = value; return this; }
        public String getSourceCode() { return SourceCode; }
        public FieldLogSub setSourceCode(String value) { this.SourceCode = value; return this; }
        public String getReporter() { return Reporter; }
        public FieldLogSub setReporter(String value) { this.Reporter = value; return this; }
        public String getNote() { return Note; }
        public FieldLogSub setNote(String value) { this.Note = value; return this; }
        public Boolean isVerified() { return Verified; }
        public FieldLogSub setVerified(Boolean value) { this.Verified = value; return this; }
        public String getStateCode() { return StateCode; }
        public FieldLogSub setStateCode(String value) { this.StateCode = value; return this; }
    }

    public static class FieldLogQuantity
    {
        public String PayItemCode = null;
        public String Name = null;
        public String Unit = null;
        public Double TodayQty = null;
        
        public String getPayItemCode() { return PayItemCode; }
        public FieldLogQuantity setPayItemCode(String value) { this.PayItemCode = value; return this; }
        public String getName() { return Name; }
        public FieldLogQuantity setName(String value) { this.Name = value; return this; }
        public String getUnit() { return Unit; }
        public FieldLogQuantity setUnit(String value) { this.Unit = value; return this; }
        public Double getTodayQty() { return TodayQty; }
        public FieldLogQuantity setTodayQty(Double value) { this.TodayQty = value; return this; }
    }

    public static class FieldLogDelivery
    {
        public String Po = null;
        public String Material = null;
        public String StatusCode = null;
        public String QtyReceived = null;
        
        public String getPo() { return Po; }
        public FieldLogDelivery setPo(String value) { this.Po = value; return this; }
        public String getMaterial() { return Material; }
        public FieldLogDelivery setMaterial(String value) { this.Material = value; return this; }
        public String getStatusCode() { return StatusCode; }
        public FieldLogDelivery setStatusCode(String value) { this.StatusCode = value; return this; }
        public String getQtyReceived() { return QtyReceived; }
        public FieldLogDelivery setQtyReceived(String value) { this.QtyReceived = value; return this; }
    }

    public static class FieldLogConsumed
    {
        public String Name = null;
        public String Qty = null;
        public String Use = null;
        
        public String getName() { return Name; }
        public FieldLogConsumed setName(String value) { this.Name = value; return this; }
        public String getQty() { return Qty; }
        public FieldLogConsumed setQty(String value) { this.Qty = value; return this; }
        public String getUse() { return Use; }
        public FieldLogConsumed setUse(String value) { this.Use = value; return this; }
    }

    public static class FieldLogSubmitResponse
    {
        public ResponseStatus ResponseStatus = null;
        public Integer FieldLogId = null;
        public UUID FieldLogUID = null;
        public String Status = null;
        
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public FieldLogSubmitResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
        public Integer getFieldLogId() { return FieldLogId; }
        public FieldLogSubmitResponse setFieldLogId(Integer value) { this.FieldLogId = value; return this; }
        public UUID getFieldLogUID() { return FieldLogUID; }
        public FieldLogSubmitResponse setFieldLogUID(UUID value) { this.FieldLogUID = value; return this; }
        public String getStatus() { return Status; }
        public FieldLogSubmitResponse setStatus(String value) { this.Status = value; return this; }
    }

}

Java FieldLogSubmitRequest 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/fieldlog/submit HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<FieldLogSubmitRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Consumed>
    <FieldLogConsumed>
      <Name>String</Name>
      <Qty>String</Qty>
      <Use>String</Use>
    </FieldLogConsumed>
  </Consumed>
  <Crew>
    <FieldLogCrew>
      <ContactId>0</ContactId>
      <CostCode>String</CostCode>
      <Hours>0</Hours>
      <SplitCostCode>String</SplitCostCode>
      <SplitHours>0</SplitHours>
      <StatusCode>String</StatusCode>
    </FieldLogCrew>
  </Crew>
  <Deliveries>
    <FieldLogDelivery>
      <Material>String</Material>
      <Po>String</Po>
      <QtyReceived>String</QtyReceived>
      <StatusCode>String</StatusCode>
    </FieldLogDelivery>
  </Deliveries>
  <Equipment>
    <FieldLogEquipment>
      <DownNote>String</DownNote>
      <EngineHours>0</EngineHours>
      <EquipmentId>0</EquipmentId>
      <EquipmentKey>String</EquipmentKey>
      <FuelGallons>0</FuelGallons>
      <IdleReason>String</IdleReason>
      <StatusCode>String</StatusCode>
    </FieldLogEquipment>
  </Equipment>
  <IncidentNote>String</IncidentNote>
  <IncidentOccurred>false</IncidentOccurred>
  <IncidentPhotoCount>0</IncidentPhotoCount>
  <IncidentType>String</IncidentType>
  <JobId>0</JobId>
  <LogDate>String</LogDate>
  <Notes>String</Notes>
  <ProjectId>0</ProjectId>
  <Quantities>
    <FieldLogQuantity>
      <Name>String</Name>
      <PayItemCode>String</PayItemCode>
      <TodayQty>0</TodayQty>
      <Unit>String</Unit>
    </FieldLogQuantity>
  </Quantities>
  <Subs>
    <FieldLogSub>
      <ContactId>0</ContactId>
      <HeadCount>0</HeadCount>
      <HoursPer>0</HoursPer>
      <Name>String</Name>
      <Note>String</Note>
      <Reporter>String</Reporter>
      <SourceCode>String</SourceCode>
      <StateCode>String</StateCode>
      <Trade>String</Trade>
      <Verified>false</Verified>
    </FieldLogSub>
  </Subs>
  <TempF>0</TempF>
  <ToolboxTalk>String</ToolboxTalk>
  <Weather>String</Weather>
  <WeatherDelayHours>0</WeatherDelayHours>
</FieldLogSubmitRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<FieldLogSubmitResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <FieldLogId>0</FieldLogId>
  <FieldLogUID>00000000-0000-0000-0000-000000000000</FieldLogUID>
  <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>
  <Status>String</Status>
</FieldLogSubmitResponse>