| POST,OPTIONS | /v1/fieldlog/submit |
|---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CRM.AgencyPlatform.API.Internal
Namespace Global
Namespace CRM.AgencyPlatform.API.Internal
Public Partial Class FieldLogConsumed
Public Overridable Property Name As String
Public Overridable Property Qty As String
Public Overridable Property Use As String
End Class
Public Partial Class FieldLogCrew
Public Overridable Property ContactId As Integer
Public Overridable Property StatusCode As String
Public Overridable Property Hours As Double
Public Overridable Property CostCode As String
Public Overridable Property SplitCostCode As String
Public Overridable Property SplitHours As Double
End Class
Public Partial Class FieldLogDelivery
Public Overridable Property Po As String
Public Overridable Property Material As String
Public Overridable Property StatusCode As String
Public Overridable Property QtyReceived As String
End Class
Public Partial Class FieldLogEquipment
Public Overridable Property EquipmentId As Integer
Public Overridable Property EquipmentKey As String
Public Overridable Property StatusCode As String
Public Overridable Property EngineHours As Double
Public Overridable Property FuelGallons As Double
Public Overridable Property IdleReason As String
Public Overridable Property DownNote As String
End Class
Public Partial Class FieldLogQuantity
Public Overridable Property PayItemCode As String
Public Overridable Property Name As String
Public Overridable Property Unit As String
Public Overridable Property TodayQty As Double
End Class
Public Partial Class FieldLogSub
Public Overridable Property ContactId As Integer
Public Overridable Property Name As String
Public Overridable Property Trade As String
Public Overridable Property HeadCount As Integer
Public Overridable Property HoursPer As Double
Public Overridable Property SourceCode As String
Public Overridable Property Reporter As String
Public Overridable Property Note As String
Public Overridable Property Verified As Boolean
Public Overridable Property StateCode As String
End Class
Public Partial Class FieldLogSubmitRequest
Public Overridable Property ProjectId As Integer
Public Overridable Property JobId As Integer
Public Overridable Property LogDate As String
Public Overridable Property Notes As String
Public Overridable Property Weather As String
Public Overridable Property TempF As Integer
Public Overridable Property WeatherDelayHours As Double
Public Overridable Property ToolboxTalk As String
Public Overridable Property IncidentOccurred As Boolean
Public Overridable Property IncidentType As String
Public Overridable Property IncidentNote As String
Public Overridable Property IncidentPhotoCount As Integer
Public Overridable Property Crew As List(Of FieldLogCrew) = New List(Of FieldLogCrew)
Public Overridable Property Equipment As List(Of FieldLogEquipment) = New List(Of FieldLogEquipment)
Public Overridable Property Subs As List(Of FieldLogSub) = New List(Of FieldLogSub)
Public Overridable Property Quantities As List(Of FieldLogQuantity) = New List(Of FieldLogQuantity)
Public Overridable Property Deliveries As List(Of FieldLogDelivery) = New List(Of FieldLogDelivery)
Public Overridable Property Consumed As List(Of FieldLogConsumed) = New List(Of FieldLogConsumed)
End Class
Public Partial Class FieldLogSubmitResponse
Public Overridable Property ResponseStatus As ResponseStatus
Public Overridable Property FieldLogId As Integer
Public Overridable Property FieldLogUID As Guid
Public Overridable Property Status As String
End Class
End Namespace
End Namespace
VB.NET FieldLogSubmitRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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: text/csv
Content-Type: text/csv
Content-Length: length
{"ProjectId":0,"JobId":0,"LogDate":"String","Notes":"String","Weather":"String","TempF":0,"WeatherDelayHours":0,"ToolboxTalk":"String","IncidentOccurred":false,"IncidentType":"String","IncidentNote":"String","IncidentPhotoCount":0,"Crew":[{"ContactId":0,"StatusCode":"String","Hours":0,"CostCode":"String","SplitCostCode":"String","SplitHours":0}],"Equipment":[{"EquipmentId":0,"EquipmentKey":"String","StatusCode":"String","EngineHours":0,"FuelGallons":0,"IdleReason":"String","DownNote":"String"}],"Subs":[{"ContactId":0,"Name":"String","Trade":"String","HeadCount":0,"HoursPer":0,"SourceCode":"String","Reporter":"String","Note":"String","Verified":false,"StateCode":"String"}],"Quantities":[{"PayItemCode":"String","Name":"String","Unit":"String","TodayQty":0}],"Deliveries":[{"Po":"String","Material":"String","StatusCode":"String","QtyReceived":"String"}],"Consumed":[{"Name":"String","Qty":"String","Use":"String"}]}
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"}},"FieldLogId":0,"FieldLogUID":"00000000000000000000000000000000","Status":"String"}