Trendsic Platform Service

<back to all web services

CourierBookQuoteRequest

The following routes are available for this service:
POST,OPTIONS/v1/book/{Slug}/quote
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 CourierBookQuoteLine
            Public Overridable Property Kind As String
            Public Overridable Property Amount As Decimal
            Public Overridable Property Qty As Decimal?
            Public Overridable Property Rate As Decimal?
        End Class

        Public Partial Class CourierBookQuoteRequest
            Public Overridable Property Slug As String
            Public Overridable Property Profile As String
            Public Overridable Property Level As String
            Public Overridable Property Units As Integer
            Public Overridable Property Zip As String
            Public Overridable Property Lat As Decimal?
            Public Overridable Property Lng As Decimal?
            Public Overridable Property DropLat As Decimal?
            Public Overridable Property DropLng As Decimal?
        End Class

        Public Partial Class CourierBookQuoteResponse
            Public Overridable Property Zone As String
            Public Overridable Property Miles As Decimal?
            Public Overridable Property Lines As List(Of CourierBookQuoteLine) = New List(Of CourierBookQuoteLine)
            Public Overridable Property Total As Decimal
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class
    End Namespace
End Namespace

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

{
	Slug: String,
	Profile: String,
	Level: String,
	Units: 0,
	Zip: String,
	Lat: 0,
	Lng: 0,
	DropLat: 0,
	DropLng: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Zone: String,
	Miles: 0,
	Lines: 
	[
		{
			Kind: String,
			Amount: 0,
			Qty: 0,
			Rate: 0
		}
	],
	Total: 0,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}