API

Last updated: May 17th, 2018

Authentication

The API uses your TechLink Portal client login. If you do not have an account and would like to set one up please contact TechLink Services at (866) 832-5755.

When you connect to the API you will pass your username and password hash in the headers. You will need to pass your password as MD5 encryption. Sending the password in plain text will result in authentication failure. The authentication header must be passed in each API call.

Key: X-Authorization  Value: username:[md5 password hash]

curl -X GET \
http://portal.techlinksvc.net/api/light/site \
-H 'Cache-Control: no-cache' \
-H 'X-Authorization: testuser:0A0B8D58AB1FAB5B5623557DE51E2C6A'

Environments

The API is implemented on multiple environments to facilitate development and testing in a consequence-free (or consequential) system.

Sandbox

The TechLink API is implemented in a sandboxed testing environment, so that development working with sample data can be performed. The base address for the sandboxed API is: https://sandbox.techlinksvc.net/api/light/

The sandboxed environment is populated with a copy of the production data. Note that this copy may be somewhat out-of-date, so recently-created job sites, work orders, and user accounts may not be present. The sandboxed environment can be refreshed with more current data on request.

Production (Live Portal)

The production API is implemented on the live TechLink Services portal. The base address for the production API is: https://portal.techlinksvc.net/api/light/

Calls to the production API will be working with live data - work orders will be handled by actual Project Managers and fulfilled by actual Installers. API calls to the production environment should be fully developed, well-tested, and efficiently executed.

Endpoints

The typical API endpoint is accessed via GET (for reads), POST (for writes), or DELETE (for removal) HTTP methods.

Properties

An endpoint property - usually the ID of the endpoint target - is incorporated into the endpoint URL, i.e. a GET request to http://portal.techlinksvc.net/api/light/site/1234/document/567 will access site #1234's document #567. If an endpoint has a stated property, it is required.

Arguments

Endpoint arguments can be included as a URL path component (i.e. http://portal.techlinksvc.net/api/light/site/1234), as a URL query parameter (i.e. http://portal.techlinksvc.net/api/light/site?city=Shelbyville), or in the request's POST fields. These can be required or optional - the endpoint field list will include that information.

Wildcards

Endpoint arguments can sometimes specify that wildcards are enabled. The asterisk ('*') is the only supported wildcard, and designates any number of characters (including zero) matched. For example, searching for 'test*' will match 'testing', 'testable', or 'test', but not 'greatest' - however, '*test*' would match 'greatest'.

(Note that you can still search for a literal '*' by escaping with a backslash, so searching for a site named '\*test' would only match the '*test' site, not the 'greatest' site.)

Sites

The following endpoints are supported for job sites.

Get Site ID List

This endpoint returns client job site IDs. (Note that this refers to the TechLink site object ID, not the client-provided site ID.) Site IDs will be ordered with the newest first.

URL: http://portal.techlinksvc.net/api/light/site
Method: GET
Query Fields:
name required type description
site_id no text Site ID to search for (note that this is the 'site ID' provided when creating a site, not the TechLink site object ID) (wildcards enabled)
name no text Site name (company) to search for (wildcards enabled)
address no text Street address to search for (wildcards enabled)
city no text City to search for (wildcards enabled)
state no text State to search for, abbreviated or full (wildcards enabled)
zip no text ZIP code to search for (wildcards enabled)
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "2 sites found",
  "data": [
    49947,
    49946"
  ],
  "time": 0.2331788539886474609375
}

Get Site Details

This endpoint returns detailed information about a client job site.

URL: http://portal.techlinksvc.net/api/light/site/{siteID}
Method: GET
URL Parameters:
name type description
siteID number The (TechLink site object) ID of the site for which to retrieve data
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "Site #49947 found",
  "data":{
    "id": 49947,
    "name": "Joe Testers",
    "siteid": "",
    "phone": "803-555-1212",
    "notes": "This is an API test",
    "timezone": "America/New_York",
    "last_modified": "2018-06-04 13:02:04 UTC",
    "contact1": {
      "name": "Joe Tester",
      "phone": "803-555-1212",
      "email": "joetester@myname.com"
    },
    "contact2": {
      "name": "Tom Tester",
      "phone": "706-555-1212",
      "email": "tomtester@myname.com"
    },
    "address": {
      "street": "321 Main Street",
      "street2": "",
      "street3": "",
      "city": "New York",
      "state": "New York",
      "stateabbr": "NY",
      "zip": "10021",
      "country": "",
      "lat": "41.505069",
      "lng": "-73.970327"
    },
    "attributes": []
   },
  "time": 0.2020699977874755859375
}

Create New Site

This endpoint creates a new job site.

URL: http://portal.techlinksvc.net/api/light/site
Method: POST
Query Fields:
name required type description
name yes text The site name
site_id no text The site ID. This is for reference only - this will not translate to the TechLink site object ID
phone no text The site phone number
fax no text The site fax number
address1 yes text The first (street) address line of the site
address2 no text The second address line of the site
address3 no text The third address line of the site
city yes text The site's city
state yes text The site's state - full name or two-letter abbreviation
zip yes text The ZIP (postal) code of the site - must be a 5-digit or 9-digit code if in the US
country no text The country of the site - will default to 'US' ('United States' also valid); can be set to 'Canada' as well
primary_contact_name yes text The site's primary contact's name
primary_contact_phone yes text The site's primary contact's phone number
primary_contact_email yes text The site's primary contact's email address
secondary_contact_name no text The site's secondary contact's name
secondary_contact_phone no text The site's secondary contact's phone number
secondary_contact_email no text The site's secondary contact's email address
enable_notifications no text A comma-separated list of user IDs to include in the site notification emails. Normally, all client user accounts are excluded by default from site notification emails, regardless of user notification status - this will override that and enable emails to that user
additional_notifications no text A comma-separated list of email addresses to include in the default site emails
notes no text The general site notes
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "Site #49947 successfully created",
  "data": {
    "success": true,
    "site_id": 49947,
    "site": {
      (site object - see Get Site Details for definition)
    }
  },
  "time": 1.6196401119232177734375
}

Update Existing Site

This endpoint updates an existing job site. Only the fields provided (even if empty) will be updated.

URL: http://portal.techlinksvc.net/api/light/site/{siteID}
Method: POST
URL Parameters:
name type description
siteID number The (TechLink site object) ID of the site to update
Query Fields:
name required type description
name if provided text The site name
site_id no text The site ID. This is for reference only - this will not translate to the TechLink site object ID
phone no text The site phone number
fax no text The site fax number
address1 if provided text The first (street) address line of the site
address2 no text The second address line of the site
address3 no text The second address line of the site
city if provided text The site's city
state if provided text The site's state - full name or two-letter abbreviation
zip if provided text The ZIP (postal) code of the site - must be a 5-digit or 9-digit code if in the US
country no text The country of the site - will default to 'US' ('United States' also valid); can be set to 'Canada' as well
primary_contact_name if provided text The site's primary contact's name
primary_contact_phone if provided text The site's primary contact's phone number
primary_contact_email if provided text The site's primary contact's email address
secondary_contact_name no text The site's secondary contact's name
secondary_contact_phone no text The site's secondary contact's phone number
secondary_contact_email no text The site's secondary contact's email address
enable_notifications no text A comma-separated list of user IDs to include in the site notification emails. Normally, all client user accounts are excluded by default from site notification emails, regardless of user notification status - this will override that and enable emails to that user
additional_notifications no text A comma-separated list of email addresses to include in the default site emails
notes no text The general site notes
Note: Only pass the fields you want updated.
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "Site #49947 successfully updated",
  "data": {
    "success": true,
    "site_id": 49947,
    "site": {
      (site object - see Get Site Details for definition)
    }
  },
  "time": 1.6196401119232177734375
}

Get Site Attributes

This will retrieve all site attributes (general key/value pairs) associated with a job site.

URL: http://portal.techlinksvc.net/api/light/site/{siteID}/attribute
Method: GET
URL Parameters:
name type description
siteID number The (TechLink site object) ID of the site for which to update the attribute
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "2 attributes for site #49946 found",
  "data": [
    {
      "attribute_id": 63865,
      "site_id": 49946,
      "name": "Attribute sample name",
      "value": "Attribute sample value"
    },
    {
      "attribute_id": 63866,
      "site_id": 49946,
      "name": "Attribute2 sample name",
      "value": "Attribute2 sample value"
    }
  ],
  "time": 0.135857105255126953125
}

Set Site Attribute

This will set (create or update) a custom site attribute. Note that site attributes are referenced by name, not by ID, unlike most other endpoint object references.

URL: http://portal.techlinksvc.net/api/light/site/{siteID}/attribute
Method: POST
URL Parameters:
name type description
siteID number The (TechLink site object) ID of the site for which to update the attribute
Query Fields:
name required type description
name yes text The attribute name
value yes text The attribute's arbitrary value
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "Site #49947 attribute successfully set",
  "data": {
    "success": true,
    "attribute_id": 63865,
    "attribute": {
      (site attribute object - see Get Site Attributes for definition)
    }
  },
  "time": 0.3038499355316162109375
}

Remove Site Attribute

This will remove a custom site attribute. Note that site attributes are referenced by name, not by ID, unlike most other endpoint object references.

URL: http://portal.techlinksvc.net/api/light/site/{siteID}/attribute
Method: DELETE
URL Parameters:
name type description
siteID number The (TechLink site object) ID of the site from which to remove the attribute
Query Fields:
name required type description
name yes text The attribute name to be removed
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "Site #49947 attribute successfully deleted",
  "data": {
    "success": true
  },
  "time": 0.271129131317138671875
}

Get Site Documents

This will retrieve all site-specific documents for a job site.

URL: http://portal.techlinksvc.net/api/light/site/{siteID}/document
Method: GET
URL Parameters:
name type description
siteID number The (TechLink site object) ID of the site for which to retrieve the documents
Query Fields:
name required type description
description no text Document description to search for (wildcards enabled)
filename no text Document filename to search for (wildcards enabled)
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "1 document found",
  "data": [
    {
      "document_id": 16168,
      "site_id": 49946,
      "filename": "testdocument.doc",
      "description": "Test File",
      "url": ""
    }
  ],
  "time": 0.1463930606842041015625
}

Get (Raw) Site Document

This will retrieve the raw file data for a site-specific document for a job site.

URL: http://portal.techlinksvc.net/api/light/site/{siteID}/document/{documentID}/raw
Method: GET
URL Parameters:
name type description
siteID number The (TechLink site object) ID of the site for which to retrieve the documents
documentID number The document ID of the site document to retrieve
 

The response will be returned as raw data suitable for saving to a file

Upload New Site Document

This will create a new site-specific document for a job site.

URL: http://portal.techlinksvc.net/api/light/site/{siteID}/document
Method: POST
URL Parameters:
name type description
siteID number The (TechLink site object) ID of the site for which to create the document
Query Fields:
name required type description
file yes file The file to upload as a new site document
description no text A description of the uploaded document
Note: The document must be sent as a file.
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "Document #16167 saved for site #49947",
  "data": {
    "success": true,
    "document_id": 16167,
    "document": {
      (site-document object - see Get Site Documents for definition)
    }
  },
  "time": 0.1828458309173583984375
}

Remove Site Document

This will remove a site-specific document from a job site.

URL: http://portal.techlinksvc.net/api/light/site/{siteID}/document/{documentID}
Method: DELETE
URL Parameters:
name type description
siteID number The (TechLink site object) ID of the site from which to remove the document
documentID number The object ID of the document to remove
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "Document #16178 removed from site #49947",
  "data": {
    "success": true
  },
  "time": 0.1957938671112060546875
}

Projects

The following endpoints are supported for projects.

Note: To have a project added please reach out to your project manager.

Get Projects

This will retrieve a list of all client projects.

URL: http://portal.techlinksvc.net/api/light/project
Method: GET
Query Fields:
name required type description
name no text Project name to search for (wildcards enabled)
 

The response will be returned in JSON format:


  "code": 200,
  "message": "1 project found",
  "data": [
    {
      "project_id": 389,
      "name": "API Project Test"
    }
  ],
  "time": 0.162231922149658203125

Miscellaneous

The following miscellaneous endpoints are available.

Get Client Task Items

This will retrieve a list of all available client task items. The task item IDs are used in the creation of new work order tasks.

URL: http://portal.techlinksvc.net/api/light/taskitem
Method: GET
Query Fields:
name required type description
name no text Task item name to search for (wildcards enabled)
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "29 task items found",
  "data": {
    "tasks": [
      {
        "taskitem_id": 30,
        "name": "1M Antenna"
      },
      {
        "taskitem_id": 24,
        "name": "1M Antenna w/NPRM Kit"
      },
      {
        "taskitem_id": ##,
        "name": "Another item, etc..."
      },
      ...
    ]
  },
  "time": 0.1844079494476318359375
}

Get Client Users

This will retrieve a list of all client user accounts. The account IDs are used in the creation of new work orders.

URL: http://portal.techlinksvc.net/api/light/user
Method: GET
Query Fields:
name required type description
name no text User name (first and last) to search for (wildcards enabled)
username no text Username (login) to search for (wildcards enabled)
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "1 user found",
  "data": [
    {
      "user_id": 1234,
      "username": "testuser",
      "name": "Firstname Lastname",
      "email": "myemail@mydomain.com",
      "phone": "888-555-5555",
      "restricted": false,
      "enabled": true,
      "last_login": "2018-06-07 15:14:26 EDT"
    }
  ],
  "time": 0.135868072509765625
}

Work Orders

The following endpoints are supported for work orders.

Get Work Order ID List

This endpoint returns client work order IDs. Work order IDs will be ordered with the newest first.

URL: http://portal.techlinksvc.net/api/light/workorder
Method: GET
Query Fields:
name required type description
site_id no text Site ID to search for (this is the TechLink site object ID, not the client site ID field) (wildcards enabled)
project_id no text Project id to search for (wildcards enabled)
status_code no text Work order status code to search for (wildcards enabled)
summary no text Summary to search for (wildcards enabled)
description no text Description to search for (wildcards enabled)
po no text Purchase Order to search for (wildcards enabled)
install_date no text (YYYY‑MM‑DD) The scheduled install date to search for (YYYY-MM-DD format)
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "2 work orders found",
  "data": [
    111981,
    111982"
  ],
  "time": 0.25928211212158203125
}

Get Work Order Details

This endpoint returns detailed information about a client work order.

URL: http://portal.techlinksvc.net/api/light/workorder/{workorderID}
Method: GET
URL Parameters:
name type description
workorderID number The object ID of the work order for which to retrieve data
Query Fields:
name required type description
include_site no boolean Setting to include site data
include_questions no boolean Setting to include close-out questions and answers
include_tasks no boolean Setting to include tasks
include_quotes no boolean Setting to include quotes
include_notes no boolean Setting to include notes
include_photos no boolean Setting to include photo information
include_client_documents no boolean Setting to include client documents
include_closeout_documents no boolean Setting to include close-out documents
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "Work order #111981 found",
  "data": {
    "workorder": {
      "id": 111981,
      "status": "Scheduled",
      "status_code": 60,
      "type": "Work Order",
      "submitter_id": 7693,
      "po": "PO12345",
      "client_reference": "#8675309",
      "summary": "Go onsite and replace the network switch",
      "description": "In building 2 replace the switch in rack 5 at U24",
      "requested_time": "2018/06/12 09:00:00",
      "scheduled_date": "2017-10-20 15:00:00",
      "site_id": 49947,
      "installer": {
        "name": "AAA Installers Ltd.",
        "phone": "123-456-7890",
        "email": "installers@nowhere.com"
      },
      "planned_tech": {
        "name": "Tony McAnthony",
        "phone": "987-654-3210"
      },
      "site": { (if requested)
        (site object - see Get Site Details for definition)
      },
      "questions": { (if requested)
        (questions object array - see Get Close-Out Questions for definition)
      },
      "tasks": { (if requested)
        (task object array - see Get Tasks for definition)
      },
      "quotes": { (if requested)
        (quote object array - see Get Quotes for definition)
      },
      "notes": { (if requested)
        (note object array - see Get Notes for definition)
      },
      "photos": { (if requested)
        (photo object array - see Get Photos for definition)
      },
      "client_documents": { (if requested)
        (document object array - see Get Client Documents for definition)
      },
      "closeout_documents": { (if requested)
        (close-out document object array - see Get Close-Out Documents for definition)
      },
      "url": "http://portal.techlinksvc.net/portal/index.php?sp=orders&act=detail&id=111981",
      "created_date": "2018-06-11 16:31:22 EDT",
      "last_modified": "2018-06-11 16:31:22 UTC"
    }
  },
  "time": 0.1535880565643310546875
}

Create New Work Order

This endpoint creates a new work order.

URL: http://portal.techlinksvc.net/api/light/workorder
Method: POST
Query Fields:
name required type description
site_id yes text The (TechLink site object) ID for the work order. See Get Site List
summary yes text The work order summary
type no text The work order type - can be 'work order' (default) or 'site survey'
description no text The work order's detailed description
po yes text The Purchase Order information for the work order
client_reference yes text The Client Reference information for the work order
project_id no text The project ID for this work order. See Get Projects
requested_install yes text The requested install date and time for this work order. This is a plain text field that will be interpreted by your Project Manager
submitter_id no text The user ID of the person who is responsible for submitting this work order. See Get Client Users
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "Work order #111981 successfully created",
  "data": {
    "success": true
    "workorder_id": 111981,
    "url": "http://portal.techlinksvc.net/portal/index.php?sp=orders&act=detail&id=111981",
    "workorder": {
      (work order object - see Get Work Order Details for definition)
    },
  },
  "time": 1.2287228107452392578125
}

Update Existing Work Order

This endpoint updates an existing work order. Only the fields provided (even if empty) will be updated.

URL: http://portal.techlinksvc.net/api/light/workorder/{workorderID}
Method: POST
URL Parameters:
name type description
workorderID number The object ID of the work order to update
Query Fields:
name required type description
summary if provided text The work order summary
description no text The work order's detailed description
po if provided text The Purchase Order information for the work order
client_reference if provided text The Client Reference information for the work order
project_id if provided text The project ID for this work order. See Get Projects
requested_install if provided text The requested install date and time for this work order. This is a plain text field that will be interpreted by your Project Manager
submitter_id no text The user ID of the person who is responsible for submitting this work order. See Get Client Users
Note: Only pass the fields you want updated.
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "Work order #111981 successfully updated",
  "data": {
    "success": true
    "workorder_id": 111981,
    "url": "http://portal.techlinksvc.net/portal/index.php?sp=orders&act=detail&id=111981",
    "workorder": {
      (work order object - see Get Work Order Details for definition)
    },
  },
  "time": 0.440166950225830078125
}

Get Work Order Client Documents

This will retrieve all client documents for a work order.

URL: http://portal.techlinksvc.net/api/light/workorder/{workorderID}/document
Method: GET
URL Parameters:
name type description
workorderID number The object ID of the work order for which to retrieve the client documents
Query Fields:
name required type description
description no text Document description to search for (wildcards enabled)
filename no text Document filename to search for (wildcards enabled)
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "2 work order client documents found",
  "data": [
    {
      "document_id": 54321,
      "workorder_id": 123456,
      "filename": "sampledocument1.doc",
      "description": "Sample document 1",
      "url": ""
    },
    {
      "document_id": 54322,
      "workorder_id": 123456,
      "filename": "sampledocument2.doc",
      "description": "Sample document 2",
      "url": ""
    }
  ],
  "time": 0.1549479961395263671875
}

Get (Raw) Work Order Client Document

This will retrieve the raw file data for a client document.

URL: http://portal.techlinksvc.net/api/light/workorder/{workorderID}/document/{documentID}/raw
Method: GET
URL Parameters:
name type description
workorderID number The object ID of the work order for which to retrieve the client document
documentID number The object ID of the document to retrieve
 

The response will be returned as raw data suitable for saving to a file

Add Work Order Client Document

This will create a new client document for a work order.

URL: http://portal.techlinksvc.net/api/light/workorder/{workorderID}/document
Method: POST
URL Parameters:
name type description
workorderID number The object ID of the work order for which to create the document
Query Fields:
name required type description
file yes file The file to upload as a new work order document
description no text A description of the uploaded document
Note: The document must be sent as a file.
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "Client document #16174 added to work order #111981",
  "data": {
    "success": true
    "document_id": 16174,
    "document": {
      (document object - see Get Client Documents for definition)
    },
  },
  "time": 0.437919139862060546875
}

Remove Work Order Client Document

This will remove a client document from a work order.

URL: http://portal.techlinksvc.net/api/light/workorder/{workorderID}/document/{documentID}
Method: DELETE
URL Parameters:
name type description
workorderID number The object ID of the work order from which to remove the document
documentID number The object ID of the document to delete
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "Client document #16174 deleted from work order #111981",
  "data": {
    "success": true
  },
  "time": 0.1608631610870361328125
}

Get Completed Work Order Close-Out Documents

This will retrieve all completed close-out documents for a work order. Close-out documents will be uploaded by the installer's technician when ready.

URL: http://portal.techlinksvc.net/api/light/workorder/{workorderID}/closeout
Method: GET
URL Parameters:
name type description
workorderID number The object ID of the work order for which to retrieve the close-out documents
Query Fields:
name required type description
description no text Document description to search for (wildcards enabled)
filename no text Document filename to search for (wildcards enabled)
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "1 work order close-out document found",
  "data": [
    {
      "document_id": 54776,
      "workorder_id": 112044,
      "filename": "wo_112044_test_w9.pdf",
      "description": "Close out test 1",
      "url": ""
    }
  ],
  "time": 0.169950008392333984375
}

Get (Raw) Completed Work Order Close-Out Document

This will retrieve the raw file data for a completed close-out document. Close-out documents will be uploaded by the installer's technician when ready.

URL: http://portal.techlinksvc.net/api/light/workorder/{workorderID}/closeout/{documentID}/raw
Method: GET
URL Parameters:
name type description
workorderID number The object ID of the work order for which to retrieve the close-out document
documentID number The object ID of the close-out document to retrieve
 

The response will be returned as raw data suitable for saving to a file

Get Work Order Notes

This will retrieve all notes that have been added to a work order.

URL: http://portal.techlinksvc.net/api/light/workorder/{workorderID}/note
Method: GET
URL Parameters:
name type description
workorderID number The object ID of the work order for which to retrieve the notes
Query Fields:
name required type description
search no text Note text to search for (wildcards enabled)
author no text Author to search for (format "first last" name) (wildcards enabled)
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "2 notes found",
  "data": [
    {
      "note_id": 1926411,
      "workorder_id": 111981,
      "author": "Robert Saylor",
      "content": "Please call dispatch when onsite",
      "created_date": "2018-06-13 09:14:18 EDT"
    },
    {
      "note_id": 1926300,
      "workorder_id": 111981,
      "author": "Robert Saylor",
      "content": "Status set to Created.",
      "created_date": "2018-06-11 16:31:23 EDT"
    }
  ],
  "time": 0.142609119415283203125
}

Add Work Order Note

This will add a new note to a work order.

URL: http://portal.techlinksvc.net/api/light/workorder/{workorderID}/note
Method: POST
URL Parameters:
name type description
workorderID number The object ID of the work order to which to add the note
Query Fields:
name required type description
note yes text The text of the note to add to the work order
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "Note #1926411 added to work order #111981",
  "data": {
    "success": true
    "note_id": 1926411,
    "note": {
      (note object - see Get Notes for definition)
    },
  },
  "time": 0.8897240161895751953125
}

Get Work Order Tasks

This will retrieve all tasks from a work order.

URL: http://portal.techlinksvc.net/api/light/workorder/{workorderID}/task
Method: GET
URL Parameters:
name type description
workorderID number The object ID of the work order for which to retrieve the tasks
Query Fields:
name required type description
item no text Task item to search for (wildcards enabled)
description no text Task description to search for (wildcards enabled)
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "1 task found",
  "data": [
    {
      "task_id": 411970,
      "workorder_id": 111981,
      "item": "**Technician Down Payment**",
      "item_notes": [
        "also item notes if exist"
      ],
      "description": "Adding technical billing",
      "description_notes": [
        "updated Jun 13 by admin"
      ],
      "quantity": "2",
      "rate": "5,000.00",
      "price": "10,000.00",
      "created_date": "2018-06-13 10:10:18 EDT"
    }
  ],
  "time": 0.220220088958740234375
}

Add Work Order Task

This will add a task to a work order.

URL: http://portal.techlinksvc.net/api/light/workorder/{workorderID}/task
Method: POST
URL Parameters:
name type description
workorderID number The object ID of the work order to which to add the note
Query Fields:
name required type description
taskitem_id yes number The task type ID for the task to be added. See Task Items.
description yes text The task description
note no number The quantity of the task to be added (defaults to 1)
rate yes number The rate (cost per) at which the task should be added
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "Client task #411970 added to work order #111981",
  "data": {
    "success": true,
    "task_id": 411970,
    "task": {
      (task object - see Get Work Order Tasks for definition)
    }
  },
  "time": 0.44291210174560546875
}

Get Work Order Quotes

This will retrieve all quotes for a work order.

URL: http://portal.techlinksvc.net/api/light/workorder/{workorderID}/quote
Method: GET
URL Parameters:
name type description
workorderID number The object ID of the work order for which to retrieve the quotes
Query Fields:
name required type description
item no text Quote item to search for (wildcards enabled)
description no text Quote description to search for (wildcards enabled)
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "1 quote found",
  "data": [
    {
      "quote_id": 411974,
      "workorder_id": 112045,
      "item": "Survey",
      "description": "New site survey quote",
      "quantity": "1",
      "rate": "7,000.00",
      "price": "7,000.00",
      "created_date": "2018-06-13 13:35:25 EDT"
    }
  ],
  "time": 0.1655800342559814453125
}

Get Work Order Photos

This will retrieve all close-out photos for a work order. The close-out photos are uploaded to the work order by the installer's technician.

URL: http://portal.techlinksvc.net/api/light/workorder/{workorderID}/photo
Method: GET
URL Parameters:
name type description
workorderID number The object ID of the work order for which to retrieve the photos
Query Fields:
name required type description
search no text Photo description to search for (wildcards enabled)
 

The response will be returned in JSON format:

{
  "code": 200,
  "message": "1 photo found",
  "data": [
    {
      "photo_id": 425524,
      "workorder_id": 112044,
      "note": "Test photo 1",
      "url": "http://portal.techlinksvc.net/portal/file/img/wo_112044.jpg",
      "created_date": "2018-06-13 14:29:05 EDT"
    }
  ],
  "time": 0.5057270526885986328125
}

Get (Raw) Work Order Photo

This will retrieve the raw file data for a photo for a work order. The close-out photos are uploaded to the work order by the installer's technician.

URL: http://portal.techlinksvc.net/api/light/workorder/{workorderID}/photo/{photoID}/raw
Method: GET
URL Parameters:
name type description
workorderID number The object ID of the work order for which to retrieve the photos
photoID number The object ID of the photo to retrieve
Query Fields:
name required type description
search no text Photo description to search for (wildcards enabled)
 

The response will be returned as raw data suitable for saving to a file

Get Work Order Close-Out Questions

This will retrieve all close-out questions for a work order, along with their answers (if provided). The close-out questions will be answered by the installer's technician.

URL: http://portal.techlinksvc.net/api/light/workorder/{workorderID}/question
Method: GET
URL Parameters:
name type description
workorderID number The object ID of the work order for which to retrieve the questions and answers
Query Fields:
name required type description
question no text Question text to search for (wildcards enabled)
answer no text Answer text to search for (wildcards enabled)

The response will be returned in JSON format:

{
  "code": 200,
  "message": "2 questions found",
  "data": [
    {
      "question_id": 800716,
      "workorder_id": 112079,
      "question": "Did you secure all equipment and provided login details to the client?",
      "answer": "Yes.",
      "sort_order": "1",
      "last_modified": "2018-06-13 20:24:55"
    },
    {
      "question_id": 800717,
      "workorder_id": 112079,
      "question": "Did you clean up your work area and discarded all trash?",
      "answer": "",
      "sort_order": "2",
      "last_modified": "2018-06-13 16:24:55"
    }
  ],
  "time": 0.1439659595489501953125
}