Trendsic Platform Service

<back to all web services

LinesRequest

Requires Authentication
Required roles:Administrator, Administrator, Administrator
The following routes are available for this service:
GET,POST,PUT,DELETE,OPTIONS/v1/Lines/{Id}
GET,POST,PUT,DELETE,OPTIONS/v1/LinesByLocationId/{LocationId}
GET,POST,PUT,DELETE,OPTIONS/v1/Lines
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 Line
            Public Overridable Property Id As Guid
            Public Overridable Property LocationId As Guid
            Public Overridable Property LocationName As String
            Public Overridable Property Name As String
            Public Overridable Property Description As String
            Public Overridable Property ServiceDurationMinutes As Integer
            Public Overridable Property WaitTime As Integer
            Public Overridable Property Cost As Decimal
            Public Overridable Property UpperThreshold As Integer?
            Public Overridable Property LowerThreshold As Integer?
            Public Overridable Property Active As Boolean
            Public Overridable Property EntDate As Date?
            Public Overridable Property ModDate As Date?
            Public Overridable Property SendQuestionnaire As Boolean
            Public Overridable Property RequireUpload As Boolean
            Public Overridable Property UploadMessage As String
            Public Overridable Property LineImages As List(Of LineImage) = New List(Of LineImage)
        End Class

        Public Partial Class LineImage
            Public Overridable Property ImageId As Guid?
            Public Overridable Property FileName As String
            Public Overridable Property ImageTitle As String
            Public Overridable Property UploadDate As Date
        End Class

        Public Partial Class LinesRequest
            Public Overridable Property Id As Guid
            Public Overridable Property LocationId As Guid
            Public Overridable Property Lines As List(Of Line) = New List(Of Line)
        End Class

        Public Partial Class LinesResponse
            Public Overridable Property ResponseStatus As ResponseStatus
            Public Overridable Property Lines As List(Of Line) = New List(Of Line)
        End Class
    End Namespace
End Namespace

VB.NET LinesRequest 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/Lines/{Id} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Id: 00000000000000000000000000000000,
	LocationId: 00000000000000000000000000000000,
	Lines: 
	[
		{
			Id: 00000000000000000000000000000000,
			LocationId: 00000000000000000000000000000000,
			LocationName: String,
			Name: String,
			Description: String,
			ServiceDurationMinutes: 0,
			WaitTime: 0,
			Cost: 0,
			UpperThreshold: 0,
			LowerThreshold: 0,
			Active: False,
			EntDate: 0001-01-01,
			ModDate: 0001-01-01,
			SendQuestionnaire: False,
			RequireUpload: False,
			UploadMessage: String,
			LineImages: 
			[
				{
					ImageId: 00000000000000000000000000000000,
					FileName: String,
					ImageTitle: String,
					UploadDate: 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
		}
	},
	Lines: 
	[
		{
			Id: 00000000000000000000000000000000,
			LocationId: 00000000000000000000000000000000,
			LocationName: String,
			Name: String,
			Description: String,
			ServiceDurationMinutes: 0,
			WaitTime: 0,
			Cost: 0,
			UpperThreshold: 0,
			LowerThreshold: 0,
			Active: False,
			EntDate: 0001-01-01,
			ModDate: 0001-01-01,
			SendQuestionnaire: False,
			RequireUpload: False,
			UploadMessage: String,
			LineImages: 
			[
				{
					ImageId: 00000000000000000000000000000000,
					FileName: String,
					ImageTitle: String,
					UploadDate: 0001-01-01
				}
			]
		}
	]
}