Trendsic Platform Service

<back to all web services

CourierRecurrenceSaveRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/dispatch/courier/recurrences
PUT,OPTIONS/v1/dispatch/courier/recurrences/{Id}
import Foundation
import ServiceStack

public class CourierRecurrenceSaveRequest : Codable
{
    public var id:Int?
    public var recurrence:CourierRecurrenceView

    required public init(){}
}

public class CourierRecurrenceView : Codable
{
    public var courierRecurrenceID:Int
    public var courierProfileId:Int
    public var profileName:String
    public var courierFacilityId:Int?
    public var customerContactId:Int?
    public var customerName:String
    public var customerPhone:String
    public var address:String
    public var unit:String
    public var city:String
    public var zip:String
    public var zone:String
    public var lat:Double?
    public var lng:Double?
    public var weekday:Int
    public var windowStart:String
    public var windowEnd:String
    public var cadence:String
    public var anchorDate:String
    public var serviceLevelCode:String
    public var unitsExpected:Int
    public var handoff:String
    public var instructions:String
    public var payMode:String
    public var accountCode:String
    public var paused:Bool
    public var lastMaterializedDate:String
    public var nextDate:String
    public var skipDates:[String] = []

    required public init(){}
}

public class CourierRecurrenceResponse : Codable
{
    public var recurrences:[CourierRecurrenceView] = []
    public var message:String
    public var responseStatus:ResponseStatus

    required public init(){}
}


Swift CourierRecurrenceSaveRequest 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/dispatch/courier/recurrences HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Id: 0,
	Recurrence: 
	{
		CourierRecurrenceID: 0,
		CourierProfileId: 0,
		ProfileName: String,
		CourierFacilityId: 0,
		CustomerContactId: 0,
		CustomerName: String,
		CustomerPhone: String,
		Address: String,
		Unit: String,
		City: String,
		Zip: String,
		Zone: String,
		Lat: 0,
		Lng: 0,
		Weekday: 0,
		WindowStart: String,
		WindowEnd: String,
		Cadence: String,
		AnchorDate: String,
		ServiceLevelCode: String,
		UnitsExpected: 0,
		Handoff: String,
		Instructions: String,
		PayMode: String,
		AccountCode: String,
		Paused: False,
		LastMaterializedDate: String,
		NextDate: String,
		SkipDates: 
		[
			String
		]
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Recurrences: 
	[
		{
			CourierRecurrenceID: 0,
			CourierProfileId: 0,
			ProfileName: String,
			CourierFacilityId: 0,
			CustomerContactId: 0,
			CustomerName: String,
			CustomerPhone: String,
			Address: String,
			Unit: String,
			City: String,
			Zip: String,
			Zone: String,
			Lat: 0,
			Lng: 0,
			Weekday: 0,
			WindowStart: String,
			WindowEnd: String,
			Cadence: String,
			AnchorDate: String,
			ServiceLevelCode: String,
			UnitsExpected: 0,
			Handoff: String,
			Instructions: String,
			PayMode: String,
			AccountCode: String,
			Paused: False,
			LastMaterializedDate: String,
			NextDate: String,
			SkipDates: 
			[
				String
			]
		}
	],
	Message: String,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}