Trendsic Platform Service

<back to all web services

EquipmentMaintenanceRequest

Requires Authentication
The following routes are available for this service:
GET,POST,PUT,OPTIONS/v1/Equipment/{EquipmentID}/maintenance
PUT,OPTIONS/v1/Equipment/{EquipmentID}/maintenance/{EquipmentMaintenanceID}
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 EquipmentMaintenance
            Public Overridable Property EquipmentMaintenanceID As Integer
            Public Overridable Property EquipmentID As Integer
            Public Overridable Property Type As String
            Public Overridable Property ScheduledDate As Date?
            Public Overridable Property IntervalDays As Integer?
            Public Overridable Property LastServiced As Date?
            Public Overridable Property Notes As String
            Public Overridable Property Status As String
            Public Overridable Property CreatedBy As String
            Public Overridable Property CreatedAt As Date?
            Public Overridable Property UpdatedAt As Date?
            Public Overridable Property NextDue As Date?
        End Class

        Public Partial Class EquipmentMaintenanceRequest
            Public Overridable Property EquipmentID As Integer
            Public Overridable Property EquipmentMaintenanceID As Integer
            Public Overridable Property Maintenance As List(Of EquipmentMaintenance) = New List(Of EquipmentMaintenance)
        End Class

        Public Partial Class EquipmentMaintenanceResponse
            Public Overridable Property ResponseStatus As ResponseStatus
            Public Overridable Property Maintenance As List(Of EquipmentMaintenance) = New List(Of EquipmentMaintenance)
        End Class
    End Namespace
End Namespace

VB.NET EquipmentMaintenanceRequest 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.

POST /v1/Equipment/{EquipmentID}/maintenance HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	EquipmentID: 0,
	EquipmentMaintenanceID: 0,
	Maintenance: 
	[
		{
			EquipmentMaintenanceID: 0,
			EquipmentID: 0,
			Type: String,
			ScheduledDate: 0001-01-01,
			IntervalDays: 0,
			LastServiced: 0001-01-01,
			Notes: String,
			Status: String,
			CreatedBy: String,
			CreatedAt: 0001-01-01,
			UpdatedAt: 0001-01-01,
			NextDue: 0001-01-01
		}
	]
}
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
		}
	},
	Maintenance: 
	[
		{
			EquipmentMaintenanceID: 0,
			EquipmentID: 0,
			Type: String,
			ScheduledDate: 0001-01-01,
			IntervalDays: 0,
			LastServiced: 0001-01-01,
			Notes: String,
			Status: String,
			CreatedBy: String,
			CreatedAt: 0001-01-01,
			UpdatedAt: 0001-01-01,
			NextDue: 0001-01-01
		}
	]
}