Trendsic Platform Service

<back to all web services

FieldLogPrefillRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/fieldlog/prefill
"use strict";
export class FieldLogCrewPrefill {
    /** @param {{ContactId?:number,Name?:string,Role?:string,DefaultHours?:number,CostCode?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ContactId;
    /** @type {string} */
    Name;
    /** @type {string} */
    Role;
    /** @type {number} */
    DefaultHours;
    /** @type {string} */
    CostCode;
}
export class FieldLogEquipmentPrefill {
    /** @param {{EquipmentId?:number,Name?:string,Code?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    EquipmentId;
    /** @type {string} */
    Name;
    /** @type {string} */
    Code;
}
export class FieldLogPayItemPrefill {
    /** @param {{Code?:string,Name?:string,Unit?:string,ToDate?:number,Total?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Code;
    /** @type {string} */
    Name;
    /** @type {string} */
    Unit;
    /** @type {number} */
    ToDate;
    /** @type {number} */
    Total;
}
export class FieldLogSubPrefill {
    /** @param {{ContactId?:number,Name?:string,Trade?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ContactId;
    /** @type {string} */
    Name;
    /** @type {string} */
    Trade;
}
export class FieldLogPrefillResponse {
    /** @param {{ResponseStatus?:ResponseStatus,ProjectName?:string,SolicitationNumber?:string,StationRange?:string,Crew?:FieldLogCrewPrefill[],Equipment?:FieldLogEquipmentPrefill[],PayItems?:FieldLogPayItemPrefill[],Subs?:FieldLogSubPrefill[],PriorDayFilled?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ResponseStatus} */
    ResponseStatus;
    /** @type {string} */
    ProjectName;
    /** @type {string} */
    SolicitationNumber;
    /** @type {string} */
    StationRange;
    /** @type {FieldLogCrewPrefill[]} */
    Crew = [];
    /** @type {FieldLogEquipmentPrefill[]} */
    Equipment = [];
    /** @type {FieldLogPayItemPrefill[]} */
    PayItems = [];
    /** @type {FieldLogSubPrefill[]} */
    Subs = [];
    /** @type {boolean} */
    PriorDayFilled;
}
export class FieldLogPrefillRequest {
    /** @param {{ProjectId?:number,Date?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ProjectId;
    /** @type {string} */
    Date;
}

JavaScript FieldLogPrefillRequest 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 /v1/fieldlog/prefill HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"ProjectName":"String","SolicitationNumber":"String","StationRange":"String","Crew":[{"ContactId":0,"Name":"String","Role":"String","DefaultHours":0,"CostCode":"String"}],"Equipment":[{"EquipmentId":0,"Name":"String","Code":"String"}],"PayItems":[{"Code":"String","Name":"String","Unit":"String","ToDate":0,"Total":0}],"Subs":[{"ContactId":0,"Name":"String","Trade":"String"}],"PriorDayFilled":false}