Field Squared API Services

<back to all web services

Route

Contains the data for a route within the system.

The following routes are available for this service:
GET,POST,DELETE/{Workspace}/Route/{ObjectId}
GET/{Workspace}/Route/{UserId}/{Date}
Route Parameters:
NameParameterData TypeRequiredDescription
WorkspacepathstringNo
AssignedWorkspacebodystringNo
ObjectIdpathstringNo
VersionIdbodystringNo
BasedOnbodystringNo
CreatedbodystringNo
LastUpdatedbodystringNo
DatepathstringNo
StartTimebodystringNo
EndTimebodystringNo
UserIdpathstringNo
NamebodystringNo
TypebodystringNo
SegmentsbodyList<RouteSegment>No
TotalTimebodyintNo
TotalDistancebodydoubleNo
NodesbodyList<RouteNode>No
RouteSegment Parameters:
NameParameterData TypeRequiredDescription
TimeformintNo
DistanceformdoubleNo
StartformstringNo
EndformstringNo
GeometryformList<Location>No
DrivingDirectionsformList<string>No
EndNodeformRouteNodeNo
Location Parameters:
NameParameterData TypeRequiredDescription
yformdoubleNo
xformdoubleNo
RouteNode Parameters:
NameParameterData TypeRequiredDescription
LocationformLocationNo
StopTimeformintNo
ScheduleformScheduleNo
NameformstringNo
ClassedItem Parameters:
NameParameterData TypeRequiredDescription
ObjectIdformstringNo
ClassformstringNo
VersionIdformstringNo
AncestorsformList<string>No
TypeformstringNo
Schedule Parameters:
NameParameterData TypeRequiredDescription
WorkspaceformstringNo
ObjectIdformstringNo
VersionIdformstringNo
BasedOnformstringNo
StartformstringNo
EndformstringNo
TimeZoneformstringNo
UsersformList<string>No
TeamsformList<string>No
DataformDictionary<string, Object>No

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 /{Workspace}/Route/{ObjectId} HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Workspace: String,
	AssignedWorkspace: String,
	ObjectId: String,
	VersionId: String,
	BasedOn: String,
	Created: String,
	LastUpdated: String,
	Date: String,
	StartTime: String,
	EndTime: String,
	UserId: String,
	Name: String,
	Type: String,
	Segments: 
	[
		{
			Time: 0,
			Distance: 0,
			Start: String,
			End: String,
			Geometry: 
			[
				{
					y: 0,
					x: 0
				}
			],
			DrivingDirections: 
			[
				String
			],
			EndNode: 
			{
				Location: 
				{
					y: 0,
					x: 0
				},
				StopTime: 0,
				Schedule: 
				{
					Workspace: String,
					ObjectId: String,
					VersionId: String,
					BasedOn: String,
					Start: String,
					End: String,
					TimeZone: String,
					Users: 
					[
						String
					],
					Teams: 
					[
						String
					],
					Data: 
					{
						String: {}
					}
				},
				Name: String,
				ObjectId: String,
				Class: String,
				VersionId: String,
				Ancestors: 
				[
					String
				],
				Type: String
			}
		}
	],
	TotalTime: 0,
	TotalDistance: 0,
	Nodes: 
	[
		{
			Location: 
			{
				y: 0,
				x: 0
			},
			StopTime: 0,
			Schedule: 
			{
				Workspace: String,
				ObjectId: String,
				VersionId: String,
				BasedOn: String,
				Start: String,
				End: String,
				TimeZone: String,
				Users: 
				[
					String
				],
				Teams: 
				[
					String
				],
				Data: 
				{
					String: {}
				}
			},
			Name: String,
			ObjectId: String,
			Class: String,
			VersionId: String,
			Ancestors: 
			[
				String
			],
			Type: String
		}
	]
}