Web Services Developer Guide - Company Admin Service

Overview


This article contains documentation for the Company Admin web service, all related API calls and possible errors.

You can use Ctrl+F to search for the required error message.

For more information about Web Services, refer to the Introduction to Web Services.



Information

This web service includes the following methods:

Also, the description of all Interface Objects is added as a final section of the article.

 

GetGroups


Description

Returns all available groups, including parent, children hierarchy, and profile name to the calling user.

Note: The getDivisions API does not return the parent and children hierarchy information and returns only the group names.

 

Method Signature

Ordinal

Data Type

Can be Null?

Description

Return Result

SvGroupExt[]

No

Returns an array of SvGroupExt objects. If no groups are found, an empty array is returned.

 

CreateGroup


Description

This API will provide the ability to create a new group, and assign a parent group and a profile (if feature available) for the company. The new group will automatically be associated with all alerts configured for the new group's parent.


Method Signature

Ordinal

Data Type

Can be Null?

Description

group

SvGroup

No

Group to be created

Return

Result

SvResult

No

SvResult object indicating success or failure.


Validation Errors

Error Code

Error Message

1

The input group is null/empty

2

Group name must be populated

3

Duplicate group name not allowed

4

Group name must not exceed 50 characters

5

No group exists with the given parent group name - <parentGroupName>

6

No profile exists with the given name - <profileName>

7

Parent Group is not associated with the user's role - <rolename>

8

Comma not allowed in group name.

 

UpdateGroup


Description

This API will provide the ability to update an existing group, assign or change a parent group and profile (if the feature is available).

When a group is moved from one parent group to another parent group, all alerts linked to the new parent group are linked to the group being moved.

At the same time this group gets disassociated with all alerts which are linked with the old parent group. If the parent is not associated with an alert and the child group is, then the group remains associated with the alert.


Method Signature

Ordinal

Data Type

Can be Null?

Description

group

SvGroup

No

Group to be updated.

Return

Result

SvResult

No

SvResult object indicating success or failure.


Validation Errors

Error Code

Error Message

1

The input group is null/empty

2

Group name must be populated

3

Duplicate group name not allowed

4

Group name must not exceed 50 characters

5

Group not found with the name provided - <groupName>

6

No group exists with the given parent group name - <parentGroupName>

7

No profile exists with the given name - <profileName>

8

Comma not allowed in group name

9

Group - <parentGroupName> is the child of - <existingGroupName> and cannot be made the parent.

10

Group cannot be parent of itself

11

No such group exists or is associated with the user’s role

12

No such parent group exists or is associated with the user’s role

 

DeleteGroups


Description

This API will provide the ability to delete group/s. A maximum of 100 groups could be passed in a single call


Method Signature

Ordinal

Data Type

Can be Null?

Description

groups

String[]

No

Array of group name/s to be deleted

Return

Result

SvGroupResult[]

No

An array of SvGroupResult objects indicating success or failure for each group.


Validation Errors

Error

Code

Error Message

1

The input array is null/empty

2

No group exists with the given name

3

Unable to delete the group because it has active users, sub-groups, geofences, forms, job types and landmarks associated with it.

4

Maximum of 100 groups should be passed in the input.

 

GetWorkers

Description

The getWorkers() service method provides the ability to query for all workers in a company.


Method Signature

Ordinal

DataType

Can be

Null?

Description

Return

Result

SvWorker[]

No

An array of SvWorker instances.



Expected behaviors

  • All workers (except deleted) are returned by this service call.
  • Each SvWorker has a boolean active flag that indicates if the worker/user is active in StreetSmart. A worker/user must be active to log in.
  • Each SvWorker is assigned to a security group. The caller needs to inspect these values in order to determine the role of the worker. For example, Operations users (Mission Control) cannot be assigned jobs, etc. To assign jobs to workers, the SvWorker's security group must indicate they are mobile workers.

getWorkerByName

 

Description

This web service allows the retrieval of a worker by the worker's username. It is assumed that the worker name that is input is unique within the company.


Method Signature

Ordinal

DataType

Can be Null?

Description

workerName

String

No

The username of the worker to retrieve.

Return Result

SvWorker

No

A fully populated SvWorker object if the worker is found. Otherwise null is returned.


Validation Errors

“Worker name must be supplied.” – thrown if the worker name is blank or null.


getWorkersByName

(String[] workerNameArray)


Description

This web service allows the retrieval of a set of workers by username. It is assumed that the worker names are unique within the company. Note that the size of the returned array may be different than the size of the input array if one or more workers are not found.


Method Signature

Ordinal

DataType

Can be Null?

Description

workerNameArray

String[]

No

An array of usernames to retrieve.

Return Result

SvWorker

No

For each worker that is found, a fully populated SvWorker object will be returned in the corresponding array element.  If no workers are found, an empty array is returned.


Validation Errors

“The worker name array cannot be null.” – thrown if the array is null or empty.

“Worker name must be supplied.” – thrown if an array element is blank or null.


createWorker


Description


The createWorker web service method will create a new worker in StreetSmart.


Method Signature

Ordinal

DataType

Can be

Null?

Description

Worker

SvWorker

No

An SvWorker instance describing the details of how to create/update the worker.

Return

Result

SvResult

No

SvResult object that indicates the success or failure of the method call.

 

updateWorker


Description

The updateWorker web service method updates an existing worker. If the worker does not exist in StreetSmart, an error is returned. Only fields specified in the SvWorker object will be updated. All other fields will remain with their previous values.


Method Signature

Ordinal

DataType

Can be

Null?

Description

Worker

SvWorker

No

An SvWorker instance describing the details of how to create/update the worker.

Return

Result

SvResult

No

SvResult object that indicates the success or failure of the method call.

 

createOrUpdateWorker


Description

The createOrUpdateWorker web service method will create a new worker if the worker doesn't already exist. In this case, it will be subject to the same validation rules as createWorker. If the worker already exists, that worker will be updated in the same way as in the updateWorker method.


Method Signature

Ordinal

DataType

Can be

Null?

Description

Worker

SvWorker

No

An SvWorker instance describing the details of how to create the company.

Return

Result

SvResult

No

SvResult object that indicates the success or failure of the method call.

 


deleteWorker


Description

The deleteWorker webservice method will delete an existing worker. The worker must have no active jobs assigned to them.


Method Signature

Ordinal

DataType

Can be Null?

Description

Username

String

No

The username of the user to be deleted.

Return

Result

SvResult

No

SvResult object that indicates the success or failure of the method call.

 

SvDevice

Field
DataType
Comments
deviceType String The type of device. Must be valid selection for your StreetSmart package. Required for createDevice.
description String

Description. Required for createDevice.

serialNumber String

Serial number of the device. AutoGenerated 

softwareVersion String

String representing the current StreetSmart software version on the device. Read only.

lastIPAddress String

Last known IP address of the device. Read only.

createdDateTime SvDate

Date device was created. Read only.

activatedDateTime SvDate

Activation date/time of the device. Read only.

currentlyLinkedTo String

workerName of the worker currently linked to the device. Read only

deviceIdentifier String

The device identifier assigned to the device. Could be a phone number, IP address, etc. Must be unique in the system. Required for createDevice.

 

SvResult

Field
DataType
Comments
errorCode Integer The error code. 0 if no error
errormessage String The error message
goodResult Boolean True if successful, False otherwise

 

SvAdress

Field
DataType
Comments
streetAddress String The address line(s)
apt String The suite or apartment
city String The city
state String The State
zip String The Zip code
country String The country


Error Messages

Code
Message
0

Invalid device type. Type specified does not exist in the system. description is required.

 


getDevices

SvDevice[] getDevices()


Description

The getDevices method will retrieve a list of all devices in the system for a company.


Method Signature

Ordinal

DataType

Can be Null?

Description

Worker

SvWorker

No

An SvWorker instance describing the details of how to create/update the worker.

Return

Result

SvDevice

No

Device information.

 

getDevice


Description

The getDevice web service method will retrieve information about a Device by its phone number.


Method Signature

Ordinal

DataType

Can be

Null?

Description

Return

Result

SvDevice

No

Device information.

 

createDevice


Description


The createDevice web service method will create a new device in StreetSmart.


Method Signature

Ordinal

DataType

Can be Null?

Description

Device

SvDevice

No

Populate the required device fields.

Return

Result

SvResult

No

SvResult object that indicates the success or failure of the method call.

 

updateDevice


Description

The updateDevice web service method updates an existing device. If the device does not exist in StreetSmart, an error is returned. Only fields specified in the SvDevice object will be updated. All other fields will remain with their previous values.


Method Signature

Ordinal

DataType

Can be Null?

Description

Device

SvDevice

No

Populate the required device fields.

Return

Result

SvResult

No

SvResult object that indicates the success or failure of the method call.

 


createOrUpdateDevice


Description

The createOrUpdateDevice web service method will create a new device if the device doesn't exist. In this case, it will be subject to the same validation rules as createDevice. If the device already exists, that device will be updated in the same way as in the updateDevice method.


Method Signature

Ordinal

DataType

Can be

Null?

Description

Device

SvDevice

No

Populate the required device fields.

Return

Result

SvResult

No

SvResult object that indicates the success or failure of the method call.

 

deleteDevice


Description

The deleteDevice webservice method will delete an existing device. The device must have no active jobs assigned to it.


Method Signature

Ordinal

DataType

Can be

Null?

Description

Device

deviceIdentifier

No

The phone number or IP address of the device.

Return

Result

SvResult

No

SvResult object that indicates the success or failure of the method call.



linkDeviceToWorker


Description

The linkDeviceToWorker web service method will create a new device in StreetSmart. The specified username will be linked to the device represented by the specified phone number.

If the device has previously been linked to a worker, linkDeviceToWorker will override the current setting and reassign the device to the worker specified.

 

Method Signature

Ordinal

DataType

Can be Null?

Description

deviceIdentifier

String

No

The device identifier (may be a phone number, IP address, etc.) of the device to be linked. This device must already exist in the system.

workerName

String

No

The workerName of the mobile worker to be linked.

The user must already exist in the system, and must have a valid Mobile Worker security role.

Return Result

SvResult

No

Returns an SvResult object that indicates the success or failure of the method call.

 

getDivisions


Description

This service returns all Groups/Divisions available to the calling user.


Method Signature

Ordinal

DataType

Can be Null?

Description

Return Result

SvDivision[]

No

Returns an array of SvDivision instances based on security role of the web service user. If no divisions are found, an empty array is returned. Each SvDivision instance holds the name of a division.

 

Interface Objects

 

SvWorker

Ordinal
DataType
Can be Null?
Descriptions
firstName String Yes The first name of the worker. Either the first and last name must be populated or the preferred name must be populated.
middleName String Yes The middle name of the worker.
lastName String Yes

The last name of the worker. Either the first and last name must be populated or the preferred name must be populated.

preferredName String Yes The preferred name of the worker.
userName String No The username of the worker. Must be unique within the company. Required for both createWorker and updateWorker.
divisionName String No The division of the worker. Required for createWorker.
securityRoleName String No

The name of the security role of the worker. Can be either a custom security role or one of the following: Mobile Worker, Operations, Company Administrator, Super User, WebService.
Required for createWorker.

timeZone String No The time zone of the worker. Must be one of the following: US/Samoa, US/Aleutian, US/Hawaii, US/Alaska, US/Pacific, US/Arizona, US/Mountain, US/Central, US/East-Indiana, US/Eastern, US/Indiana-Starke, US/Michigan. 
Defaults to the company time zone if the time zone is not specified.

address

SvAddress

 

Yes

 

The address of the worker.

pin

String

No The pin for a mobile worker. Must be numeric and between 4 and 10 characters and must be unique. 
Will be automatically generated if not set.

password

String

No

The password for the web portal.

mobilephoneNumber

String

Yes

The worker's mobile phone number. Required for createWorker.

otherPhoneNumber

String

Yes

Alternate phone number.

faxNumber String Yes The worker's fax number.

emailAddress

String

Yes

The worker's e-mail address.

smsAddress

String Yes

The worker's SMS address.

notificationMechanism String Yes How the worker prefers to be notified with information. This setting is used, for example, by the Alert Engine to notify the recipient of an alert.
Must be one of the following: email, sms, StreetSmartMessage.
notifyOfSystemMaintenance Boolean Yes Registers a worker to be notified of system maintenance via the preferred notification mechanism.

sendWhatsNewMail

Boolean Yes

Registers a worker to receive “what's new” information.

IVR Auth Number String Yes The 10-digit phone number by which the PowerTalk system authenticates IVR callers.
Return Result SvResult No Returns an SvResult object that indicates the success or failure of the method.

 

SvResult

Field
DataType
Comments
errorCode Integer The error code. 0 if no error.
errorMessage String The error message
goodResult Boolean True if successful; otherwise, False

 

SvAddress

Field
DataType
Comments
streetAddress String The address line(s)
apt String The suite or apartment
city String The city
State String The state
zip String The zip code

 

Error Messages

Error Code

Error Message

1

The worker does not exist in the database (only set for updateWorker)

2

Cannot update worker. Unexpected error occurred.

3

Cannot delete worker. Unexpected error occurred.

4

Invalid PIN specified. Must be numeric, must be between 4 and 10 characters long, and must be unique.

5

Password field must be non-null and not empty.

6

Either the first and last name must be populated or the preferred name must be populated.

7

The input time zone is not valid.

8

securityGroupName is required; or Invalid security group name.

9

Username must be populated.

10

Username must be unique within the company.

11

Cannot auto-generate pin.

12

Worker type code not valid.

13

Division name was empty or division not found.

14

IVR authentication number must only contain numeric values or IVR authentication number already exists for another worker.

15

Attempt to delete worker with assigned active jobs.

16

Workers cannot delete themselves.

 

SvGroupExt

Field

Data Type

Comments

name

String

Name of the division

parentDivisionName

String

Name of its parent division (if any)

childDivisions

SvDivisionExt[]

Child divisions as array of SvDivisionExt

profileName

String

Name of the profile associated with the division(if any)

 

SvGroup

Field

Data Type

Comments

existingGroupName

String

Not applicable for createGroup API. Mandatory for updateGroup API.

newGroupName

String

Name of the group. Mandatory for createGroup API. Optional for updateGroup API.

parentGroupName

String

Optional. Name of its parent group to be associated with. To remove a parent for a group, the value for the newGroupName should be set as No parent group.

profileName

String

Optional. Name of the profile to be associated with; if profile feature exists, else this property will be ignored.

To disassociate a profile for the group, the value for the newProfileName must be No profile.

 

SvGroupResult

Field

Data Type

Comments

groupName

String

Name of the group provided in the input.

errorCode

int

The error code 0 if no error

errorMessage

String

The error message corresponding to the input group name.

 

SvResult

Field

DataType

Comments

errorCode

int

The error code. 0 if no error

errorMessage

String

The error message

goodResult

String

Success Message

 

SvJobServiceResult (subclass of SvResult)

Field

DataType

Comments

errorCode

int

The error code. 0 if no error

errorMessage

String

The error message

jobReferenceNumber

String

The reference number of the job

 

SvJobActionUpdate

Field

DataType

Comments

updatedActions

SvJobAction[]

The updated actions

svJob

SvJob

The job associated with the actions

 

SvUserAction

Field

DataType

Comments

timecardName

String

The timecard name. Will be null if this action is not a timecard action. Timecard action names include: Login, Logout, Start Shift, Start Break, End Break, End Shift and Ad-Hoc Form.

executionDateTime

SvDate

Timestamp of when the user action was performed. Note that this is the timestamp logged by the device. Due to network latency or cell coverage issues, the service may not actually receive the user action until much later, so this value may be before the date range of the service query.

workerName

String

The name of the worker who completed the action

location

SvLocation

Where the action was performed. May be null

form

SvForm

Form data collected for the action. May be null

 

SvUserActionUpdate

Field

DataType

Comments

actionId

String

An Id which uniquely identifies a timecard action.

actionName

String

The timecard name. Will be null if this action is not a timecard action. Timecard action names include: Login, Logout, Start Shift, Start Break, End Break, End Shift and Ad-Hoc Form.

executionDateTime

SvDate

Timestamp of when the user action was performed. Note that this is the timestamp logged by the device. Due to network latency or cell coverage issues, the service may not actually receive the user action until much later, so this value may be before the date range of the service query.

workerName

String

The name of the worker that completed the action.

location

SvLocation

Where the action was performed. May be null.

form

SvForm

Form data collected for the action. May be null.

 

SvMessage

Field
DataType
Comments

subject

String

The subject of the message. This is a required field.

body

SvDate

The message body.

creatorUsername

String

The username of the sender of the message. If the creatorUsername is empty, the message will be sent on behalf of the StreetSmart system.

recipientUsernames

String[]

name of the intended recipients of the message.

 

SvTimesheet

Field

DataType

Comments

timecardName

String

The shift name. Is one of the following: On Duty, On Break, Off Duty, Logged In

workerName

String

The name of the worker who's timesheet it is.

startDate

SvDate

Timestamp of when the shift was started

endDate

SvDate

Timestamp of when the shift was ended. Can be null if the shift has not ended.

 

SvJobAction

Field

DataType

Comments

name

String

The name of the job action

dateTime

SvDate

Timestamp of when the job action was performed

workerName

String

The name of the worker that completed the action

location

SvLocation

Where the action was performed. May be null

form

SvForm

Form data collected with the job action. May be null

 

SvForm

Field

DataType

Comments

formName

String

The form name

formData[]

SvFormField[]

The list of form fields

 

SvFormField

Field

DataType

Comments

fieldName

String

The name of the field

fieldValue

String

The value of the field as completed by the mobile worker. If the field is a picture or signature field, then the value of the form field will have the MIME type and Base64 encoded bytes information. E.g. jpeg | <Base64 encoded bytes> or application/octet-stream | <Base64 encoded bytes>

 

SvJob

Field

DataType

Comments

referenceNumber

String

Reference number of the work item. This must be unique in StreetSmart (even among deleted work items). Reference number is used to link a work item existing in StreetSmart to an external system. This field cannot be null.

description

SvString

Description for the work item (work to be done). This is commonly referred to as the job name. This field is displayed on the device. This field can be null. The reference number is shown on the device if this field is null.

workerName

SvString

Worker assigned (or to be assigned) to this work item.

divisionName

SvString

Division assignment for this job.

workItemTypeName

SvString

WorkItemTypeName for this job. Cannot be null. WorkItemType specified must exist in StreetSmart and be linked to the company.

priority

SvString

(Emergency | High | Medium | Low)

status

SvString

Current status string of the job (Assigned | Unassigned | Retrieved | Active | Expired | Terminated)

scheduledStartTime

SvDate

Scheduled start date and time for the work item. Can be null. Must be in UTC.

scheduledEndTime

SvDate

Scheduled end date and time for the work item. Can be null. Must be in UTC.

actualStartTime

SvDate

Actual start date and time for the work item. Will be null until the work item is completed. Must be in UTC.

actualEndTime

SvDate

Actual end date and time for the work item. Will be null until the work item is completed. Must be in UTC.

deletedDateTime

SvDate

Date and time in UTC when the object is soft deleted.

customerTypeCode

SvString

Code for custom category.

jobCategoryCode

SvString

Code for job category.

location

SvLocation

Location of the work item.

attributes

SvJobAttribute[]

Array of attribute data for the job.

actions

SvJobAction[]

Array of actions for the job.

 

SvJobExt- SubClass of SvJob

Field

DataType

Comments

referenceNumber

String

Reference number of the work item. Must be unique in StreetSmart (even among deleted work items). Reference number is used to link a work item existing in StreetSmart to an external system. This field cannot be null.

description

SvString

Description for the work item (work to be done).   This is commonly referred to as the job name. This field displays on the device in lists. This field can be null. The reference number is shown on the device if this field is null.

workerName

SvString

Worker assigned (or to be assigned) to this work item.

divisionName

SvString

Division assignment for this job.

workItemTypeName

SvString

WorkItemTypeName for this job. Cannot be null. WorkItemType specified must exist in StreetSmart and be linked to the company.

priority

SvString

(Emergency | High | Medium | Low)

status

SvString

Current status string of the job (Assigned | Unassigned | Retrieved | Active | Expired | Terminated)

scheduledStartTime

SvDate

Scheduled start date and time for the work item. Can be null. Must be in UTC.

scheduledEndTime

SvDate

Scheduled end date and time for the work item. Can be null. Must be in UTC.

actualStartTime

SvDate

Actual start date and time for the work item. Will be null until the work item is completed. Must be in UTC.

actualEndTime

SvDate

Actual end date and time for the work item. Will be null until the work item is completed. Must be in UTC.

deletedDateTime SvDate Date time in UTC when the object is soft deleted.
customerTypeCode SvString Code for the customer category.
jobCategoryCode SvString Code for job category.
location SvLocation

Location of the work item.

attributes

SvJobAttribute[]

Array of attribute data for the job.
actions SvJobAction[] Array of actions for the job.
locationName String

Name of the location.   

In createJob API is used, location will be created. If newLocation = true, then location name is mandatory.

In get Jobs API, if job is associated with a location, response will have location name.

Available from JobService 0.0.3 or later.

locationReferenceNumber String

The unique number used to create location.

In get Jobs API, if job is associated with a location, response will have location reference number.

Available from JobService 0.0.3 or later.

newLocation boolean

Used to specify whether to create new location or not in create job APIs.

Available from JobService 0.0.3 or later.

 

SvcJob - SubClass of SvJobExt

Field

Data Type

Comments

dispatcherId

SvString

The dispatcher Id of the job

serviceOrganizationId

SvString

The service organization id of the company for which job needs to be created.

createdDateTime

SvDate

Not Required to specify, it will return the date and time when the job was created

rejectedDateTime

SvDate

Not Required to specify, it will return the rejected datetime of the job if it has been rejected

rejectReason

SvString

Not Required to specify, it will return the rejected reason of the job if it has been rejected

jobSkills

SvString[]

Job skills of the worker

suspendedTime

SvString

Not required to specify, it gives the total suspended time that was done on the job.

timeOnJob

SvString

Not required to specify, it gives the total actual time spent to complete the job.

totalTime

SvString

Not required to specify, it gives the total time taken to complete the job.

jobPattern

SvString

Not required to specify, tells either its a One Time Job or Always Available Job

connectionId

SvString

Not required to specify, the unique identification for the company

emailId

SvString

The valid format of email id that the job needs to be associated

jobStatus

SvString

Provides the status of the job: Assigned, Unassigned, Retrieved, Active, Completed or Expired.

jobDetailsURL

SvString

The URL which takes to view the details (pdf) of the job.

 

SvcJobActionUpdate

Field

Data Type

Comments

updatedActions

SvJobAction[]

The updated actions

svcJob

SvcJob

The job associated with the actions

 

SvcJobExt- SubClass of SvcJob (v0.0.4)

Field

Data Type

Comments

jobDescription

SvString

Description for the job

sendToDeviceDate

SvDate

The send to device date for the job when it can be downloaded on the device.

invoiceDetail

SvInvoiceDetail

The parts that were submitted as part of completing this job.

 

SvInvoiceDetail (v0.0.4)

Field

Data Type

Comments

invoicePartsDetails

SvInvoicePartsDetail

All the parts that were used to complete the job.

totalPartsCost

Float

The total cost of all the parts.

totalLaborCost

Float

The labor cost added to the invoice while completing the job.

taxRate

Float

Any tax rate that was issued for the used parts.

totalCost

Float

The total cost of parts labor and tax

currency

String

The currency used to do the billing (e.g., $)

 

SvInvoicePartsDetail (v0.0.4)

Field

Data Type

Comments

partName

String

The part name which was used to perform the job.

quantity

int

The number of parts used to perform the job.

totalPrice

String

The total price with the quantity per unit price

unitPrice

String

The price of each part.

partNumber

String

The unique part number used to identify the part.

 

SvcJob5- SubClass of SvcJob (v0.0.5)

Field

Data Type

Comments

jobDescription

SvString

Description for the job

sendToDeviceDate

SvDate

The send to device date for the job when it can be downloaded on the device.

invoiceDetail5

SvInvoiceDetail

The parts that were submitted as part of completing this job.

 

SvInvoiceDetail5 (v0.0.5)

Field

Data Type

Comments

invoicePartsDetails5

SvInvoicePartsDetail5

All the parts that were used to complete the job.

totalPartsCost

Double

The total cost of all the parts.

totalLaborCost

Double

The labor cost added to the invoice while completing the job.

taxCost

Double

Total tax for the used parts.

totalCost

Double

The total cost of parts labor and tax

currency

String

The currency used to do the billing (e.g., $)

 

SvInvoicePartsDetail5 (v0.0.5)

Field

Data Type

Comments

partName

String

The part name which was used to perform the job.

quantity

Float

The number of parts used to perform the job.

totalPrice

String

The total price with the quantity per unit price

unitPrice

String

The price of each part.

partNumber

String

The unique part number used to identify the part.

taxRate

Double

Tax percentage for the part.

labor

Boolean

Indicates that the part is of the labor type.

 

SvcJobExtActionUpdate

Field

Data Type

Comments

updatedActions

SvJobAction[]

The updated actions

job

SvcJobExt

The job associated with the actions

 

SvJobAttribute

Field

DataType

Comments

Name

String

Name of job attribute.

Value

String

Value for job attribute.

 

SvCompany

Field

DataType

Comments

name

String

Name of the company

companyId

String

Identifier that uniquely identifies the company in StreetSmart. This is the id required to log into the website.

companyIdentifier

String

GUID that uniquely identifies the company in StreetSmart. This identifier can be used programmatically but is not considered usable for humans.

divisions

SvDivision[]

Array of SvDivision

packageName

String

Name of the package supported by this company for licensing purposes.

adminWorker

SvWorker

Administrative worker (of type SvWorker) that is passed during calls to createCompany. Otherwise, this parameter should be null.

location

SvLocation

SvLocation instance describing the location of this company. This parameter can be null

companyUrl

String

URL for the company. This parameter can be null.

 

SvDate

Field

DataType

Comments

dateString

String

String representation of a date. This type is used to provide a date using an underlying string type. This is done since some clients cannot pass dates as null values. The format must be: yyyy-MM-dd HH:mm:ss.SSS E.g., February 22, 2004 at 2:30PM should be represented as 2004-02-22 14:10:00.000

 

SvDivision

Field

DataType

Comments

name

String

Name of the division

 

SvGpsPosition

Field

DataType

Comments

Latitude

double

Latitude is a geographic coordinate that specifies the north–south position of a point on the Earth's surface

Longitude

double

Longitude is a geographic coordinate that specifies the east–west position of a point on the Earth's surface

positionCoordinateSystem

String

(RADIANS | DEGREES)

coverageStatus

int

0 = Valid GPS position attained
-1 = Timeout occurred attempting to get a GPS position -2 = Unable to connect to GPS subsystem on device
-3 = Unable to get GPS (user probably indoors or out of GPS coverage)
-4 = GPS system has been restricted by the user on the device.
1 = GPS position not attainable
2 = GPS accuracy not attainable
4 = GPS accuracy data not available
5 = Battery too low to get GPS
6 = GPS chipset malfunction

heading

double

Heading associated with this position

headingCoordinateSystem

String

(RADIANS | DEGREES)

dateTime

SvDate

Device time when the GPS position is collected in UTC. If the devices are in different time zone then convert the device time to UTC before submitting.

workerName

String

Username of the worker

speed

double

Speed at which the worker is traveling

 

SvLocation

Field

DataType

Comments

address

SvAddress

Address corresponding to the GPS position. This may be null

position

SvGpsPosition

Position corresponding to the address. This may be null

 

SvAddress

Field

DataType

Comments

streetAddress

String

Street address

apt

String

Suite number

city

String

City

state

String

State

zip

String

Postal code

 

SvWorker

Field

DataType

Comments

username

String

Login name for the user

password

String

Password (used only for creating an admin user in createCompany)

firstName

String

Worker first name

lastName

String

Worker last name

preferredName

String

Worker preferred name

address

SvAddress

Address for the worker

phoneNumber

String

Phone number for the worker

mobileNumber

String

Mobile phone number for the worker

faxNumber

String

FAX number for the worker

emailAddr

String

Email address for the worker

divisionName

String

Name of the division to which the worker currently belongs

activeStatus

Boolean

Defines if the user is active in StreetSmart (only active users can log in)

securityGroupName

String

Security group to which the user currently belongs (Operations | Mobile Worker)

 

svLocationExt

Field

DataType

Comments

Name

String

The Name of the Location

landmarkType

String

The type of the Location

Location

svLocation

The object of the address

Divisions

svDivisions

An array of svDivision

Referencenumber

String

The unique number used to update locations

 

SvWorkzone

Field

DataType

Comments

circleCenterCoordinate

SvCoordinate

GPS Object

circleRadiusMiles

Double

Size of circular workzone

workzoneType

String

Type of the work zone. Circular or Polygon or Rectangle.

 

SvCoordinate

Field

DataType

Comments

latitude

Double

The latitude decimal degrees of object

longitude

Double

The longitude decimal degrees of object

 

SvFiredAlert

Field

DataType

Comments

Address

SvAddress

Address Object

Alertdescription

String

The text description of the alert

alertType

String

The Type of alert that fired

Coordinate

SvCoordinate

The coordinate object of where the alert fired

Criteriadescription

String

The rules of the alert that fired

Message

String

The text of the message that was recorded for the fired alert

Name

String

The name of the fired alert

Priority

String

The priority of the fired alert

receivedTime

SvDate

The time when the item that triggered the alert was received by the server.

timecardName

String

Timecard status (On Duty/Logged Out/Logged In/Off Duty/On Break).

triggeredTime

SvDate

The date and time when the item that triggered the alert actually happened.

workerName

String

The name of the worker who triggered the alert.

 

SvStopTravel

Field

DataType

Comments

address

SvAddress

Address Object

coordinate

SvCoordinate

Coordinate Object

distance

double

The distance traveled in the segment. The distance is only valid for non-stopped segments

endTime

SvDate

The date and time when the stop or travel segment began

jobReferenceNumber

String

The reference number of a job if the stop occurred on a job

landmarkName

String

The name of the landmark if the stop occurred at a location

startTime

SvDate

The date and time when the stop or travel segment started

stoppedFlag

Boolean

Whether or not the segment was a stop. If true the segment is a stop; if false the segment is a travel segment.

timecardName

String

The timecard status for a segment. The possible statuses are: Logged Off, Logged In, On Duty, On Break

workerName

String

The username of the worker who performed the stop or travel segment.

 

Back to top

Comments

0 comments

Article is closed for comments.