| GET,POST,PUT,DELETE,OPTIONS | /v1/Project/Equipment/{ProjectID} | ||
|---|---|---|---|
| GET,POST,PUT,DELETE,OPTIONS | /v1/Project/Equipment/{ProjectID}/{JobID} |
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 Equipment
Public Overridable Property EquipmentID As Integer
Public Overridable Property EquipmentName As String
Public Overridable Property EquipmentTypeID As Short
Public Overridable Property Manufacturer As String
Public Overridable Property EquipmentType As String
Public Overridable Property SerialNumber As String
Public Overridable Property BarCode As String
Public Overridable Property EquipmentLocation As String
Public Overridable Property ImageURL As String
Public Overridable Property ProductDetailsURL As String
Public Overridable Property RecordCreatedDate As Date
Public Overridable Property CreatedByUID As Guid
Public Overridable Property Active As Boolean
Public Overridable Property Notes As String
Public Overridable Property Rate As Decimal
Public Overridable Property Projects As List(Of Project) = New List(Of Project)
End Class
Public Partial Class Project
Public Overridable Property ProjectID As Integer
Public Overridable Property ProjectUID As Guid
Public Overridable Property ProjectName As String
Public Overridable Property ImageURL As String
Public Overridable Property ImageKey As String
Public Overridable Property ClientName As String
Public Overridable Property ClientPhone As String
Public Overridable Property ClientEmail As String
Public Overridable Property ProjectManagerID As Integer
Public Overridable Property ProjectManagerName As String
Public Overridable Property StartDate As Date?
Public Overridable Property EndDate As Date?
Public Overridable Property ActualStartDate As Date?
Public Overridable Property ActualEndDate As Date?
Public Overridable Property JobCount As Integer
Public Overridable Property CrewMemberCount As Integer
Public Overridable Property EquipmentCount As Integer
Public Overridable Property MaterialCount As Integer
Public Overridable Property ProjectStatusID As Short
Public Overridable Property ProjectStatusDescription As String
Public Overridable Property Budget As Decimal
Public Overridable Property CostToDate As Decimal
Public Overridable Property ProjectLocation As String
Public Overridable Property ProjectType As String
Public Overridable Property ProjectSponsor As String
Public Overridable Property CreatedBy As String
Public Overridable Property CreatedAt As Date?
Public Overridable Property UpdatedAt As Date?
Public Overridable Property ProjectDescription As String
Public Overridable Property Scope As String
Public Overridable Property StatusId As Integer
End Class
Public Partial Class ProjectEquipment
Inherits Equipment
Public Overridable Property ProjectEquipmentID As Integer
Public Overridable Property ProjectID As Integer
Public Overridable Property ProjectEndDate As Date
Public Overridable Property EquipmentRate As Decimal
Public Overridable Property JobID As Integer
Public Overridable Property BilledEquipmentRate As Decimal
Public Overridable Property Status As String
End Class
Public Partial Class ProjectEquipmentListRequest
Public Overridable Property ProjectID As Integer
Public Overridable Property JobID As Integer
Public Overridable Property ProjectEquipment As List(Of Equipment) = New List(Of Equipment)
End Class
Public Partial Class ProjectEquipmentListResponse
Public Overridable Property ResponseStatus As ResponseStatus
Public Overridable Property ProjectEquipment As List(Of ProjectEquipment) = New List(Of ProjectEquipment)
End Class
End Namespace
End Namespace
VB.NET ProjectEquipmentListRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/Project/Equipment/{ProjectID} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"ProjectID":0,"JobID":0,"ProjectEquipment":[{"EquipmentID":0,"EquipmentName":"String","EquipmentTypeID":0,"Manufacturer":"String","EquipmentType":"String","SerialNumber":"String","BarCode":"String","EquipmentLocation":"String","ImageURL":"String","ProductDetailsURL":"String","RecordCreatedDate":"0001-01-01T00:00:00.0000000","CreatedByUID":"00000000000000000000000000000000","Active":false,"Notes":"String","Rate":0,"Projects":[{"ProjectID":0,"ProjectUID":"00000000000000000000000000000000","ProjectName":"String","ImageURL":"String","ImageKey":"String","ClientName":"String","ClientPhone":"String","ClientEmail":"String","ProjectManagerID":0,"ProjectManagerName":"String","StartDate":"0001-01-01T00:00:00.0000000","EndDate":"0001-01-01T00:00:00.0000000","ActualStartDate":"0001-01-01T00:00:00.0000000","ActualEndDate":"0001-01-01T00:00:00.0000000","JobCount":0,"CrewMemberCount":0,"EquipmentCount":0,"MaterialCount":0,"ProjectStatusID":0,"ProjectStatusDescription":"String","Budget":0,"CostToDate":0,"ProjectLocation":"String","ProjectType":"String","ProjectSponsor":"String","CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000","ProjectDescription":"String","Scope":"String","StatusId":0}]}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"ProjectEquipment":[{"ProjectEquipmentID":0,"ProjectID":0,"ProjectEndDate":"0001-01-01T00:00:00.0000000","EquipmentRate":0,"JobID":0,"BilledEquipmentRate":0,"Status":"String","EquipmentID":0,"EquipmentName":"String","EquipmentTypeID":0,"Manufacturer":"String","EquipmentType":"String","SerialNumber":"String","BarCode":"String","EquipmentLocation":"String","ImageURL":"String","ProductDetailsURL":"String","RecordCreatedDate":"0001-01-01T00:00:00.0000000","CreatedByUID":"00000000000000000000000000000000","Active":false,"Notes":"String","Rate":0,"Projects":[{"ProjectID":0,"ProjectUID":"00000000000000000000000000000000","ProjectName":"String","ImageURL":"String","ImageKey":"String","ClientName":"String","ClientPhone":"String","ClientEmail":"String","ProjectManagerID":0,"ProjectManagerName":"String","StartDate":"0001-01-01T00:00:00.0000000","EndDate":"0001-01-01T00:00:00.0000000","ActualStartDate":"0001-01-01T00:00:00.0000000","ActualEndDate":"0001-01-01T00:00:00.0000000","JobCount":0,"CrewMemberCount":0,"EquipmentCount":0,"MaterialCount":0,"ProjectStatusID":0,"ProjectStatusDescription":"String","Budget":0,"CostToDate":0,"ProjectLocation":"String","ProjectType":"String","ProjectSponsor":"String","CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000","ProjectDescription":"String","Scope":"String","StatusId":0}]}]}