| GET,POST,PUT,DELETE,OPTIONS | /v1/ProjectMaterialSingle/{ProjectMaterialID} |
|---|
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 Material
Public Overridable Property MaterialID As Integer
Public Overridable Property MaterialName As String
Public Overridable Property MaterialTypeID As Short
Public Overridable Property MaterialStatusID As Byte
Public Overridable Property Quantity As Integer
Public Overridable Property Supplier As String
Public Overridable Property OrderDate As Date
Public Overridable Property DeliveryDate As Date
Public Overridable Property OnSiteDate As Date
Public Overridable Property MaterialLocation As String
Public Overridable Property Manufacturer As String
Public Overridable Property SerialNumber As String
Public Overridable Property BarCode As String
Public Overridable Property TrackingInfo As String
Public Overridable Property MaterialDescription As String
Public Overridable Property Notes As String
Public Overridable Property ImageURL As String
Public Overridable Property DetailsURL As String
Public Overridable Property CreatedByUID As Guid
Public Overridable Property Active As Boolean
Public Overridable Property RecordCreatedDate As Date
Public Overridable Property StatusId As Integer
Public Overridable Property MaterialTypeName As String
Public Overridable Property Cost As Double
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 ProjectMaterial
Inherits Material
Public Overridable Property ProjectMaterialID As Integer
Public Overridable Property ProjectID As Integer
Public Overridable Property ProjectEndDate As Date
Public Overridable Property MaterialCost As Double
Public Overridable Property JobID As Integer
Public Overridable Property BilledMaterialCost As Double
Public Overridable Property MaterialQty As Integer
End Class
Public Partial Class ProjectMaterialSingleRequest
Public Overridable Property ProjectMaterialID As Integer
Public Overridable Property MaterialID As Integer
Public Overridable Property Material As List(Of Material) = New List(Of Material)
End Class
Public Partial Class ProjectMaterialSingleResponse
Public Overridable Property ResponseStatus As ResponseStatus
Public Overridable Property Material As List(Of ProjectMaterial) = New List(Of ProjectMaterial)
End Class
End Namespace
End Namespace
VB.NET ProjectMaterialSingleRequest 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/ProjectMaterialSingle/{ProjectMaterialID} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"ProjectMaterialID":0,"MaterialID":0,"Material":[{"MaterialID":0,"MaterialName":"String","MaterialTypeID":0,"MaterialStatusID":0,"Quantity":0,"Supplier":"String","OrderDate":"0001-01-01T00:00:00.0000000","DeliveryDate":"0001-01-01T00:00:00.0000000","OnSiteDate":"0001-01-01T00:00:00.0000000","MaterialLocation":"String","Manufacturer":"String","SerialNumber":"String","BarCode":"String","TrackingInfo":"String","MaterialDescription":"String","Notes":"String","ImageURL":"String","DetailsURL":"String","CreatedByUID":"00000000000000000000000000000000","Active":false,"RecordCreatedDate":"0001-01-01T00:00:00.0000000","StatusId":0,"MaterialTypeName":"String","Cost":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: 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"}},"Material":[{"ProjectMaterialID":0,"ProjectID":0,"ProjectEndDate":"0001-01-01T00:00:00.0000000","MaterialCost":0,"JobID":0,"BilledMaterialCost":0,"MaterialQty":0,"MaterialID":0,"MaterialName":"String","MaterialTypeID":0,"MaterialStatusID":0,"Quantity":0,"Supplier":"String","OrderDate":"0001-01-01T00:00:00.0000000","DeliveryDate":"0001-01-01T00:00:00.0000000","OnSiteDate":"0001-01-01T00:00:00.0000000","MaterialLocation":"String","Manufacturer":"String","SerialNumber":"String","BarCode":"String","TrackingInfo":"String","MaterialDescription":"String","Notes":"String","ImageURL":"String","DetailsURL":"String","CreatedByUID":"00000000000000000000000000000000","Active":false,"RecordCreatedDate":"0001-01-01T00:00:00.0000000","StatusId":0,"MaterialTypeName":"String","Cost":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}]}]}