Trendsic Platform Service

<back to all web services

FieldLogSubmitRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/fieldlog/submit
"use strict";
export class FieldLogSubmitResponse {
    /** @param {{ResponseStatus?:ResponseStatus,FieldLogId?:number,FieldLogUID?:string,Status?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ResponseStatus} */
    ResponseStatus;
    /** @type {number} */
    FieldLogId;
    /** @type {string} */
    FieldLogUID;
    /** @type {string} */
    Status;
}
export class FieldLogCrew {
    /** @param {{ContactId?:number,StatusCode?:string,Hours?:number,CostCode?:string,SplitCostCode?:string,SplitHours?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ContactId;
    /** @type {string} */
    StatusCode;
    /** @type {number} */
    Hours;
    /** @type {string} */
    CostCode;
    /** @type {string} */
    SplitCostCode;
    /** @type {number} */
    SplitHours;
}
export class FieldLogEquipment {
    /** @param {{EquipmentId?:number,EquipmentKey?:string,StatusCode?:string,EngineHours?:number,FuelGallons?:number,IdleReason?:string,DownNote?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    EquipmentId;
    /** @type {string} */
    EquipmentKey;
    /** @type {string} */
    StatusCode;
    /** @type {number} */
    EngineHours;
    /** @type {number} */
    FuelGallons;
    /** @type {string} */
    IdleReason;
    /** @type {string} */
    DownNote;
}
export class FieldLogSub {
    /** @param {{ContactId?:number,Name?:string,Trade?:string,HeadCount?:number,HoursPer?:number,SourceCode?:string,Reporter?:string,Note?:string,Verified?:boolean,StateCode?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ContactId;
    /** @type {string} */
    Name;
    /** @type {string} */
    Trade;
    /** @type {number} */
    HeadCount;
    /** @type {number} */
    HoursPer;
    /** @type {string} */
    SourceCode;
    /** @type {string} */
    Reporter;
    /** @type {string} */
    Note;
    /** @type {boolean} */
    Verified;
    /** @type {string} */
    StateCode;
}
export class FieldLogQuantity {
    /** @param {{PayItemCode?:string,Name?:string,Unit?:string,TodayQty?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    PayItemCode;
    /** @type {string} */
    Name;
    /** @type {string} */
    Unit;
    /** @type {number} */
    TodayQty;
}
export class FieldLogDelivery {
    /** @param {{Po?:string,Material?:string,StatusCode?:string,QtyReceived?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Po;
    /** @type {string} */
    Material;
    /** @type {string} */
    StatusCode;
    /** @type {string} */
    QtyReceived;
}
export class FieldLogConsumed {
    /** @param {{Name?:string,Qty?:string,Use?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Name;
    /** @type {string} */
    Qty;
    /** @type {string} */
    Use;
}
export class FieldLogSubmitRequest {
    /** @param {{ProjectId?:number,JobId?:number,LogDate?:string,Notes?:string,Weather?:string,TempF?:number,WeatherDelayHours?:number,ToolboxTalk?:string,IncidentOccurred?:boolean,IncidentType?:string,IncidentNote?:string,IncidentPhotoCount?:number,Crew?:FieldLogCrew[],Equipment?:FieldLogEquipment[],Subs?:FieldLogSub[],Quantities?:FieldLogQuantity[],Deliveries?:FieldLogDelivery[],Consumed?:FieldLogConsumed[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ProjectId;
    /** @type {number} */
    JobId;
    /** @type {string} */
    LogDate;
    /** @type {string} */
    Notes;
    /** @type {string} */
    Weather;
    /** @type {number} */
    TempF;
    /** @type {number} */
    WeatherDelayHours;
    /** @type {string} */
    ToolboxTalk;
    /** @type {boolean} */
    IncidentOccurred;
    /** @type {string} */
    IncidentType;
    /** @type {string} */
    IncidentNote;
    /** @type {number} */
    IncidentPhotoCount;
    /** @type {FieldLogCrew[]} */
    Crew = [];
    /** @type {FieldLogEquipment[]} */
    Equipment = [];
    /** @type {FieldLogSub[]} */
    Subs = [];
    /** @type {FieldLogQuantity[]} */
    Quantities = [];
    /** @type {FieldLogDelivery[]} */
    Deliveries = [];
    /** @type {FieldLogConsumed[]} */
    Consumed = [];
}

JavaScript 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>