Field Squared API Services

<back to all web services

UserImport

Bulk import a set of users.

The following routes are available for this service:
POST/{Workspace}/UserImport
System.NotSupportedException: Unknown language 'mjs', Supported languages: csharp, typescript, dart, java, kotlin, python, swift, vbnet, fsharp
   at ServiceStack.NativeTypes.LangGeneratorExtensions.GenerateSourceCode(MetadataTypes metadataTypes, MetadataTypesConfig typesConfig, String lang, IRequest req, Action`1 configure) in /home/runner/work/ServiceStack/ServiceStack/ServiceStack/src/ServiceStack/NativeTypes/ILangGenerator.cs:line 53
   at ServiceStack.NativeTypes.LangGeneratorExtensions.GenerateSourceCode(List`1 metadataTypes, String lang, IRequest req, Action`1 configure) in /home/runner/work/ServiceStack/ServiceStack/ServiceStack/src/ServiceStack/NativeTypes/ILangGenerator.cs:line 26
   at ServiceStack.Metadata.BaseMetadataHandler.d__12.MoveNext() in /home/runner/work/ServiceStack/ServiceStack/ServiceStack/src/ServiceStack/Metadata/BaseMetadataHandler.cs:line 207

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

{
	Workspace: String,
	Users: 
	[
		{
			Workspace: String,
			TimeZone: String,
			ObjectId: String,
			VersionId: String,
			Created: String,
			LastUpdated: String,
			BasedOn: String,
			ExternalId: String,
			Name: String,
			Initials: String,
			Phone: String,
			Email: String,
			Password: String,
			RequestUser: String,
			Location: 
			{
				y: 0,
				x: 0
			},
			UserType: String,
			ProposedRoute: 
			[
				{
					y: 0,
					x: 0
				}
			],
			ActualRoute: 
			[
				{
					y: 0,
					x: 0
				}
			],
			Image: String,
			UserStatus: NotStarted,
			RecordStatus: String,
			Documents: 
			[
				String
			],
			SubscribeToEmails: False,
			Address: 
			{
				Street: String,
				Unit: String,
				City: String,
				State: String,
				Zip: String,
				ContactTitle: String,
				ContactName: String,
				ContactPhone: String,
				ContactEmail: String,
				Location: 
				{
					y: 0,
					x: 0
				},
				SiteName: String,
				GeocodeFailed: False,
				Country: String
			},
			SkillTags: 
			[
				String
			],
			Enabled: False,
			UIPrefTaskColumnsOff: 
			[
				String
			],
			UIPrefTaskColumns: 
			[
				{
					Name: String,
					Width: 0
				}
			],
			Data: 
			{
				String: String
			},
			Teams: 
			[
				String
			],
			Events: 
			[
				{
					ObjectId: String,
					Date: String,
					Location: 
					{
						y: 0,
						x: 0
					},
					Barcode: String,
					Details: String,
					Type: String,
					IsScan: False,
					User: String,
					SelectedBy: String,
					Status: String,
					StatusType: String,
					DateCreated: String,
					Automatic: False
				}
			],
			Color: String,
			VehicleAsset: String,
			ExternalAuth: False,
			CreatedBy: String,
			ServiceAccount: False,
			Assets: 
			[
				String
			],
			TfaRequired: False,
			TfaPreference: String,
			WorkWeek: 
			[
				{
					DayOfWeek: 0,
					Start: 0,
					End: 0,
					Lunch: 0
				}
			],
			CustomSchedulesEnabled: False,
			CustomSchedules: 
			[
				{
					Date: String,
					Start: 0,
					End: 0,
					Type: String
				}
			],
			OverrideSso: False
		}
	],
	RequestId: String
}