| GET,OPTIONS | /v1/fieldlog/prefill |
|---|
export class FieldLogCrewPrefill
{
public ContactId: number;
public Name: string;
public Role: string;
public DefaultHours: number;
public CostCode: string;
public constructor(init?: Partial<FieldLogCrewPrefill>) { (Object as any).assign(this, init); }
}
export class FieldLogEquipmentPrefill
{
public EquipmentId: number;
public Name: string;
public Code: string;
public constructor(init?: Partial<FieldLogEquipmentPrefill>) { (Object as any).assign(this, init); }
}
export class FieldLogPayItemPrefill
{
public Code: string;
public Name: string;
public Unit: string;
public ToDate: number;
public Total: number;
public constructor(init?: Partial<FieldLogPayItemPrefill>) { (Object as any).assign(this, init); }
}
export class FieldLogSubPrefill
{
public ContactId: number;
public Name: string;
public Trade: string;
public constructor(init?: Partial<FieldLogSubPrefill>) { (Object as any).assign(this, init); }
}
export class FieldLogPrefillResponse
{
public ResponseStatus: ResponseStatus;
public ProjectName: string;
public SolicitationNumber: string;
public StationRange: string;
public Crew: FieldLogCrewPrefill[] = [];
public Equipment: FieldLogEquipmentPrefill[] = [];
public PayItems: FieldLogPayItemPrefill[] = [];
public Subs: FieldLogSubPrefill[] = [];
public PriorDayFilled: boolean;
public constructor(init?: Partial<FieldLogPrefillResponse>) { (Object as any).assign(this, init); }
}
export class FieldLogPrefillRequest
{
public ProjectId: number;
public Date: string;
public constructor(init?: Partial<FieldLogPrefillRequest>) { (Object as any).assign(this, init); }
}
TypeScript FieldLogPrefillRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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/jsv
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
}
},
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
}