Trendsic Platform Service

<back to all web services

FieldLogPrefillRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/fieldlog/prefill
import Foundation
import ServiceStack

public class FieldLogPrefillRequest : Codable
{
    public var projectId:Int
    public var date:String

    required public init(){}
}

public class FieldLogPrefillResponse : Codable
{
    public var responseStatus:ResponseStatus
    public var projectName:String
    public var solicitationNumber:String
    public var stationRange:String
    public var crew:[FieldLogCrewPrefill] = []
    public var equipment:[FieldLogEquipmentPrefill] = []
    public var payItems:[FieldLogPayItemPrefill] = []
    public var subs:[FieldLogSubPrefill] = []
    public var priorDayFilled:Bool

    required public init(){}
}

public class FieldLogCrewPrefill : Codable
{
    public var contactId:Int
    public var name:String
    public var role:String
    public var defaultHours:Double
    public var costCode:String

    required public init(){}
}

public class FieldLogEquipmentPrefill : Codable
{
    public var equipmentId:Int
    public var name:String
    public var code:String

    required public init(){}
}

public class FieldLogPayItemPrefill : Codable
{
    public var code:String
    public var name:String
    public var unit:String
    public var toDate:Double
    public var total:Double

    required public init(){}
}

public class FieldLogSubPrefill : Codable
{
    public var contactId:Int
    public var name:String
    public var trade:String

    required public init(){}
}


Swift FieldLogPrefillRequest DTOs

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

HTTP + 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
}