Job Sites

Job Sites are preset locations where Work Orders are to be accomplished. Job Sites are broken down to its address parts and have a reverse-geocoded location for their latitude and longitude values. 

Fields

Tag Data Type Required Description
accountId Long Auto The id of the Account that owns this record.
city Text No The city where the Job Site is located
country Text No The country where the Job Site is located
deletedAt Text No Indicates the date and time when the Job Site was soft-deleted.
Note: Format is in timestamp and timezone (YYYY-MM-DDTHH:MM:SS.sssZ, e.g: 1970-01-01T00:00:00.000Z). This is not returned for Equipment that have not been soft-deleted.
fields Object No A collection of custom fields.
fullAddress Character (255) Yes Full street address of Job Site 
id Auto-incremented Long Auto Unique Identifier  
jobSiteImageId Long No The id of the image associated with this Job Site 
lastChangedDate Text Auto Auto-generated timestamp of the last change made to this record
Note:
Format is in timestamp and timezone (YYYY-MM-DDTHH:MM:SS.sssZ, e.g: 1970-01-01T00:00:00.000Z)
location Geometry No Latitude and longitude values based on the Job Site’s address
name Character (255) No Name of Job Site 
note Character (255) No Optional text field used for notes/comments about Job Site
postalCode Text No The zip or postal code there the Job Site is located
state Text No The state where the Job Site is located
street Text No The street where the Job Site is located

Create

API PATH: /api/v2/jobSites
METHOD: POST
EXAMPLE REQUEST:
[
  {
    "fullAddress": "505 N Michigan Ave, Chicago, IL 60611, USA",
    "name": "Tower",
    "street": "505 North Michigan Avenue",
    "city": "Chicago",
    "state": "Illinois",
    "postalCode": "60611",
    "country": "United States",
    "location": "POINT (-87.6235815 41.8911622)",
    "note": "JS 1",
    "jobSiteImageId": 26,
    "fields": {}
  }
]
EXAMPLE RESPONSE:
[
  {
    "fullAddress": "505 N Michigan Ave, Chicago, IL 60611, USA",
    "name": "Tower",
    "street": "505 North Michigan Avenue",
    "city": "Chicago",
    "state": "Illinois",
    "postalCode": "60611",
    "country": "United States",
    "location": "POINT (-87.6235815 41.8911622)",
    "note": "JS 1",
    "jobSiteImageId": 26,
    "fields": {},
    "accountId": 1248425,
    "id": 36907,
    "lastChangedDate": "2018-06-11T12:00:00.000Z"
  }
]

Upload Jobsite Image

API PATH: /api/v2/jobSiteImageUpload
STEPS:

1. Enter the ID of the job site you want to upload an image for.
2. Browse for an image file.
3. Click the Upload Job Site Image button.

Read

View Jobsite Image

API PATH: /api/v2/jobSiteImage/id
METHOD: GET

Update

API PATH: /api/v2/jobSites
METHOD: PUT
EXAMPLE REQUEST:
[
  {
    "fullAddress": "505 N Michigan Ave, Chicago, IL 60611, USA",
    "name": "Tower",
    "street": "505 North Michigan Avenue",
    "city": "Chicago",
    "state": "Illinois",
    "postalCode": "60611",
    "country": "United States",
    "location": "POINT (-87.6235815 41.8911622)",
    "note": "JS 1 Test",
    "jobSiteImageId": 26,
    "fields": {},
    "id": 36907
  }
]
EXAMPLE RESPONSE:
[
  {
    "fullAddress": "505 N Michigan Ave, Chicago, IL 60611, USA",
    "name": "Tower",
    "street": "505 North Michigan Avenue",
    "city": "Chicago",
    "state": "Illinois",
    "postalCode": "60611",
    "country": "United States",
    "location": "POINT (-87.6235815 41.8911622)",
    "note": "JS 1 Test",
    "jobSiteImageId": 26,
    "fields": {},
    "accountId": 1248425,
    "id": 36907,
    "lastChangedDate": "2018-06-11T12:00:00.000Z"
  }
]

Delete

API error calls

ERROR MESSAGE POSSIBLE CAUSES
Access Denied. POST, PUT and DELETE methods require permission of PERM_EDIT_JOB_SITES
Cannot find requested job site. (id = <id>) PUT error because the Job Site id does not exist.
Not a valid image file. Job site icon image must be PNG, JPG, BMP, or GIF Upload error because of invalid image file.
There was an error uploading the job site icon. Generic error message because of an error while uploading Job Site image.