Synergist API

The Synergist API Developer Hub

Welcome to the Synergist API developer hub. You'll find comprehensive documentation to help you start working with Synergist API as quickly as possible, as well as support if you get stuck. Let's jump right in so please select 'Reference' from the drop-down below to get started.

OVERVIEW

 

API v3.3

API v3.3 requires Synergist v12.3 or higher

Overview

This document defines the Synergist API which is based on REST.

JSON/XML

All examples are shown using JSON. However this API also supports XML. To use XML you simple need to make the following changes to your API call.

replace 'jsonapi' with 'xmlapi'
replace '.json?' with '.xml?'

e.g.

JSON call
http://<SERVER>/jsonapi/activities.json?company=1&version=3.3&user=user&password=user&style=modeldata&modelstructure=activitylist

XML call
http://<SERVER>/xmlapi/activities.xml?company=1&version=3.3&user=user&password=user&style=modeldata&modelstructure=activitylist

Which API to use

 

The Synergist API is divided into areas. Each area is a standalone API.

e.g.
Activities API
Jobs.API
Calendar.API

When using the Synergist API you would normally be working in ONE of these areas at any one time. For instance. If you wish to create jobs you would use the jobs.json API. Within this API is everything you need to create/modify jobs. So if you wish to list clients prior to job creation you would use the jobs.json APi not the clients.json API. The jobs.json API will be passed a parameter to indicate you are interested in listing clients.

e.g.
http://<SERVER>/jsonapi/jobs.json?company=1&user=user&password=user&action=clients&page=1&rows=10&version=3.3

API syntax

 

Structure of an API call

 

Synergist API call

This URL would get system information.

GET /jsonapi/system.json?user=user&password=user&action=version&version=3.3

Called using a browser

http://<SERVER>/jsonapi/system.json?user=user&password=user&action=version&version=3.3

Returns

"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"responsemessage": "",
"warningmessage": "",
"success": true,
"data": [
{
"uuid": "E646889F48DD423CA1300491A31E8C50",
"systemparameters_versionno": 12.2,
"systemparameters_versionrevision": "d",
"variable_apiversion": "3.3"
}
]
}

General parameters for all requests:

parameter description
User Synergist login ID
Password Synergist password
Version Version of the API – currently 3.3
Page (optional) Data page to return, page numbering starts at 0
Rows (optional) Number of records/rows to return. 0 = return all rows

The API supports SHA512 encryption of passwords. Replace 'password' with 'sha512password' and pass the hashed password instead. see Hashing - Sha512

e.g.

http://<SERVER>/jsonAPI/diary.json?user=user&sha512password=05d929ccb4693507ab5c1c25f6a582da1f27ac225882af5295e392ae89033c356b4ddf201f78dda3c16a4d6d198998

JSON Response

When a response is sent which contains multiple records, the root of the JSON string will have the following attributes:

attribute description
Totalrows This will be the total number of records/rows in the selection, regardless of page requested
Totalpages This will be the total number of pages available, based on the rows parameter supplied
Pagenumber The current page returned in the set
Pagerows Number of rows requested

A successful response will contain the following attributes at root level:

attribute description
Success True
Responsemessage A context response message
Responsecode Response code indicator
Errormessage Empty string
Errorcode 0
Data The root json element containing the data result rows

A response error will contain the following attributes at root level:-

attribute description
Success False
Errormessage Any error context message
Errorcode Response code indicator

In case of any error, the Synergist server will return an HTTP 404 error together with an XML structure containing the error details:

<Responses>
    <Error ErrorID="404500">
        <ErrorText>invalid action companylist</ErrorText>
    </Error>
</Responses>

Error codes

Hashing - Sha512

Retrieving a hashed password from the server

 

Sha512

Parameter Description Examples Links
Action Defines the API action action=GETSHA512
<General> Parameters described in overview user=user&password=user v3.3 Overview

Example request:
Call to get the hashed password from the server....

http://<server>/jsonapi/users.json?user=user&password=user&action=GETSHA512&version=3.3

Example response:

{
      "responsecode": 1,
      "responsestatus": "OK",
      "errorcode": 0,
      "errormessage": "",
      "totalrows": 1,
      "totalpages": 1,
      "responsemessage": "",
      "pagerows": 0,
      "pagenumber": 1,
      "success": true,
      "data": [
        {
          "userUserId": 54,
          "userUuid": "090AECF644244F62BA0F344AFC8B436D",
          "userTimestampModified": 1526290294,
          "userRecordVersionNumber": 2280,
          "userPasswordSha512": "e9a75bb9f8995818579bd8997235391e540ffb20c7165985bdc4f3e1238f5d43d91e12d7d48c9acdaf13d0edc3ef33e045c750c4c684553c33d76bdd7312810f"
        }
      ]
    }

Key parameters

 

Example call - all possible standard parameters

This example is from the activities API. However, similar parameters can be used in most API calls.

Parameter Description Examples Explanation Links
Action Defines the API call. action=update If not specified records for the API area are returned, or its structure
<General> Parameters described in overview user=user&password=user&version=3.3 Username, password and API version v3.3 Overview
Company The company context company=1 Synergist company
Style Which kind of data is required style=modelstructure / style=modeldata Request either meta-data (structure) or actual data Using models
Modelstructure Name of model required Modelstructure=activitylist / Modelstructure=activitydetails Defines the fields returned. There are two available models Using models
Activityid ID of a specific record activityid=4833 Used to identify a specific record or filter the output using a key field Filters
View ID for a pre-existing query (called a “view”) view=-1700 Use the “views.json” call to obtain these values Table of views
Collection Data collection support collection=new / collection=<collection ID> Optional - used to improve API performance (advanced option)
Type The data area type=activity Specifies the area this API all relates to Which API to use
Input JSON array {"data":[{"activityDetails":"Meeting at BoundryMill","activityID":6958,"activityRecordVersionNumber":1}]} Passing data array to an API request
Page Data page to return page=1 Page numbering starts at 0
Rows Number of records/rows to return. rows=2 0 = return all rows
Response Returned data See below A JSON string containing the data available for this area, for the specified company/user

Error codes

 
Error code ID Error text
404001 No credentials supplied
404002 Invalid credentials supplied
404003 Account disabled
404004 Request not recognized

You may also receive an error code within the range of 404000 and 404999 upon an error.

  • Error message
    This is the text of the error.
    eg "invalid credentials supplied"

Passing data array to an API request

 

Passing data to an API request

If creating or updating a record in Synergist you will typically need to pass data to the API request via a JSON array. The field names can be ascertained by first making a simple request for a record and passing the modelstructure parameter.
see Using data models

Making such a call will return an example record and from this you will be able to see all the required field names.

Once you know the field names to use you can make an API request like the one below - passing the data in the input data array:

e.g.

http://<SERVER>/jsonAPI/jobs.json?user=user&password=user&action=create&company=8&version=3.3&input={
"data": [
{
"varJobTemplate": "8/00800001",
"jobHandleruserid": "3",
"jobClientCode": "8/1244",
"jobJobtypeCode": "8/10",
"jobNumber": "8/00MJP20",
"jobDescription": "My new job description",
"jobDateIn": "2017/12/06",
"jobDateDue": "2017/12/07",
"jobHandlerTeam": "8/DQS",
"jobStatus": "2",
"jobContactInternalRef": 8600,
"jobProjectCode": 388,
"jobCampaignNo": 268
}
]
}

Record numbers

Record numbers - getting latest version of the record

 

Record numbers - getting latest version of the record

In this example the API consumer wishes to ensure that the record being updated has not been changed by another process prior to a new update being made.

Example from update activity Activities API

Get the current state of the record you wish to update:

http://<SERVER>jsonapi/activities.json?company=1&version=3.3&user=user&password=user&style=modeldata&modelstructure=activitydetails&Activityid=Activityid=7957

Response:
(activityRecordVersionNumber=64)

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "activityuuid": "E0C7A305F779704BBB58F9FC01E02DB5",
      "activityTimeStampModified": 1544451501,
      "activityRecordVersionNumber": 64,
      "activityAlertBeforePeriodDescription": "",
      etc.etc..
    }
  ]
}

Record version number

activityRecordVersionNumber: This number is returned by the API when first creating/loading/amending a record. It must be passed back when doing an update if you wish to ensure the record has not changed since it was last read by the API. If the record has been updated by another user in the meantime, the update will fail.

Example request:

http://<SERVER>/jsonapi/activities.json?company=1&user=user&password=user&version=3.3&action=update&input={
  "data": [
    {
      "activityID": 7957,
      "activityDetails": "Meeting at Boundry Mill",
      "activityCustomField300": "MyText",
      "activityRecordVersionNumber": 64
    }
  ]
}

Response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "activityID": 7957,
      "activityuuid": "E0C7A305F779704BBB58F9FC01E02DB5",
      "activityTimeStampModified": 1544452467,
      "activityRecordVersionNumber": 65
    }
  ]
}

Encoding special characters

 

If you are updating records via the API with text that has special characters like ampersands embedded in the text, you must first encode these.

see :
https://www.w3schools.com/tags/ref_urlencode.asp

e.g.

To update the client name to "New Company & Co",
this needs to be passed to the api as "New Company %26 Co"

http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&action=update&input={
  "data": [
    {
      "clientCode": "1/P0909",
      "clientName": "New Company %26 Co"
    }
  ]
}

Views

Views - Synergist's saved filters

 

A 'view' in Synergist is a named predefined query.

For example the 'Active clients' view will list all organizations that are 'Clients' and flagged as active on the system .

Using views

 

Using views

When making an API call to return a section of records a 'view' can be ued to filter the date. A view is a pre-existing query. For more information on obtaining the views that can be applied to an API call see Table of views

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.3
Company The company context company=1
View ID for a pre-existing query (called a “view”) view=-1700
Response Returned data A JSON string containing the data

Example 1
a (list of records filtered by a specified view)

http://<SERVER>/jsonapi/activities.json?company=1&version=3.3&user=user&password=user&view=-1700&rows=2&page=1

Example response

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 98,
  "totalpages": 49,
  "responsemessage": "",
  "pagerows": 2,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "activityuuid": "A2905F5303AB5943B4D5E00E547B2CF5",
      "activityTimeStampModified": 1445948375,
      "activityRecordVersionNumber": 9,
      "activityAttachmentCount": "1",
      "activityCreated": "Created by SYN_Jon on 22/04/2015 at 1:02pm",
      "activityDetails1stLIne": "",
      "activityRegardingDescription": "",
      "activityRegardingDescription2": "",
      "activityRegardingWhat": "Campaign: jon test",
      "activityPriorityDescription": "High",
      "activityOwnerID": 256,
      "activityOwnerName": "SYN_Jimish",
      "activityClientCode": "",
      "activityClientName": "",
      "activityCompleted": true,
      "activityViewDate": "0000-00-00",
      "activityViewTime": "00:00:00",
      "activityViewTimezone": "",
      "activityJobNumber": "",
      "activityJobNumberSimple": "",
      "activityJobAndPhase": "",
      "activityJobAndPhaseSimple": "",
      "activitySubject": "jon test",
      "activityActivitytype": "Email Export",
      "activityID": 6161
    }
    ]
} 
 ...

Filtering the data using a key field

You can also filter the data using a key field
see Key field filters

Table of views

In Synergist a 'view' is a saved query. The view ('settings') id is typically passed as a parameter to define which selection of records is returned (see 'models')

 

Views (settings)

Use this API endpoint to get a list of 'views' for a particular table. A view is essentially a saved query.

Example request:

Parameter Description Examples
API API endpoint views.json
Type Specify table type=activities
<General> Parameters described in overview user=user&password=user&version=3.3
<input optional>company The company context company=1

Request for a list of views

http://<SERVER>/jsonapi/views.json?user=user&password=user&company=1&type=activities&version=3.3

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 10,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "settings_uuid": "8771237951EB5241A7457443688BA09B",
      "settingsTimeStampModified": 1466508984,
      "settingsRecordVersionNumber": 0,
      "SettingsCompany": 0,
      "SettingsDescription": "My open activities",
      "SettingsDisplayOrder": "01",
      "SettingsSettingsID": -1703,
      "SettingsUserID": 0,
      "SettingsDefault": false,
      "settingsSort": "DATEREQUIRED",
      "settingsSortDirection": "ASC"
    }
    ]
}

Parameters

  • Type – The type of view list to return. Valid values are:
    • “Organizations”
    • “Contacts”
    • “Activities”
    • “Opportunities”
    • “Jobs”
    • “Phases”
  • Company – The company number(s) which contain the view list required. If you omit this parameter or pass an empty string as the company number, all views will be returned. If passing multiple company numbers, they should be delimited with a carriage return.

Key field filters

 

Key field filters

When requesting data you can optionally pass additional parameters that will filter the data returned by a key field.

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.3
Company The company context company=1
Record ID ID of a specific record to use as a filter client=1/F667
Response Returned data A JSON string containing the data

In this example a list of activities is returned but is filtered to only return activities for a specific client

http://<SERVER>/jsonapi/activities.json?company=1&version=3.3&user=user&password=user&style=modeldata&modelstructure=activitylist&client=1/F667

To poll for created/modified records..

http://<SERVER>/jsonapi/activities.json?company=1&version=3.3&user=user&password=user&style=modeldata&modelstructure=activitylist&timestampoffsetfrom=-900

http://<SERVER>/jsonapi/activities.json?company=1&version=3.3&user=user&password=user&style=modeldata&modelstructure=activitylist&timestampoffsetfrom=-900

The list of key fields that can be used as filters include:
job=
jobphase=
client/client code=
clientcontact=
supplier=
suppliercontact=
workflow=
search=
uuid=
timestampfrom= (e.g. &timestampfrom=1544610321)
timestampto=
timestampoffsetfrom (e.g. &timestampoffsetfrom =-900 any records modified in the past 15 mins)
timestampoffsetto
Activity/Activityid=

View menus

Provides the data used in Synergist's 'Views' drop down menus

 

Activity viewlist (for views menu)

Returns a list of saved views (queries). This request returns data that is formatted for use in a drop down selection menu. It returns the view IDs (in the MenuClickAction field) and the default view for the user.

also see Table of views which can also be used to get data regarding views (saved filters)

Parameter Description Examples
Action Returns a list of saved queries (views) action=viewlist
<General> Parameters described in overview user=user&password=user
Company The company context company=1
Type The data area the call relates to type=activity
Response Returned data See below

Example
Request for a list of views

http://<SERVER>/jsonapi/menu.json?action=viewlist&company=1&type=activity&version=3.3&user=user&password=pass

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 0,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "MenuClickAction": "",
      "MenuDefault": false,
      "MenuDescription": "System views",
      "MenuExpanded": false,
      "MenuLevelName": "System views",
      "MenuParentName": ""
    }
  ]
}

Sorting

Sorting the data returned when using a view

 

Sorting and views in API.

The API for any area which has views, allows the passing of a sort/direction of sort parameter, which will override the view's sort/direction of sort.

&dir= can be "ASC" (ascending) or "DESC" (descending)
&sort= (see below for options for the various tables)

e.g.

http://<SERVER>/jsonapi/activities.json?company=1&version=3.3&user=user&password=user&style=modeldata&modelstructure=activitylist&view=-1700&dir=DESC&sort=DATECREATED

Sort options for each area:

Activity

CONTACT
CLIENT
HANDLER (owner)
COMPLETED
DATECOMPLETE
CREATEDBY
DATECREATED
DATEDUE
JOBPHASE
DATEMODIFIED
DESCRIPTIONHEADER
STATUS
TYPE
PRIORITY
THEIRREF
UNIQUE

Attachments

UNIQUE
DESCRIPTION
TYPE
DATECREATED
CREATEDBY

Clients

CLIENT
HANDLER
UNIQUE
TELEPHONE
TYPE

Client Contacts

MOBILE
EMAIL
NAME
ROLE

Expense Sheet

SUPPLIER
STATUS
DATEIN

Job

CLIENT
HANDLER
COMPLETED
DATEDUE
DESCRIPTION
JOBPHASE
STATUS
THERM+String($nThermo)

Phase

CLIENT
HANDLER
COMPLETED
DATEDUE
DESCRIPTION
JOBPHASE
STATUS
THERM+String($nThermo)

Purchase Order

UNIQUE
HANDLER
DESCRIPTION
SUPPLYTYPE
JOBPHASE
THEIRREF
COST ACTUAL
COST ESTIMATE
COMPLETED
REQUIRED
FINALINV
CREATED
SENT

Suppliers

SUPPLIER
UNIQUE
TELEPHONE
SUPPLYTYPE
MARKUP
UNIQUE
NAME

Job Type

ID
DESCRIPTION

Activity Types

TYPE

Projects

CLIENT
NAME

Stages

CLIENT
DESCRIPTION

Purchase Invoices (not yet supported in API)

UNIQUE
THEIRREF
VALUE
VAT
GROSS
UNALLOCATED
APPROVED
TYPE
DATEFINALINV
DATEDUE

Models

 

Data models are pre-defined sets of fields that are returned when querying the database via the API

Using data models

 

Data models

If you wish to return the field values for a Synergist table, for one or more records, you will typically call the appropriate API and specify the data model required. All the key tables will have two standard models available

<tablename>list model

<tablename>details model

If you require multiple records you would normally specify the list model. If you require the data for a single record you would normally specify the details model (which returns more fields than the list model).

Example - Activities

e.g using the activities.json API to return activity records.

  • activitylist
  • activitydetails

A single record is returned if the ‘activityid’ parameter is passed. If a list of records is required a ‘view’ parameter should be passed. If no ‘view’ parameter is passed all records for the synergist company are returned.

Parameter Description Examples
API The API area activities.json
Action Not required
<General> Parameters described in overview user=user&password=user&version=3.3
Company The company context company=1
<optional>Style Which kind of data is required style=modelstructure / style=modeldata (default)
Modelstructure Name of model required Modelstructure=activitylist / Modelstructure=activitydetails
Response Returned data A JSON string containing the data

Example 1
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/activities.json?company=1&version=3.3&user=user&password=user&style=modeldata&modelstructure=activitylist&rows=2&page=1

Example response (activitylist model):

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 98,
  "totalpages": 49,
  "responsemessage": "",
  "pagerows": 2,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "activityuuid": "A2905F5303AB5943B4D5E00E547B2CF5",
      "activityTimeStampModified": 1445948375,
      "activityRecordVersionNumber": 9,
      "activityAttachmentCount": "1",
      "activityCreated": "Created by SYN_Jon on 22/04/2015 at 1:02pm",
      "activityDetails1stLIne": "",
      "activityRegardingDescription": "",
      "activityRegardingDescription2": "",
      "activityRegardingWhat": "Campaign: jon test",
      "activityPriorityDescription": "High",
      "activityOwnerID": 256,
      "activityOwnerName": "SYN_Jimish",
      "activityClientCode": "",
      "activityClientName": "",
      "activityCompleted": true,
      "activityViewDate": "0000-00-00",
      "activityViewTime": "00:00:00",
      "activityViewTimezone": "",
      "activityJobNumber": "",
      "activityJobNumberSimple": "",
      "activityJobAndPhase": "",
      "activityJobAndPhaseSimple": "",
      "activitySubject": "jon test",
      "activityActivitytype": "Email Export",
      "activityID": 6161
    }
    ]
}

Example 2
Request for data (typically a single record using specified model)

http://<SERVER>/jsonapi/activities.json?company=1&version=3.3&user=user&password=user&style=modeldata&modelstructure=activitydetails&Activityid=6712

Example response (activitydetails model):

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 211,
  "totalpages": 106,
  "responsemessage": "",
  "pagerows": 2,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "activityuuid": "6D7106089ADDF04DBCFB08F6E8DA0E77",
      "activityTimeStampModified": 1493799916,
      "activityRecordVersionNumber": 45,
      "activityAlertBeforePeriodDescription": "",
      "activityJobPhaseDescription1stLine": "",
      "activityJobDescription1stLine": "",
      "activityCompletedDescription": "",
      "activityCreated": "Created by SYN_Keith White on 17/03/2016 at 4:22pm",
      "activityDetails1stLine": "",
      "activityHistorySummary": "03/05/17 9:24am - Document 'Std letter 1' deleted. ",
      "activityMailshotResponse": "",
      "activityModified": "Last modified by SYN_Jon on 03/05/2017 at 9:25am",
      "activityRegardingDescription": "",
      "activityRegardingDescription2": "",
      "activityRegardingWhat": "Campaign: Blah",
      "activitySecondaryOwnersDescription": [
        
      ],
      "activitySecondaryOwnersUserID": [
        
      ],
      "activityPriorityDescription": "High",
      "activityTimeDueDisplay": "12:00 AM",
      "activityCompanyName": "The Professional Services Company",
      "activityCompanyNumber": 1,
      "activityID": 6712,
      "activityJobNumber": "",
      "activityJobNumberSimple": "",
      "activityJobAndPhase": "",
      "activityJobAndPhaseSimple": "",
      "activityStageCode": "",
      "activityStageDescription": "",
      "activitySubject": "Blah",
      "activityDetails": "",
      "activityClientCode": "",
      "activityClientName": "",
      "activityClientPhone": "",
      "activityActivitytypeCode": "PUP",
      "activityActivitytype": "Public todo2",
      "activityActivitytypeCompanyNumber": 1,
      "activityActivitytypeCategory": 2,
      "activityTeamCode": "",
      "activityTeamDescription": "",
      "activityOwnerID": 4,
      "activityOwnerName": "SYN_Keith White",
      "activityCompletedBy": "",
      "activityCreatedBy": "SYN_Keith White",
      "activityLastModifiedBy": "SYN_Jon",
      "activityClientContactInternalRef": 0,
      "activityClientContactFullName": "",
      "activityStatus": "",
      "activityPriorityID": 1,
      "activityCategory": "blue",
      "activityAlertSentBefore": false,
      "activityAlertBeforePeriod": 0,
      "activityImmediateAlert": true,
      "activityAlertCompleted": false,
      "activityCompleted": false,
      "activityAlertSentInstant": true,
      "activityMarketingCampaignID": 474,
      "activityMarketingCampaignPromotionCode": "",
      "activityDateDue": "0000-00-00",
      "activityTimeDue": "00:00:00",
      "activityDueTimezone": "",
      "activityCompletedByUserID": 0,
      "activityCompletedDate": "0000-00-00",
      "activityCompletedTime": "00:00:00",
      "activityCompletedTimeZone": "",
      "activityTimezoneCompleted": "",
      "activityTimezoneCreated": "GMT",
      "activityTimezoneLastModified": "GMT",
      "activityCreatedByUserID": 4,
      "activityCreationDate": "2016-03-17",
      "activityCreationTime": "16:22:53",
      "activityCreationTimeZone": "UTCA",
      "activityLastModifiedByUserID": 3,
      "activityLastModifiedDate": "2017-05-03",
      "activityLastModifiedTime": "09:25:16",
      "activityLastModifiedTimeZone": "UTCA"
    }
    ]
}

Meta-data

Provides the API consumer with the attributes of Synergist's fields

 

Meta-data

If you require to see the related metadata for Synergist fields you should pass the parameter style=modelstructure when making the appropriate API call. You also need to specify which model you wish to use. This will specify for which fields attributes will be returned.

Data models

If you wish to return the field attributes you will typically call the API and specify the data model required. All the key tables will have two standard models available

<tablename>list model

<tablename>details model

Example - Activities

e.g using the activities.json API to return the field attributes for the required model

  • activitylist
  • activitydetails
Parameter Description Examples
Action Not required
<General> Parameters described in overview user=user&password=user&version=3.3
Company The company context company=1
Style Which kind of data is required style=modelstructure
Modelstructure Name of model required Modelstructure=activitylist / Modelstructure=activitydetails
Response Returned data A JSON string containing the data

Example request:
request for meta-data (structure of specified model)

http://<SERVER>/jsonapi/activities.json?company=1&version=3.3&user=user&password=user&style=modelstructure&modelstructure=activitylist

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 0,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "data": "activityDetails1stLine",
      "label": "Details",
      "align": "",
      "editable": false,
      "fieldtype": "text",
      "displayorder": 0,
      "mandatory": false
    }
    etc., etc.
    ]
}

Response attributes (meta-data):

Attribute Description
data Field name
label The suggested label for the field
align Suggested alignment for the field e.g. a financial field may be aligned right
editable Indicates whether field is editable
fieldtype Indicates type of field – text/number/time/date/boolean
displayorder Indicates the hierarchical position of a field in a list or form display

ENDPOINTS

 

Endpoints for manipulating key entities in the system

Activities API

 

Activity list

Returns one or more activity records

 

If you wish to access multiple activity records you would normally use the activitylist model

For more details about using models see Using data models

For activities two models are available:

  • activitylist
  • activitydetails

If a list of records is required a ‘view’ parameter should be passed. If no ‘view’ parameter is passed all records for the synergist company are returned.

Parameter Description Example More info
API The API area activities.json
Action Not required
<General> Parameters described in overview user=user&password=user v3.3 Overview
Modelstructure Name of model required Modelstructure=activitylist Using data models
View Stored filter applied view=-1700 Using views
Sort Change the view's default sort order sort=CLIENT Sorting
<Filters> Filter by a key field client=1/F667 Filters
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/activities.json?company=1&version=3.3&user=user&password=user&style=modeldata&modelstructure=activitylist&view=-1700&rows=2&page=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 217,
  "totalpages": 109,
  "responsemessage": "",
  "pagerows": 2,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "activityuuid": "34912CA9753A494F8EB70BF0CD385CB7",
      "activityTimeStampModified": 1516878190,
      "activityRecordVersionNumber": 139,
      "activityAttachmentCount": "2",
      "activityCreated": "Created by SYN_Jon on 09/05/2017 at 2:48pm",
      "activityDetails1stLine": "",
      "activityRegardingDescription": "",
      "activityRegardingDescription2": "",
      "activityRegardingWhat": "Campaign: test of new site",
      "activityCustomField300": "",
      "activityCustomField301": "",
      "activityCustomField302": "0000-00-00",
      "activityCustomField303": false,
      "activityCustomField306": 0,
      "activityCustomField307": 0,
      "activityPriorityDescription": "High",
      "activityOwnerID": 3,
      "activityOwnerName": "Mike",
      "activityClientCode": "",
      "activityClientName": "",
      "activityCompleted": false,
      "activityViewDate": "0000-00-00",
      "activityViewTime": "00:00:00",
      "activityViewTimezone": "",
      "activityJobNumber": "",
      "activityJobNumberSimple": "",
      "activityJobAndPhase": "",
      "activityJobAndPhaseSimple": "",
      "activitySubject": "test",
      "activityActivitytype": "Meeting",
      "activityID": 7476,
      "activityCreationDate": "2017-05-09"
    },
etc. etc.
}

Note: Custom fields are not returned prior to Synergist 12.2

Activity details

Returns a single activity record

 

If you wish to access a single activity record you would normally use the activitydetails model

For more details about using models see Using data models

For activities two models are available:

  • activitylist
  • activitydetails

To return a single record the ‘activityid’ parameter should be passed.

Parameter Description Example More info
API The API area activities.json
Action Not required
<General> Parameters described in overview user=user&password=user v3.3 Overview
Modelstructure Name of model required Modelstructure=activitydetails Using data models
Activityid ID of a specific activity record activityid=7957
Response Returned data A JSON string containing the data

Example request:
Request for data (a single record using specified model)

http://<SERVER>/jsonapi/activities.json?company=1&version=3.3&user=user&password=user&style=modeldata&modelstructure=activitydetails&Activityid=Activityid=7957

Example response (activitydetails model):

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "activityuuid": "E0C7A305F779704BBB58F9FC01E02DB5",
      "activityTimeStampModified": 1544456139,
      "activityRecordVersionNumber": 66,
      "activityAlertBeforePeriodDescription": "",
      "activityJobPhaseDescription1stLine": "",
      "activityJobDescription1stLine": "TEMPLATE 1",
      "activityCompletedDescription": "",
      "activityCreated": "Created by Matthew Tanner on 02/10/2018 at 1:43pm",
      "activityDetails1stLine": "Meeting at Boundry Mill",
      "activityHistorySummary": "03/10/18 12:07pm - Completed by Matthew Tanner",
      "activityMailshotResponse": "",
      "activityModified": "Last modified by Michael Irving on 07/12/2018 at 1:11pm",
      "activityRegardingDescription": "TEMPLATE 1",
      "activityRegardingDescription2": "",
      "activityRegardingWhat": "Job: 1/00008276",
      "activitySecondaryOwnersDescription": [
        
      ],
      "activitySecondaryOwnersUserID": [
        
      ],
      "activityCustomField300": "MyText",
      "activityCustomField301": "",
      "activityCustomField302": "0000-00-00",
      "activityCustomField303": false,
      "activityCustomField306": 0,
      "activityCustomField307": 0,
      "activityPriorityDescription": "Med",
      "activityTimeDueDisplay": "8:00 AM",
      "activityCompanyName": "The Professional Services Company",
      "activityCompanyNumber": 1,
      "activityID": 7957,
      "activityJobNumber": "1/00008276",
      "activityJobNumberSimple": "8276",
      "activityJobAndPhase": "",
      "activityJobAndPhaseSimple": "",
      "activityStageCode": "",
      "activityStageDescription": "",
      "activitySubject": "Some notes",
      "activityDetails": "Meeting at Boundry Mill",
      "activityClientCode": "1/ABC",
      "activityClientName": "ABC Soft Drinks Division South Ltd",
      "activityClientPhone": "0161 998 8786",
      "activityClientEmail": "test@test.com",
      "activityActivitytypeCode": "Notes",
      "activityActivitytype": "Meeting notes",
      "activityActivitytypeCompanyNumber": 1,
      "activityActivitytypeCategory": 5,
      "activityTeamCode": "",
      "activityTeamDescription": "",
      "activityOwnerID": 263,
      "activityOwnerName": "Matthew Tanner",
      "activityCompletedBy": "",
      "activityCreatedBy": "Matthew Tanner",
      "activityLastModifiedBy": "Michael Irving",
      "activityClientContactInternalRef": 938,
      "activityClientContactFullName": "Jim Green",
      "activityStatus": "Normal",
      "activityPriorityID": 2,
      "activityCategory": "Draft 1",
      "activityAlertSentBefore": false,
      "activityAlertBeforePeriod": 0,
      "activityImmediateAlert": true,
      "activityAlertCompleted": true,
      "activityCompleted": false,
      "activityAlertSentInstant": true,
      "activityMarketingCampaignID": 0,
      "activityMarketingCampaignPromotionCode": "",
      "activityDateDue": "2018-10-02",
      "activityTimeDue": "08:00:00",
      "activityDueTimezone": "UTCA",
      "activityCompletedByUserID": 0,
      "activityCompletedDate": "0000-00-00",
      "activityCompletedTime": "00:00:00",
      "activityCompletedTimeZone": "",
      "activityTimezoneCompleted": "",
      "activityTimezoneCreated": "GMT",
      "activityTimezoneLastModified": "GMT",
      "activityCreatedByUserID": 263,
      "activityCreationDate": "2018-10-02",
      "activityCreationTime": "13:43:08",
      "activityCreationTimezone": "UTCA",
      "activityLastModifiedByUserID": 268,
      "activityLastModifiedDate": "2018-12-07",
      "activityLastModifiedTime": "13:11:21",
      "activityLastModifiedTimeZone": "UTCA",
      "activityKanbanStatusCode": "TODO",
      "activityKanbanStatusDescription": "To do"
    }
  ]
}

Note: Custom fields are not returned prior to Synergist 12.2

Create

 

Activity create

Create a new activity.

Parameter Description Example More info
API The API area activities.json
Action The action to perform action=update
<General> Parameters described in overview user=user&password=user v3.3 Overview
input Activitytype code (mandatory),client code (mandatory), then name/value pairs "data": [<see example>]
Response Returned data See below

Example request:
Request to create an activity

http://<SERVER>/jsonapi/activities.json?company=1&user=user&password=user&version=3.3&action=create&input={
  "data": [
    {
      "activityActivitytypeCode": "Notes",
      "activityClientCode": "1/C4126",
      "activitySubject": "My Meeting notes",
      "activityDetails": "Meeting at Boundry Milll",
      "activityCompanyNumber": 1
    }
  ]
}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "activityuuid": "F718837693D3694F00D2A0F50FC67F1A",
      "activityID": 6743,
      "activityOwnerID": 54,
      "activityOwnerName": "User",
      "activityTimeStampModified": 1458753687,
      "activityRecordVersionNumber": 1
    }
  ]
}

Update

Update an activity record

 

Activity update

Parameter Description Example More info
API The API area activities.json
Action The action to perform action=update
<General> Parameters described in overview user=user&password=user v3.3 Overview
input Pass activity ID, then name/value pairs "data": [<see example>]
Response Returned data See below

Example request:

http://<SERVER>/jsonapi/activities.json?company=1&user=user&password=user&version=3.3&action=update&input={
  "data": [
    {
      "activityID": 6958,
      "activityDetails": "Meeting at Boundry Mill",
      "activityCustomField300": "MyText"
     }
  ]
}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "activityID": 6740,
      "activityuuid": "6372D5630F00DD43AB3C7DFDE1A114D4",
      "activityTimeStampModified": 1458754056,
      "activityRecordVersionNumber": 6
    }
  ]
}

Note:

To discover which fields are editable make a call to the "Activity details" endpoint and specify '&style=modelstructure' see Meta-data

Delete

 

Activity delete

Parameter Description Examples More info
API The API area activities.json
Action Defines the API action=delete
<General> Parameters described in overview user=user&password=user v3.3 Overview
Input Identifies the record(s) you wish to delete {"data": ...
<input mandatory> Activity ID "activityID":6958

Example request:

http://<SERVER>/jsonapi/activities.json?company=1&user=user&password=user&version=3.3&action=delete&input={"data":[{"activityID":6958}]}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "activityID": 6958,
      "activityuuid": "8F6FBBBF41EA6141AD99E2CA56171C31"
    }
  ]
}

Follow-ups

Generate a new activity - linked to a previously created activity, or list follow-ups already created

 

Create a followup activity

Parameter Description Examples More info
API The API area activities.json
Action Defines the API action=activityfollowup
<General> Parameters described in overview user=user&password=user v3.3 Overview
Activity ID Identifies the record you wish to follow up activityID=4833
Activitytype Specifies the activity type of the new followup activity activitytype=pup
Company Specify the company (data-set) company=1

Example request:

http://<SERVER>/jsonapi/activities.json?user=user&password=user&company=1&version=3.3&action=activityfollowup&activityID=4833&activitytype=pup

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Followup created.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "activityID": 7478,
      "activityuuid": "1DE77B353980544C8721F6B90FB28C00"
    }
  ]
}

Follow-ups - list

This will list all followups for a specific activity

Parameter Description/example
Action Action=followuplist
ActivityID Identifies the activity which has related followups

Example request:

http://<SERVER>/jsonapi/activities.json?company=1&version=3.3&user=user&password=user&action=followuplist&activity=4833

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 0,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "activityuuid": "FDA5D0AB2B89C74A875D6DACBCF7DECA",
      "activityTimeStampModified": 1494410269,
      "activityRecordVersionNumber": 0,
      "activityCreationDate": "2017-05-10",
      "activityCreationTime": "10:57:49",
      "activityCreationTimeZone": "UTCA",
      "activitySubject": "MyChangedSubject13",
      "activityID": 7477,
      "activityDetails1stLIne": "",
      "activityActivitytype": "Public todo2"
    },
    {
      "activityuuid": "A34E62DA38F9334C9B02C7CD0A16E133",
      "activityTimeStampModified": 1492788713,
      "activityRecordVersionNumber": 13,
      "activityCreationDate": "2016-08-09",
      "activityCreationTime": "15:07:29",
      "activityCreationTimeZone": "UTCA",
      "activitySubject": "MyChangedSubject13",
      "activityID": 6974,
      "activityDetails1stLIne": "",
      "activityActivitytype": "Public todo2"
    },
    {
      "activityuuid": "1C1C82FE74B57F4F93BFA9CEC8CDAD41",
      "activityTimeStampModified": 1475771089,
      "activityRecordVersionNumber": 928,
      "activityCreationDate": "2014-01-30",
      "activityCreationTime": "15:14:10",
      "activityCreationTimeZone": "UTCA",
      "activitySubject": "MyChangedSubject13",
      "activityID": 4833,
      "activityDetails1stLIne": "description7",
      "activityActivitytype": "Draft docs"
    }
  ]
}

History

Each activity can have related history records. These track changes made to the activity and are also used to add comments to an activity

 

Create a history item

Parameter Description Examples More info
API The API area activities.json
Action Defines the API call action=activityfollowup
<General> Parameters described in overview user=user&password=user v3.3 Overview
Activity ID Identifies the record you wish to create a comment/history record for activityID=4833
Description Specifies the text of the comment/history item description=hello

Example request:

http://<SERVER>/jsonapi/activities.json?&user=user&password=user&version=3.3&activityID=4833&action=comment&description=hello

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Comment created.",
  "warningmessage": "",
  "success": true
}

List history items

Example requests:

Parameter Description/example
Action Action=history
ActivityID Identifies the record you wish to create a comment/history record for
http://<SERVER>/jsonapi/activities.json?&user=user&password=user&version=3.3&action=history&activityID=4833

or

http://<SERVER>/jsonapi/activityhistory.json?&user=user&password=user&version=3.3&activityID=4833

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 44,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "activityhistoryUuid": "1EB57F5625EE344B84DAEEF92F93AD10",
      "activityhistoryTimeStampModified": 1494410784,
      "activityhistoryRecordVersionNumber": 0,
      "activityhistoryComment": "",
      "activityhistoryCreatedByUserID": 54,
      "activityhistoryDateCreated": "2017-05-10",
      "activityhistoryHistoryDetail": "hello3",
      "activityhistoryNotesHistoryCategory": 0,
      "activityhistoryTimeCreated": "11:06:24",
      "activityhistoryCreatedByFullNAme": "User",
      "activityhistoryCreatedDisplayDescription": "Created by User on 10/05/2017 at 11:06am"
    },
    {
      "activityhistoryUuid": "EDF3AB010E6A92468123C5A686B1B951",
      "activityhistoryTimeStampModified": 1475771092,
      "activityhistoryRecordVersionNumber": 0,
      "activityhistoryComment": "",
      "activityhistoryCreatedByUserID": 3,
      "activityhistoryDateCreated": "2016-10-06",
      "activityhistoryHistoryDetail": "Document 32424 deleted.",
      "activityhistoryNotesHistoryCategory": 14,
      "activityhistoryTimeCreated": "17:24:52",
      "activityhistoryCreatedByFullNAme": "SYN_Jon",
      "activityhistoryCreatedDisplayDescription": "Created by SYN_Jon on 06/10/2016 at 5:24pm"
    },
  ]
}

Activity history

The ActHistory call retrieves a list of activity history records for a single activity record.

 

ActHistory

The ActHistory call retrieves a list of activity history records for a single activity record.

Deprecated. See 'History'

Parameter Description Examples More info
API The API area activities.json
<General> Parameters described in overview user=user&password=user Overview
<input mandatory>company Company ID &company=1
<input optional>NotesID: Note ID &NotesID=3818
<input optional>rows: No. of Records &rows=10
<input optional>page: No. of Pages &page=1

Example request:
Request to list activity history

http://<SERVER>/jsonapi/acthistory.json?user=user&password=user&version=3.3&company=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 3,
  "totalpages": 3,
  "responsemessage": "",
  "pagerows": 1,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "activityhistoryUuid": "6C551A5B77DE4635AB9E0D22DD0C8807",
      "activityhistoryTimeStampModified": 1385820826,
      "activityhistoryRecordVersionNumber": 0,
      "activityhistoryNotesID": 3818,
      "activityhistoryNotesHistoryID": 2284,
      "activityhistoryDateCreated": "2012-04-19",
      "activityhistoryTimeCreated": "16:05:00",
      "activityhistoryComment": ""
    }
  ]
}

Note: Feature from API 2.2

Activity type lookup

Activity type is mandatory when creating an activity. This API provides a lookup list of valid activity types

 

Activity type lookup

Parameter Description Examples More info
API The API area activities.json
Action Defines the API call action=activitytypes
<General> Parameters described in overview user=user&password=user v3.3 Overview
Job (optional) Specify the job for this activity job=1/00088972
Jobphase (optional) Specify the job phase for this activity jobphase=1/00088972.001
Activitytype (optional) Specify the current activity type activitytype=MEET
Company Specify the company (data-set) company=1

Example request:

http://<SERVER>/jsonapi/activities.json?user=user&password=user&company=1&action=activitytypes&version=3.3

Requisions
if you are supporting requisition type activities you need to pass the job/jobphase parameter

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 19,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "activitytypeNoteCategory": 2,
      "activitytypeCode": "COMM",
      "activitytypeCompany": 1,
      "activitytypeDescription": "Communication",
      "activitytypeDisplayOrder": "",
      "activitytypeActive": true,
      "activitytypeImmediateAlertOnByDefault": true,
      "activitytypeCompletionAlertByDefault": true,
      "variable_selected": false
    },
    {
      "activitytypeNoteCategory": 5,
      "activitytypeCode": "MEET",
      "activitytypeCompany": 1,
      "activitytypeDescription": "Meeting notes",
      "activitytypeDisplayOrder": "",
      "activitytypeActive": true,
      "activitytypeImmediateAlertOnByDefault": false,
      "activitytypeCompletionAlertByDefault": false,
      "variable_selected": true
    },
    {
      "activitytypeNoteCategory": 2,
      "activitytypeCode": "MER",
      "activitytypeCompany": 1,
      "activitytypeDescription": "Merge",
      "activitytypeDisplayOrder": "",
      "activitytypeActive": true,
      "activitytypeImmediateAlertOnByDefault": false,
      "activitytypeCompletionAlertByDefault": false,
      "variable_selected": false
    },
    {
      "activitytypeNoteCategory": 2,
      "activitytypeCode": "QUOT",
      "activitytypeCompany": 1,
      "activitytypeDescription": "Quotation",
      "activitytypeDisplayOrder": "",
      "activitytypeActive": true,
      "activitytypeImmediateAlertOnByDefault": true,
      "activitytypeCompletionAlertByDefault": true,
      "variable_selected": false
    },
    {
      "activitytypeNoteCategory": 2,
      "activitytypeCode": "TODO",
      "activitytypeCompany": 1,
      "activitytypeDescription": "Task",
      "activitytypeDisplayOrder": "",
      "activitytypeActive": true,
      "activitytypeImmediateAlertOnByDefault": true,
      "activitytypeCompletionAlertByDefault": true,
      "variable_selected": false
    }
  ]
}

Client list

Selecting a client for an activity record. This action can take place prior to creating an activity. It would normal be used if creating an activity on a client, where the activity is not related to a job.

 

Client list

List clients in order to select a client when creating a new activity record.

Parameter Description Examples More info
API The API area activities.json
Action Defines the API call action=clientslist If not specified records for the API area are returned, or its structure
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
Company The company context company=1 Synergist company (data-set)
Style Which kind of data is required style=modelstructure / style=modeldata Request either meta-data (structure) or actual data
Modelstructure Name of model required Modelstructure=clientslist/ Modelstructure=clientdetails Defines the fields returned. There are two available models Using data models
View ID for a pre-existing query (called a “view”) view=SELECTVIEW44486 Use the “viewlist” call to obtain these values (see below) Using views
Page Data page to return page=1 Page numbering starts at 0
Rows Number of records/rows to return. rows=2 0 = return all rows
Response Returned data See below A JSON string containing the data available for this area, for the specified company/user

Example request:

http://<SERVER>/jsonapi/activities.json?style=modeldata&modelstructure=clientslist&action=clientslist&company=1&view=SELECTVIEW44486&version=3.3&user=user&password=user

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 480,
  "totalpages": 48,
  "responsemessage": "",
  "pagerows": 10,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "clientUuid": "C28D517EC2F14921B347C4E1744E0CBC",
      "clientTimeStampModified": 1496750532,
      "clientRecordVersionNumber": 730,
      "clientCode": "1/GRA",
      "clientName": "Granada",
      "clientCategoryName": "Client",
      "clientPhone": "0171 698 9800",
      "clientCategory": 3,
      "clientHandlerUserID": 239,
      "clientWebURL": "www.onedayx.com",
      "clientEmail": "granada@granadax.com",
      "clientInactive": false,
      "clientType": "Arts 1",
      "clientOpStatus": "Bronze",
      "clientMarketSector": "Arts, Sport, Entertainment1",
      "clientOnHold": true,
      "clientHandlerFullName": "Aaron Cronshaw"
    },
    {
      "clientUuid": "ADA9CBAD7BA43447A94DF6E39A5D03AA",
      "clientTimeStampModified": 1496750447,
      "clientRecordVersionNumber": 99,
      "clientCode": "1/C4036",
      "clientName": "999 Inc",
      "clientCategoryName": "Client",
      "clientPhone": "",
      "clientCategory": 3,
      "clientHandlerUserID": 239,
      "clientWebURL": "",
      "clientEmail": "",
      "clientInactive": false,
      "clientType": "B2B2",
      "clientOpStatus": "",
      "clientMarketSector": "Tourism",
      "clientOnHold": false,
      "clientHandlerFullName": "Aaron Cronshaw"
    },
    etc., etc.,
    }

Client contact lookup

An activity record can have an optional client contact. This API lists valid client contacts.

 

Client contacts lookup

Parameter Description Examples More info
API The API area activities.json
Action Defines the API call action=clientcontacts
<General> Parameters described in overview user=user&password=user v3.3 Overview
Client Specify the client code client=1/ada0001
Company Specify the company (data-set) company=1

Example request:

http://<SERVER>/jsonapi/activities.json?user=user&password=user&company=1&action=clientcontacts&client=1/ada0001&version=3.3

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 2,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "clientcontactInternalRef": 6841,
      "clientcontactFullName": "James Smith-",
      "variable_selected": true
    },
    {
      "clientcontactInternalRef": 6821,
      "clientcontactFullName": "Harry Hill",
      "variable_selected": false
    }
  ]
}

Owner lookup

An activity can have an 'Owner'. An owner is essentially a user. This lookup lists all possible owners

 

Owner lookup

Parameter Description Examples More info
API The API area activities.json
Action Defines the API call action=owners
<General> Parameters described in overview user=user&password=user v3.3 Overview
Company Specify the company (data-set) company=1

Example request:

http://<SERVER>/jsonapi/activities.json?user=user&password=user&company=1&action=owners&version=3.3

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 172,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "userFullName": "Jim Smith",
      "userUserId": 344,
      "variable_selected": false
    },
    {
      "userFullName": "Aaron Cronshaw",
      "userUserId": 239,
      "variable_selected": false
    },

Secondary owners

An activity can have one or more secondary owners (called 'others' in the web ui). These endpoints are for listing all the possible owners - and showing the selected ones, and also an API for updating the activity with selected secondary owners

 

Secondary Owner lookup (also called 'others')

Parameter Description Examples More info
API The API area activities.json
Action Defines the API call action=secondaryowners
<General> Parameters described in overview user=user&password=user v3.3 Overview 2)
User ID(s) Selected secondary owners userid=[242,192]
Company Specify the company (data-set) company=1

Example request:

http://<SERVER>/jsonapi/activities.json?user=user&password=user&company=1&action=secondaryowners&userid=[242,192]&version=3.3

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 172,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "userFullName": "Jim Smith",
      "userUserId": 344,
      "variable_selected": false
    },
    {
      "userFullName": "Aaron Cronshaw",
      "userUserId": 242,
      "variable_selected": true
    },

Secondary Owner update

Example request:

Parameter Description Examples
Action Defines the the API call action=update
Input JSON array {"data": [{"activityID":7476,"activitySecondaryOwnersUserID":[242,192] }]}.
<General> Parameters described in overview
http://<SERVER>/jsonapi/notes.json?&user=user&password=user&version=3.3&action=update&input={"data": [{"activityID":7476,"activitySecondaryOwnersUserID":[242,192] }]}.

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "activityID": 7476,
      "activityuuid": "34912CA9753A494F8EB70BF0CD385CB7",
      "activitySecondaryOwnersDescription": "Adele Graham, Alan Greenwoodx",
      "activitySecondaryOwnersUserID": [
        242,
        192
      ],
      "activityTimeStampModified": 1497456978,
      "activityRecordVersionNumber": 112
    }
  ]
}

Priority lookup

An activity can be given a priority value. This API provides a list of valid priority values

 

Priority lookup

Parameter Description Examples More info
API The API area activities.json
Action Defines the API call action=priorities
<General> Parameters described in overview user=user&password=user v3.3 Overview
Company Specify the company company=1

Example request:

http://<SERVER>/jsonapi/activities.json?user=user&password=user&company=1&action=priorities&input=2&version=3.3

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 3,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "lookupActivityPriorityDescription": "High",
      "lookupActivityPriorityID": 1,
      "variable_selected": false
    },
    {
      "lookupActivityPriorityDescription": "Med",
      "lookupActivityPriorityID": 2,
      "variable_selected": true
    },
    {
      "lookupActivityPriorityDescription": "Low",
      "lookupActivityPriorityID": 3,
      "variable_selected": false
    }
  ]
}

Status lookup

An activity can have a 'Status'. This API provides a list of valid statuses

 

Status lookup

Parameter Description Examples More info
API The API area activities.json
Action Defines the API call action=status
<General> Parameters described in overview user=user&password=user v3.3 Overview
Company Specify the company company=1
Activity ID Acrivity ID activityID=4833

Example request:

http://<SERVER>/jsonapi/activities.json?user=user&password=user&company=1&action=status&status=&activityID=4833&version=3.3

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "lookupActivityStatus": "Status 1",
      "variable_selected": false
      },
     {
      "lookupActivityStatus": "Status 2",
      "variable_selected": false
     }
  ]
}

Team lookup

An activity can have a 'team' allocated to it. This API provides a list of valid teams

 

Team lookup

Parameter Description Examples More info
API The API area activities.json
Action Defines the API call action=teams
<General> Parameters described in overview user=user&password=user v3.3 Overview
Company Specify the company company=1

Example request:

http://<SERVER>/jsonapi/activities.json?user=user&password=user&company=1&action=teams&version=3.3

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 12,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "teamCode": "1/ACC",
      "teamDescription": "Accounts",
      "variable_selected": false
    },
    {
      "teamCode": "1/ADMI",
      "teamDescription": "Administration",
      "variable_selected": false
    },

Time due lookup

An activity can have a 'Time due'. This API provides a list of valid time values

 

Time due lookup

Parameter Description Examples More info
API The API area activities.json
Action Defines the API call action=times
<General> Parameters described in overview user=user&password=user v3.3 Overview

Example request:

http://<SERVER>/jsonapi/activities.json?user=user&password=user&action=times&version=3.3

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 49,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "lookupTime": "00:00:00",
      "lookupTimeDisplay": "12:00 AM",
      "variable_selected": true
    },
    {
      "lookupTime": "00:30:00",
      "lookupTimeDisplay": "12:30 AM",
      "variable_selected": false
    },
    {
      "lookupTime": "01:00:00",
      "lookupTimeDisplay": "1:00 AM",
      "variable_selected": false
    },
    {
      "lookupTime": "01:30:00",
      "lookupTimeDisplay": "1:30 AM",
      "variable_selected": false
    },
    {  etc., etc

Category lookup

An activity can have a 'Category' allocated to it. This API provides a list of valid categories. Note that the list of categories can be dependent on the activity type

 

Category lookup

Parameter Description Examples More info
API The API area activities.json
Action Defines the API call action=categories
<General> Parameters described in overview user=user&password=user v3.3 Overview
Activity type Specify the activity type activitytype=MAIL
Company Specify the company company=1

Example request:

http://<SERVER>/jsonapi/activities.json?user=user&password=user&company=1&action=categories&activitytype=MAIL&version=3.3

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 49,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "lookupTime": "00:00:00",
      "lookupTimeDisplay": "12:00 AM",
      "variable_selected": true
    },
    {
      "lookupTime": "00:30:00",
      "lookupTimeDisplay": "12:30 AM",
      "variable_selected": false
    },
    {
      "lookupTime": "01:00:00",
      "lookupTimeDisplay": "1:00 AM",
      "variable_selected": false
    },
    {
      "lookupTime": "01:30:00",
      "lookupTimeDisplay": "1:30 AM",
      "variable_selected": false
    },
    {  etc., etc

History

Each activity can have related history records. These track changes made to the activity and are also used to add comments to an activity

 

Create a history item

Parameter Description/example More info
API The API area activities.json
Action Action=activityfollowup
<General> Parameters described in overview user=user&password=user v3.3 Overview
ActivityID Identifies the record you wish to create a comment/history record for
Description Specifies the text of the comment/history item

Example request:

http://<SERVER>/jsonapi/activities.json?&user=user&password=user&version=3.3&activityID=4833&action=comment&description="hello"

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Comment created.",
  "warningmessage": "",
  "success": true
}

List history items

Example requests:

Parameter Description/example
Action Action=history
ActivityID Identifies the record you wish to create a comment/history record for
http://<SERVER>/jsonapi/activities.json?&user=user&password=user&version=3.3&action=history&activityID=4833

or

http://<SERVER>/jsonapi/activityhistory.json?&user=user&password=user&version=3.3&activityID=4833

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 44,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "activityhistoryUuid": "1EB57F5625EE344B84DAEEF92F93AD10",
      "activityhistoryTimeStampModified": 1494410784,
      "activityhistoryRecordVersionNumber": 0,
      "activityhistoryComment": "",
      "activityhistoryCreatedByUserID": 54,
      "activityhistoryDateCreated": "2017-05-10",
      "activityhistoryHistoryDetail": "hello3",
      "activityhistoryNotesHistoryCategory": 0,
      "activityhistoryTimeCreated": "11:06:24",
      "activityhistoryCreatedByFullNAme": "User",
      "activityhistoryCreatedDisplayDescription": "Created by User on 10/05/2017 at 11:06am"
    },
    {
      "activityhistoryUuid": "EDF3AB010E6A92468123C5A686B1B951",
      "activityhistoryTimeStampModified": 1475771092,
      "activityhistoryRecordVersionNumber": 0,
      "activityhistoryComment": "",
      "activityhistoryCreatedByUserID": 3,
      "activityhistoryDateCreated": "2016-10-06",
      "activityhistoryHistoryDetail": "Document 32424 deleted.",
      "activityhistoryNotesHistoryCategory": 14,
      "activityhistoryTimeCreated": "17:24:52",
      "activityhistoryCreatedByFullNAme": "SYN_Jon",
      "activityhistoryCreatedDisplayDescription": "Created by SYN_Jon on 06/10/2016 at 5:24pm"
    },
  ]
}

Attachments API

 

Attachments list

Returns one or more attachment records

 

If you wish to access multiple attachments records you would normally use the attachmentslist model.

For more details about using models see Using data models

For activities two models are available:

  • attachmentslist
  • attachmentdetails
Parameter Description Example More info
API The API area attachments.json
Action Not required
<General> Parameters described in overview user=user&password=user v3.3 Overview
Modelstructure Name of model required Modelstructure=attachmentsList Using data models
View Stored filter applied view=-1700 Using views
<Filters> Filter by a key field client=1/F667 Filters
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/attachments.json?company=1&version=3.3&user=user&password=user&style=modeldata&modelstructure=attachmentsList&rows=2&page=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 2,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "attachmentUuid": "A25519AD6B32BA4A8AD0FC7F5B647E75",
      "attachmentTimestampModified": 1501072436,
      "attachmentRecordVersionNumber": 0,
      "attachmentCreatedDisplay": "Created by Mike Smith Dev on 26/07/2017 at 1:33pm",
      "attachmentS3UrlGet": "",
      "attachmentS3UrlPut": "",
      "attachmentClientName": "Smith & Co",
      "attachmentActivityID": 6957,
      "attachmentID": 5463,
      "attachmentDocumentName": "temp_5463.csv",
      "attachmentJobAndPhase": "",
      "attachmentDescription": "temp.csv",
      "attachmentExtension": "CSV",
      "attachmentContainer": "My Meeting notesa",
      "attachmentCreationDate": "2017-07-26",
      "attachmentCreationTime": "13:33:56",
      "attachmentCreatedByUserID": 5,
      "attachmentCreatedByFullName": "Mike Smith",
      "attachmentMode": "Browse"
    },
    {
      "attachmentUuid": "5337C90967F1D94C83607D2724F7FB82",
      "attachmentTimestampModified": 1501073898,
      "attachmentRecordVersionNumber": 0,
      "attachmentCreatedDisplay": "Created by Jon Brown on 26/07/2017 at 1:58pm",
      "attachmentS3UrlGet": "",
      "attachmentS3UrlPut": "",
      "attachmentClientName": "Smith & Co",
      "attachmentActivityID": 6957,
      "attachmentID": 5466,
      "attachmentDocumentName": "special_5466.pdf",
      "attachmentJobAndPhase": "",
      "attachmentDescription": "Special.pdf",
      "attachmentExtension": "PDF",
      "attachmentContainer": "My Meeting notesa",
      "attachmentCreationDate": "2017-07-26",
      "attachmentCreationTime": "13:58:18",
      "attachmentCreatedByUserID": 3,
      "attachmentCreatedByFullName": "Jon Brown",
      "attachmentMode": "API"
    }
  ]
}

Attachment details

Returns a single attachment records

 

If you wish to access a single attachment record you would normally use the attachmentdetails model

For more details about using models see Using data models

For attachments two models are available:

  • attachmentslist
  • attachmentdetails

To return a single record the ‘attachmentid’ parameter should be passed.

Parameter Description Example More info
API The API area attachments.json
Action Not required
<General> Parameters described in overview user=user&password=user Overview
Modelstructure Name of model required Modelstructure=attachmentDetails Using data models
Attachmentid ID of a specific attachment record attachmentid=5463
Response Returned data A JSON string containing the data

Example request:
Request for data (a single record using specified model)

http://<SERVER>/jsonapi/attachments.json?company=1&version=3.3&user=user&password=user&style=modeldata&modelstructure=attachmentsList&attachmentid=5463

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 2,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "attachmentUuid": "A25519AD6B32BA4A8AD0FC7F5B647E75",
      "attachmentTimestampModified": 1501072436,
      "attachmentRecordVersionNumber": 0,
      "attachmentCreatedDisplay": "Created by Mike Smith Dev on 26/07/2017 at 1:33pm",
      "attachmentS3UrlGet": "",
      "attachmentS3UrlPut": "",
      "attachmentClientName": "Smith & Co",
      "attachmentActivityID": 6957,
      "attachmentID": 5463,
      "attachmentDocumentName": "temp_5463.csv",
      "attachmentJobAndPhase": "",
      "attachmentDescription": "temp.csv",
      "attachmentExtension": "CSV",
      "attachmentContainer": "My Meeting notesa",
      "attachmentCreationDate": "2017-07-26",
      "attachmentCreationTime": "13:33:56",
      "attachmentCreatedByUserID": 5,
      "attachmentCreatedByFullName": "Mike Smith",
      "attachmentMode": "Browse"
    },
    {
      "attachmentUuid": "5337C90967F1D94C83607D2724F7FB82",
      "attachmentTimestampModified": 1501073898,
      "attachmentRecordVersionNumber": 0,
      "attachmentCreatedDisplay": "Created by Jon Brown on 26/07/2017 at 1:58pm",
      "attachmentS3UrlGet": "",
      "attachmentS3UrlPut": "",
      "attachmentClientName": "Smith & Co",
      "attachmentActivityID": 6957,
      "attachmentID": 5466,
      "attachmentDocumentName": "special_5466.pdf",
      "attachmentJobAndPhase": "",
      "attachmentDescription": "Special.pdf",
      "attachmentExtension": "PDF",
      "attachmentContainer": "My Meeting notesa",
      "attachmentCreationDate": "2017-07-26",
      "attachmentCreationTime": "13:58:18",
      "attachmentCreatedByUserID": 3,
      "attachmentCreatedByFullName": "Jon Brown",
      "attachmentMode": "API"
    }
  ]
}

Create

Create a new attachment

 

Attachment create

Create a new attachment.

Parameter Description Examples More info
API The API area attachments.json
Action Defines the API action=create
<General> Parameters described in overview user=user&password=user Overview
Input JSON string input="data": ...
<input mandatory> attachmentActivityID "attachmentActivityID":"7160"
<input mandatory> attachmentOriginalFilename "attachmentOriginalFilename":"My attachment.csv"
<input optional> required for non-S3 systems "attachmentBase64": "SEVSRSBJUyBTT01FIFRFWFQNCg=="
<input optional> attachmentDescription "attachmentDescription":"My special attachment"
Response Returned data See below

Request to create an attachment

Example request:

http://<SERVER>/jsonapi/attachments.json?&user=user&password=user&version=3.3&action=create&input={"data":[{"variable_AttachmentBase64":"SEVSRSBJUyBTT01FIFRFWFQNCg==","attachmentOriginalFilename":"test.txt","attachmentDescription":"test file","attachmentActivityID":"7730"}]}

Note: Before calling this endpoint you should first ascertain if the Synergist system being accessed is using Amazon S3 to attachment storage. This can be determined by using the System API. If S3 is being used it is not necessary to pass the Base64 string. In this case the response will include the data required to perform a PUT using Amazon's API

Example response:

NON-S3

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "attachmentUuid": "B573282505218741A3E10C94CA2F6B9E",
      "attachmentID": 5505,
      "attachmentTimestampModified": 1503484169,
      "attachmentRecordVersionNumber": 0
    }
  ]
}


AMAZON S3
{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "attachmentUuid": "A1715162407B834FA365854793986224",
      "attachmentID": 5554,
      "attachmentS3UrlGet": "https://syn-test.s3-eu-west-1.amazonaws.com/Jon_5554.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ7FWVT3VTEABFH7Q%2F20170908%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20170908T152018Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=a5482b5ec30f1e0396d617157aa94783e5a9ad84f22f9b35a0b80090a03e5377",
      "attachmentS3UrlPut": "https://syn-test.s3-eu-west-1.amazonaws.com/Jon_5554.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ7FWVT3VTEABFH7Q%2F20170908%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20170908T152018Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=09b766bb39b81feca02d7a653a58b56dd0c0d0ee1474881efedd99eadbb927c8",
      "attachmentTimestampModified": 1504884018,
      "attachmentRecordVersionNumber": 0
    }
  ]
}

Update

Rename a document

 

Attachment Update

Parameter Description Example More info
API The API area attachments.json
Action The action to perform action=update
<General> Parameters described in overview user=user&password=user v3.3 Overview
input Attachment ID (mandatory), then name/value pairs "data": [<see example>]
Response Returned data See below

Example request:

http://<SERVER>/jsonapi/attachments.json?&user=user&password=user&version=3.3&action=update&input={
  "data": [
    {
      "attachmentID": 5464,
      "attachmentDescription": "my doc name.pdf"
    }
  ]
}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "attachmentID": 5464,
      "attachmentUuid": "9B7100C5B37B4F49B6B04F30833BAFC2",
      "attachmentTimestampModified": 1501073421,
      "attachmentRecordVersionNumber": 1
    }
  ]
}

Note:

To discover which fields are editable make a call to the "Attachment details" endpoint and specify '&style=modelstructure' see Meta-data

Delete

Delete a document

 

Attachment delete

Parameter Description Examples More info
API The API area attachments.json
Action Defines the API action=delete
<General> Parameters described in overview user=user&password=user v3.3 Overview
Input Identifies the record(s) you wish to delete {"data":...
<input mandatory> attachmentID "attachmentID":5464

Example request:
Delete

http://<SERVER>/jsonapi/attachments.json?&user=user&password=user&version=3.3&action=delete&input={"data":[{"attachmentID":5464}]}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "attachmentID": 5464,
      "attachmentUuid": "9B7100C5B37B4F49B6B04F30833BAFC2"
    }
  ]
}

Download - Base64

Download a document - via JSON base64 string

 

Attachment View

Parameter Description Examples More info
API The API area attachments.json
Action action=attachmentview
<General> Parameters described in overview user=user&password=user v3.3 Overview
Attachment attachment=5471

For retrieving the base64 of the attachment
Note: If the attachment is stored in S3 (cloud) it has to download from AWS to the 4D Server and convert into base64

Example request:

http://<SERVER>/jsonapi/attachments.json?&user=user&password=user&version=3.3&company=1&attachment=5471&action=attachmentview

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "attachmentUuid": "E4A7C32FC8A5D849BED41CDA8256DBF2",
      "attachmentTimestampModified": 1501773244,
      "attachmentRecordVersionNumber": 1,
      "attachmentOriginalFilename": "tmp.csv",
      "attachmentBase64": "SEVSRSBJUyBTT01FIFRFWFQNCg==",
      "attachmentContentDisposition": "attachment; filename=\"tmp.csv\"",
      "attachmentContentType": "application/csv"
    }
  ]
}

Calendar API

 

Users list

Get a list of calendar users

 

Users

Get a list of users.

Parameter Description Examples More info
Action Get a list of users action=users
<General> Parameters described in overview Overview
Company Company number company=8

Example request:
Request the list of users

http://<SERVER>/jsonapi/calendar.json?user=user&password=user&version=3.3&action=users&company=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 60,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "userUuid": "80007A6A673B434A8B455A30A31909CC",
      "userTimestampModified": 1499858513,
      "userRecordVersionNumber": 201,
      "userFullName": "Alan Greenwood",
      "userUserId": 67,
      "calUserFullNameTZ": "Alan Greenwood",
      "calUserNonWorkingDaysWeek": "YNNNNNY",
      "calUserAvatarUrl": "/web/images/avatar-blank-192.png",
      "calUserTeamName": ""
    },
    {
      "userUuid": "85E7C3A1EA0211E2897100155D003435",
      "userTimestampModified": 1499858514,
      "userRecordVersionNumber": 183,
      "userFullName": "Barabara Nimble",
      "userUserId": 96,
      "calUserFullNameTZ": "Barabara Nimble",
      "calUserNonWorkingDaysWeek": "YNNNNNY",
      "calUserAvatarUrl": "/web/images/avatar-blank-192.png",
      "calUserTeamName": ""
    },
    {
      ETC ETC
    }
  ]
}

Estimates list

Get a list of items that can be used to drop estimates on to the calendar - to create new bookings

 

Users

Get a list of estimates.

Parameter Description Examples More info
Action Get a list of estimates action=unallocated
<General> Parameters described in overview Overview
Company Company number company=8
Persistent back end search persistBackendSearch=N
Sort What to sort by sort=calJobPhaseSelect
<Filters> Filter by a key field client=1/F667 Key field filters
Direction 1=ascending, -1=descending direction=1

Example request:
Request the list of estimates

http://<SERVER>/jsonapi/calendar.json?user=user&password=user&version=3.3&action=unallocated&company=3&persistBackendSearch=N&sort=&direction=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 9,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "calBookedSelect": 2.5,
      "calChargeCodeSelect": "1/ALT",
      "calChargeDescSelect": "Amends New",
      "calClientSelect": "SnakeByte Software",
      "calDescriptionSelect": "No date dependencies test/Design 2t",
      "calDraftSelect": 0,
      "calDueDateDescSelect": "",
      "calEstimatedSelect": 1,
      "calHandlerSelect": "RS1",
      "calHandlerNameSelect": "Rob Smith",
      "calHiddenSelect": "S",
      "calInitialsSelect": "F0,FC",
      "calJobPhaseSelect": "1/00010481.H01",
      "calPrioritySelect": "",
      "calRemainingSelect": -1.5,
      "calRequestedSelect": "F0",
      "calRequisitionSelect": "!",
      "calStatusSelect": "Live",
      "calTaskDescSelect": "",
      "calTeamNameSelect": "1- Studio",
      "calTimesheetsSelect": 0,
      "calTimeSummarySelect": 1005543,
      "calUniqueSelect": "1/00010481.H01###1/ALT",
      "calStageSelect": "",
			"calStageDescriptionSelect": ""
    },
    {
      etc etc
    }
  ]
}

Requisitions list

Get a list of items that can be used to drop requisitions on to the calendar - to create new requisition bookings

 

Users

Get a list of requisitions.

Parameter Description Examples More info
Action Get a list of requisitions action=requisitions
<General> Parameters described in overview Overview
Company Company number company=8
Persistent back end search persistBackendSearch=N
Sort What to sort by sort=calJobPhaseSelect
Direction 1=ascending, -1=descending direction=1

Example request:
Request the list of requisitions

http://<SERVER>/jsonapi/calendar.json?user=user&password=user&version=3.3&action=requisitions&company=3&persistBackendSearch=N&sort=&direction=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 22,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
      {
        "calActionedReqSelect": true,
        "calActivityIdReqSelect": 7592,
        "calBookedReqSelect": 75,
        "calChargeCodeReqSelect": "1/ah",
        "calChargeDescReqSelect": "Account handlers",
        "calClientCodeReqSelect": "1/AUTO01",
        "calClientNameReqSelect": "Autoseen",
        "calCreatedReqSelect": "2017-08-08",
        "calDueDateReqSelect": "2017-08-08",
        "calDetailsReqSelect": "can this get done this afternoon please.",
        "calJobDescReqSelect": "New 3-fold A4 brochure yyyy",
        "calJobPhaseReqSelect": "1/00008824.001",
        "calPhaseDescReqSelect": "Test JC",
        "calOwnerNameReqSelect": "Josephine Grantx",
        "calOwnerIdReqSelect": 152,
        "calHoursReqSelect": 2,
        "calResourceIdReqSelect": "1/AAC",
        "calResourceNameReqSelect": "Aaron Cronshaw",
        "calSubjectReqSelect": "amends",
        "calUuidReqSelect": "5238214A6996894FAED448F3A51F251C",
        "calStageCodeReqSelect": "",
        "calStageDescReqSelect": ""
      },
      { etc etc }
    ]
}

Calendar display

Get all calendar bookings for a date range

 

Calendar display

Get all calendar bookings for a date range

Parameter Description Examples More info
Action Get calendar bookings action=calendardisplay
<General> Parameters described in overview Overview
Company Company number company=1
Datefrom Start date, in YYYY-MM-DD format datefrom=2017-07-10
Dateto End date, in YYYY-MM-DD format dateto=2017-07-31

Example request:
Request to display calendar

http://<SERVER>/jsonapi/calendar.json?user=user&password=user&version=3.3&datefrom=2017-10-1&dateto=2017-11-12&version=3.3&company=1&action=calendardisplay

Example response:

{

  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 3,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "calAllDay": false,
      "calChargeCodeDescription": "33@44",
      "calClientCode": "1/C4036",
      "calClientName": "999 license",
      "calColourHex": "FFFFFF",
      "calDescription": "",
      "calDurationDescription": "1.75 hours",
      "calFeedback": "TODO",
      "calHoursPerDay": 1.75,
      "calDiaryInternal": 200822,
      "calIsoDateTimeEnd": "2019-01-08T10:45:00",
      "calIsoDateTimeStart": "2019-01-08T09:00:00",
      "calJobDescription1stLine": "Estimating",
      "calJobHandlerName": "Aaron Cronshaw",
      "calJobAndPhase": "1/00003091.001",
      "calJobPhaseNumberSimple": "3091.001",
      "calJobProjectName": "",
      "calJobNumberSimple": "3091",
      "calNotes": "",
      "calRequisitionDetails": "",
      "calRequisitionId": 0,
      "calRequisitionSubject": "",
      "calNumberOfDays": 1,
      "calPhaseDescription1stLine": "Estimating",
      "calPhaseProjectName": "",
      "calRequestStatus": "",
      "calResourceId": "3",
      "calResourceName": "SYN_Jon",
      "calStatus": "",
      "calTaskDescription": "",
      "calTimeSummaryInternal": 1012731,
      "calWeakLink": 6744,
      "calStageCode": "",
      "calStageDesc": ""
    },


  

Calendar display compact

Get all calendar bookings for a date range - reduced field set

 

Calendar display

Get all calendar bookings for a date range

Parameter Description Examples More info
Action Get calendar bookings action=calendardisplaycompact
<General> Parameters described in overview Overview
Company Company number company=1
Datefrom Start date, in YYYY-MM-DD format datefrom=2017-07-10
Dateto End date, in YYYY-MM-DD format dateto=2017-07-31

Example request:
Request to display calendar

http://<SERVER>/jsonapi/diary.json?user=syn_jon&password=st0p&action=calendardisplaycompact&datefrom=2019-01-01&dateto=2019-07-31&version=3.3&company=1

Example response:

{

      "responsecode": 1,
      "responsestatus": "OK",
      "errorcode": 0,
      "errormessage": "",
      "totalrows": 3,
      "totalpages": 1,
      "responsemessage": "",
      "pagerows": 0,
      "pagenumber": 1,
      "success": true,
      "data": [
        {
          "calAllDay": false,
          "calChargeCodeDescription": "33@44",
          "calClientCode": "1/C4036",
          "calClientName": "999 license",
          "calColourHex": "FFFFFF",
          "calDurationDescription": "1.75 hours",
          "calFeedback": "TODO",
          "calHoursPerDay": 1.75,
          "calDiaryInternal": 200822,
          "calIsoDateTimeEnd": "2019-01-08T10:45:00",
          "calIsoDateTimeStart": "2019-01-08T09:00:00",
          "calJobDescription1stLine": "Estimating",
          "calJobAndPhase": "1/00003091.001",
          "calJobPhaseNumberSimple": "3091.001",
          "calRequisitionSubject": "",
          "calNumberOfDays": 1,
          "calPhaseDescription1stLine": "Estimating",
          "calRequestStatus": "",
          "calResourceId": "3",
          "calStatus": "",
          "calTimeSummaryInternal": 1012731,
          "calLinkedBookings": 1
        },
    }      

Calendar refresh

Refresh an individual calendar booking

 

Calendar refresh

Refresh an individual calendar booking.

Parameter Description Examples More info
Action Refresh an individual calendar booking action=calendarrefresh
<General> Parameters described in overview Overview
Diary Booking id diary=136015

Example request:
Request to refresh calendar

http://<SERVER>/jsonapi/calendar.json?user=user&password=user&version=3.3&action=calendarrefresh&diary=136006

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "calResourceId": "405",
      "calResourceName": "Mr.Later",
      "calTimeSummaryInternal": 1012213,
      "calClientCode": "3/ET",
      "calClientName": "Egon Test",
      "calJobNumber": "3/00001015",
      "calJobNumberSimple": "1015",
      "calJobDescription1stLine": "Here is the job description",
      "calJobHandlerName": "Adele.Graham",
      "calJobAndPhase": "3/00001015.001",
      "calJobPhaseNumberSimple": "1015.001",
      "calPhaseDescription1stLine": "Egon - Training 1",
      "calStageCode": "",
      "calTaskDescription": "",
      "calChargeCode": "3/R1",
      "calChargeCodeDescription": "Rail Engineer 1",
      "calDescription": "",
      "calNotes": "",
      "calStatus": "Normal",
      "calRequestStatus": "",
      "calStartDate": "2017-11-09",
      "calStartTime": "09:00:00",
      "calEndTime": "11:00:00",
      "calRequisitionId": 7562,
      "calRequisitionSubject": "job level reqisitiion",
      "calRequisitionDetails": "here is a desc",
      "calIsoDateTimeStart": "2017-11-07T09:00:00",
      "calIsoDateTimeEnd": "2017-11-09T11:00:00",
      "calAllDay": false,
      "calDiaryInternal": 137463,
      "calColourHex": "FFFFFF",
      "calFeedback": "TODO",
      "calWeakLink": 5305,
      "calendarunallocatedunique": "3/00001015.001###3/R1",
      "calendarunallocatedestimated": 2,
      "calendarunallocatedbooked": 6,
      "calendarunallocatedremaining": -4,
      "calendarunallocatedtimesheets": 14,
      "calendarunallocateddraft": 0,
      "calendarunallocatedinitials": "ML",
      "calNumberOfDays": "3",
      "calDurationDescription": "3 day, 2 hours per day",
      "calHoursPerDay": "2"
    }
  ]
}

Show estimate

Un-hide a time estimate record

 

Show estimate

Un-hide estimate form the estimate selection list

Parameter Description Examples More info
Action Hide an item from the list of estimates action=timesummaryshow
<General> Parameters described in overview Overview
Timesummary

Example request:

http://<SERVER>/jsonapi/calendar.json?user=user&password=user&version=3.3&action=timesummaryshow&timesummary=1006689

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "1 of 1 time summaries shown.",
  "warningmessage": "",
  "success": true
}

Hide estimate

Hide a time estimate record

 

Hide estimate

Hide estimate form the estimate selection list

Parameter Description Examples More info
Action Hide an item from the list of estimates action=timesummaryhide
<General> Parameters described in overview Overview
Timesummary

Example request:

http://<SERVER>/jsonapi/calendar.json?user=user&password=user&version=3.3&action=timesummaryhide&timesummary=1006689

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "1 of 1 time summaries shown.",
  "warningmessage": "",
  "success": true
}

Create

Create a new calendar booking

 

Calendar create

Create a new calendar booking.

Parameter Description Examples More info
Action Create a new record in the calendar bookings action=create
<General> Parameters described in overview Overview
Input JSON string input={"data": ...
<input mandatory> calTimeSummaryInternal "calTimeSummaryInternal":"1005543"
<input mandatory> calIsoDateTimeStart "calIsoDateTimeStart":"2017-07-10T14:30:00"
<input mandatory> calIsoDateTimeEnd "calIsoDateTimeEnd":"2017-07-10T14:30:00
<input mandatory> calDurationDecimalHours "calDurationDecimalHours":"-0.75"
<input mandatory> calResourceId "calResourceId":"5"

Example request:
Request to create a booking

http://<SERVER>/jsonapi/calendar.json?user=user&password=user&version=3.3&action=create&input={"data": [{"calTimeSummaryInternal":"1005543","calIsoDateTimeStart":"2017-07-10T14:30:00","calIsoDateTimeEnd":"2017-07-10T14:30:00","calDurationDecimalHours":"-0.75","calResourceId":"5"}]}

Note: The duration passed may be modified by the business logic of the API.
e.g. if 500 hours is passed the API will reduce the duration to the hours for the number of working days specified by the start and end date. If no start or end time is specified in the ISO date fields, and the duration is for an entire day, the 'All day' flag on the booking will be automatically set.

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "calUuid": "A3492EF45155B8438C2D13AA6F6030D2",
      "calDiaryInternal": 56570,
      "calResourceId": "34",
      "calResourceName": "Freelancer.01",
      "calTimeSummaryInternal": 1005543,
      "calClientCode": "1/1DFHTEST",
      "calClientName": "SnakeByte Software",
      "calJobNumber": "1/00010481",
      "calJobNumberSimple": "10481",
      "calJobDescription1stLine": "No date dependencies test",
      "calJobHandlerName": "David.Harvey",
      "calJobAndPhase": "1/00010481.H01",
      "calJobPhaseNumberSimple": "10481.H01",
      "calPhaseDescription1stLine": "Design 2t",
      "calStageCode": "",
      "calTaskDescription": "",
      "calChargeCode": "1/ALT",
      "calChargeCodeDescription": "Amends New",
      "calDescription": "",
      "calNotes": "",
      "calStatus": "",
      "calRequestStatus": "",
      "calStartDate": "2017-07-10",
      "calStartTime": "14:30:00",
      "calEndTime": "14:45:00",
      "calIsoDateTimeStart": "2017-07-10T14:30:00",
      "calIsoDateTimeEnd": "2017-07-10T14:45:00",
      "calAllDay": false,
      "calColourHex": "EBFF00",
      "calFeedback": "TODO",
      "calWeakLink": 6011,
      "calendarunallocatedunique": "1/00010481.H01###1/ALT",
      "calendarunallocatedestimated": 1,
      "calendarunallocatedbooked": 3.25,
      "calendarunallocatedremaining": -2.25,
      "calendarunallocatedtimesheets": 0,
      "calendarunallocateddraft": 0,
      "calendarunallocatedinitials": "F0,FC",
      "calNumberOfDays": "1",
      "calDurationDescription": "0.25 hour",
      "calHoursPerDay": "0.25",
      "calTimeStampModified": 0,
      "calRecordVersionNumber": 0
    }
  ]
}

Update

Update a calendar booking

 

Calendar update

Update a calendar booking.

Parameter Description Examples More info
Action Update a record in calendar bookings action=create
<General> Parameters described in overview Overview
Input JSON string "data": ...
<input mandatory> calDiaryInternal "calDiaryInternal":"56566"
<input mandatory> calIsoDateTimeStart "calIsoDateTimeStart":"2017-07-10T14:30:00"
<input mandatory> calIsoDateTimeEnd "calIsoDateTimeEnd":"2017-07-10T15:45:00"
<input mandatory> calAllDay "calAllDay":"false"
<input mandatory> calResourceId "calResourceId":"34"

Example request:
Request to update a booking

http://<SERVER>/jsonapi/calendar.json?user=user&password=user&version=3.3&action=update&input={"data": [{"calDiaryInternal":"56566","calIsoDateTimeStart":"2017-07-10T14:30:00","calIsoDateTimeEnd":"2017-07-10T15:45:00","calAllDay":"false","calResourceId":"34"}]}&_=1499954251810_

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "calDiaryInternal": 56566,
      "calUuid": "7239680C46928342AB66D5524C1E1C44",
      "calResourceId": "34",
      "calResourceName": "Freelancer.01",
      "calTimeSummaryInternal": 1005543,
      "calClientCode": "1/1DFHTEST",
      "calClientName": "SnakeByte Software",
      "calJobNumber": "1/00010481",
      "calJobNumberSimple": "10481",
      "calJobDescription1stLine": "No date dependencies test",
      "calJobHandlerName": "David.Harvey",
      "calJobAndPhase": "1/00010481.H01",
      "calJobPhaseNumberSimple": "10481.H01",
      "calPhaseDescription1stLine": "Design 2t",
      "calStageCode": "",
      "calTaskDescription": "",
      "calChargeCode": "1/ALT",
      "calChargeCodeDescription": "Amends New",
      "calDescription": "",
      "calNotes": "",
      "calStatus": "",
      "calRequestStatus": "",
      "calStartDate": "2017-07-10",
      "calStartTime": "14:30:00",
      "calEndTime": "15:45:00",
      "calIsoDateTimeStart": "2017-07-10T14:30:00",
      "calIsoDateTimeEnd": "2017-07-10T15:45:00",
      "calAllDay": false,
      "calColourHex": "EBFF00",
			"calFeedback": "TIMEREQUIRED",
      "calWeakLink": 5999,
      "calendarunallocatedunique": "1/00010481.H01###1/ALT",
      "calendarunallocatedestimated": 1,
      "calendarunallocatedbooked": 3.5,
      "calendarunallocatedremaining": -2.5,
      "calendarunallocatedtimesheets": 0,
      "calendarunallocateddraft": 0,
      "calendarunallocatedinitials": "F0,FC",
      "calNumberOfDays": "1",
      "calDurationDescription": "1.25 hours",
      "calHoursPerDay": "1.25",
      "calTimeStampModified": 0,
      "calRecordVersionNumber": 0
    }
  ]
}

Delete

Delete a calendar booking

 

Calendar delete

Delete a calendar booking.

Parameter Description Examples More info
Action Delete a calendar bookings entry action=create
<General> Parameters described in overview Overview
Input JSON string "data": ...
<input mandatory> diary_diaryinternal "diary_diaryinternal":56568

Example request:
Request to delete a booking

http://<SERVER>/jsonapi/calendar.json?user=user&password=user&version=3.3&action=delete&input={"data": [{"diary_diaryinternal":56568}]}&_=1499954515492_

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "calDiaryInternal": 56566,
      "calUuid": "7239680C46928342AB66D5524C1E1C44",
      "calendarunallocatedunique": "1/00010481.H01###1/ALT",
      "calendarunallocatedestimated": 1,
      "calendarunallocatedbooked": 2.5,
      "calendarunallocatedremaining": -1.5,
      "calendarunallocatedtimesheets": 0,
      "calendarunallocateddraft": 0,
      "calendarunallocatedinitials": "F0,FC"
    }
  ]
}

MyCalendar list

Returns one or more calendar records for user

 

If you wish to access multiple calendar records you would use the MyCalendar model

For more details about using models see Using data models

For MyCalendar only one model is available:

  • MyCalendar
Parameter Description Example More info
API The API area calendar.json
Action Not required
<General> Parameters described in overview user=user&password=user v3.3 Overview
Modelstructure Name of model required Modelstructure=MyCalendar Using data models
<datefrom> Filter by booking date datefrom=2018-10-29
<dateto> Filter by booking date datefrom=2018-12-10
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/calendar.json?user=user&password=user&style=modeldata&modelstructure=MyCalendar&version=3.3&datefrom=2018-10-29&dateto=2018-12-10

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 143,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "calUuid": "FDA00A3205955D458DFAB0D1055D2B40",
      "calTimeStampModified": 1542891467,
      "calRecordVersionNumber": 1,
      "calColour": "FF6600",
      "calDurationDescription": "1 hour",
      "calTimesheets": 0,
      "calEndTimeDisplay": "12:00 AM",
      "calPhaseDescription": "SPV-3033",
      "calJobDescription": "SPV-3033",
      "calStartTimeDisplay": "11:00 PM",
      "calStartDate": "2018-10-29",
      "calStartTime": "23:00:00",
      "calInternalLink": 24742,
      "calWeakLink": 6532,
      "calJobHandler": 242,
      "calPhaseHandler": 242,
      "calTimesheetInternal": 0,
      "calPendingTimesheetInternal": 0,
      "calIsoDateTimeStart": "2018-10-29T23:00:00Z",
      "calIsoDateTimeEnd": "2018-10-29T24:00:00Z",
      "calDurationDecimalHours": 1,
      "calAllDay": false,
      "calRequestStatus": "",
      "calStatus": "",
      "calFeedback": "TODO",
      "calJobPhaseNumberSimple": "12300123.001",
      "calRequisitionSubject": "",
      "calClientName": "999 license"
    },
    

Note: Custom fields are not returned prior to Synergist 12.2

Checklists API

 

Create header

Create a checklist

 

Create header

Parameter Description Example More info
API The API area checklistheader.json
Action Create &action=create
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
Input JSON string input="data": ...
<input mandatory>checklistActivityID Checklist ActivityID "checklistActivityID"=7078
<input mandatory>checklistTitle Checklist header title "checklistTitle":"My Checklist"
<input optional>variable_checklistheadertemplate Checklist header template uuid "variable_checklistheadertemplate":"B169DA9B3B5810448C5B2151FF232DB2"
Response Returned data A JSON string containing the data

Example request:
Request to create a checklist


http://<SERVER>/jsonAPI/checklistheader.json?user=user&password=user&action=create&version=3.3&input={"data": [{"checklistActivityID":7078,"checklistTitle":"My Checklist","checklistTemplate":"B169DA9B3B5810448C5B2151FF232DB2"}]}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "checklistUuid": "1206A47F6D784247A1C39D372AC75878",
      "checklistTimestampModified": 1539787856,
      "checklistRecordVersionNumber": 0
    }
  ]
}

Update header

Update a checklist

 

Update header

Parameter Description Example More info
API The API area checklistheader.json
Action Update &action=update
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
Input JSON string input="data": ...
<input mandatory>checklistUuid Checklist UUID "checklistUuid":"B60C7E3EEFF2394E97CF4CF2965902A7"
<input optional>checklistTitle Checklist title "checklistTitle"=
<input optional>position Checklist header position &position=
Response Returned data A JSON string containing the data

Example request:
Request to update a checklist

http://<SERVER>/jsonAPI/checklistheader.json?user=user&password=user&version=3.3&action=update&input={"data":[{"checklistUuid":"063B9BE7A170AF4ABE38251FF2039354","checklistTitle":"Test Checklist 2"}]}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "checklistUuid": "063B9BE7A170AF4ABE38251FF2039354",
      "checklistTimestampModified": 1539605562,
      "checklistRecordVersionNumber": 6
    }
  ]
}

Delete header

Delete a checklist

 

Delete header

Parameter Description Example More info
API The API area checklistheader.json
Action Delete &action=delete
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
Input JSON string input="data": ...
<input mandatory>checklistUuid Checklist UUID "checklistUuid":"F820725A727FEF4EB4129E6E798B90AD"
Response Returned data A JSON string containing the data

Example request:
Request to delete a checklist

http://<SERVER>/jsonAPI/checklistheader.json?user=user&password=user&version=3.3&action=delete&input={"data": [{"checklistUuid":"F820725A727FEF4EB4129E6E798B90AD"}]}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "checklistUuid": "F820725A727FEF4EB4129E6E798B90AD"
    }
  ]
}

List of checklist headers

Return a list of checklists

 

List of checklist headers

Parameter Description Example More info
API The API area checklistheader.json
Action Not required
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
<input mandatory>Company Company number &company=1
<input optional>rows No. of rows &rows=10
<input optional>page No. of pages &page=1
<input optional>uuid Checklist uuid &uuid=
<input optional>checklistActivityID Checklist ActivityID &checklistActivityID&=
<Filters> Filter by a key field client=1/F667 Filters
Response Returned data A JSON string containing the data

Example request:
Request to return a list of checklists

http://<SERVER>/jsonAPI/checklistheader.json?user=user&password=user&version=3.3&company=1&rows=10&page=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 22,
  "totalpages": 3,
  "responsemessage": "",
  "pagerows": 10,
  "pagenumber": 1,
  "success": true,
"data": [
{
"checklistUuid": "6DAF95A26E921C44A03033B50B5D9891",
"checklistTimestampModified": 1539600889,
"checklistRecordVersionNumber": 4,
"checklistTitle": "My Checklist zzz",
"checklistActivityID": 7078,
"checklistOrder": 1,
"checklistHideCompletedItems": false
},
    
    

Re-order checklist headers

Reorder checklists

 

Re-order checklist headers

Example request:
Request to reorder checklists

Parameter Description Example More info
API The API area checklistheader.json
Action Reorder &action=reorder
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
<input mandatory>uuid Checklist header uuid &uuid=1E78E968D52160428B123B48978F4F40
<input mandatory>position Checklist header position &position=2
Response Returned data A JSON string containing the data
http://<SERVER>/jsonAPI/checklistheader.json?user=user&password=user&version=3.3&uuid=1E78E968D52160428B123B48978F4F40&position=2&action=reorder

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Reordered successfully. ",
  "warningmessage": "",
  "success": true
}

List templates

Return a list of checklist templates

 

List templates

Parameter Description Example More info
API The API area checklistheader.json
Action Templates &action=templates
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
<input mandatory>Company Company number &company=1
Response Returned data A JSON string containing the data

Example request:
Request to return a list of checklist templates

http://<SERVER>/jsonAPI/checklistheader.json?user=user&password=user&company=1&version=3.3&action=templates

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 3,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "checklistUuid": "B169DA9B3B5810448C5B2151FF232DB2",
      "checklistTimestampModified": 1533200270,
      "checklistRecordVersionNumber": 0,
      "checklistActivityID": 7906,
      "checklistTitle": "Standard CL1",
      "checklistActivityJobDesc": "Template for checklists",
      "checklistActivityJobNumber": "1/CH00ECK1",
      "checklistActivitySubject": "Standard checklists 1"
    },
    {
      "checklistUuid": "F9ED26457F3ECD4AB55A0B04DF223278",
      "checklistTimestampModified": 1533200302,
      "checklistRecordVersionNumber": 0,
      "checklistActivityID": 7906,
      "checklistTitle": "Standard CL2",
      "checklistActivityJobDesc": "Template for checklists",
      "checklistActivityJobNumber": "1/CH00ECK1",
      "checklistActivitySubject": "Standard checklists 1"
    }etc. etc.
  ]
}

Hide

Hide completed items

 

Hide

Parameter Description Example More info
API The API area checklistheader.json
Action Completed hide &action=completed_hide
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
<input mandatory>uuid Checklist header uuid &uuid=1E78E968D52160428B123B48978F4F40
Response Returned data A JSON string containing the data

Example request:
Request to hide completed items

http://<SERVER>/jsonAPI/checklistheader.json?user=user&password=user&version=3.3&uuid=1E78E968D52160428B123B48978F4F40&action=completed_hide

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Checklist header completed items show/hide changed. ",
  "warningmessage": "",
  "success": true
}

Show

Show completed items

 

Show

Parameter Description Example More info
API The API area checklistheader.json
Action Completed show &action=completed_show
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
<input mandatory>uuid Checklist header uuid &uuid=1E78E968D52160428B123B48978F4F40
Response Returned data A JSON string containing the data

Example request:
Request to show completed items

http://<SERVER>/jsonAPI/checklistheader.json?user=user&password=user&version=3.3&uuid=1E78E968D52160428B123B48978F4F40&action=completed_show

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Checklist header completed items show/hide changed. ",
  "warningmessage": "",
  "success": true
}

Create checklist item

Create an item in a checklist

 

Create checklist item

Parameter Description Example More info
API The API area checklistitems.json
Action Create &action=create
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
Input JSON string input="data": ...
<input mandatory>ChecklistitemChecklistHeaderUUID Checklist header uuid "ChecklistitemChecklistHeaderUUID":"B169DA9B3B5810448C5B2151FF232DB2"
<input mandatory>ChecklistitemDescription Checklist item description "ChecklistitemDescription":"item 10"
<input optional>ChecklistitemUuid Checklist item uuid "ChecklistitemUuid"=
<input optional>ChecklistItemOrder Checklist item order "ChecklistItemOrder"=
Response Returned data A JSON string containing the data

Example request:
Request to create a checklist item

http:///<SERVER>/jsonAPI/checklistitems.json?user=user&password=user&version=3.3&action=create&input={"data": [{"checklistitemChecklistHeaderUUID":"B169DA9B3B5810448C5B2151FF232DB2","checklistitemDescription":"item 10"}]}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "checklistitemUuid": "DE53CBF5C6E96140BD214071BEA5BFDE",
      "checklistitemTimestampModified": 1539788746,
      "checklistitemRecordVersionNumber": 0
    }
  ]
}

Update checklist item

Update an item in a checklist

 

Update checklist item

Parameter Description Example More info
API The API area checklistitems.json
Action Update &action=update
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
Input JSON string input="data": ...
<input mandatory>ChecklistitemUuid Checklist item uuid "ChecklistitemUuid"="09BE9E44B80C634A99C91B57DB6684A2"
<input optional>ChecklistitemDescription Checklist item description "ChecklistitemDescription":"item 10"
Response Returned data A JSON string containing the data

Example request:
Request to update a checklist item

http://<SERVER>/jsonAPI/checklistitems.json?user=user&password=user&version=3.3&action=update&input={"data": [{"checklistitemUuid":"09BE9E44B80C634A99C91B57DB6684A2","checklistitemDescription":"item 100"}]}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "checklistitemUuid": "09BE9E44B80C634A99C91B57DB6684A2",
      "checklistitemTimestampModified": 1539605707,
      "checklistitemRecordVersionNumber": 7
    }
  ]
}

Delete checklist item

Delete an item in a checklist

 

Delete checklist item

Parameter Description Example More info
API The API area checklistitems.json
Action Delete &action=delete
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
Input JSON string input="data": ...
<input mandatory>checklistActivityID Checklist item uuid "ChecklistitemUuid"="4B2ECC5730555144AF81C61A74898DDB"
Response Returned data A JSON string containing the data

Example request:
Request to delete a checklist item

http://<SERVER>/jsonAPI/checklistitems.json?user=user&password=user&version=3.3&action=delete&input={"data": [{"checklistitemUuid":"4B2ECC5730555144AF81C61A74898DDB"}]}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "checklistitemUuid": "4B2ECC5730555144AF81C61A74898DDB"
    }
  ]
}

Complete checklist item

Complete an item in a checklist

 

Complete checklist item

Parameter Description Example More info
API The API area checklistitems.json
Action Item complete &action=item_complete
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
<input mandatory>uuid Checklist item uuid &uuid=09BE9E44B80C634A99C91B57DB6684A2
Response Returned data A JSON string containing the data

Example request:
Request to complete a checklist item

http://<SERVER>/jsonAPI/checklistitems.json?user=user&password=user&version=3.3&action=item_complete&uuid=09BE9E44B80C634A99C91B57DB6684A2

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "1 of 1 checklistitems completed.",
  "warningmessage": "",
  "success": true
}

Uncomplete checklist item

Uncomplete an item in a checklist

 

Uncomplete checklist item

Parameter Description Example More info
API The API area checklistitems.json
Action Item uncomplete &action=item_uncomplete
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
<input mandatory>uuid Checklist item uuid &uuid=09BE9E44B80C634A99C91B57DB6684A2
Response Returned data A JSON string containing the data

Example request:
Request to uncomplete a checklist item

http://<SERVER>/jsonAPI/checklistitems.json?user=user&password=user&version=3.3&action=item_uncomplete&uuid=09BE9E44B80C634A99C91B57DB6684A2

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "1 of 1 checklistitems uncompleted.",
  "warningmessage": "",
  "success": true
}

Reorder checklist items

Reorder items in a checklist

 

Reorder checklist items

Parameter Description Example More info
API The API area checklistitems.json
Action Reorder &action=reorder
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
<input mandatory>uuid Checklist item uuid &uuid=09BE9E44B80C634A99C91B57DB6684A2
<input mandatory>position Checklist item position &position=2
Response Returned data A JSON string containing the data

Example request:
Request to reorder checklist item

http:///<SERVER>/jsonAPI/checklistitems.json?user=user&password=user&version=3.3&uuid=09BE9E44B80C634A99C91B57DB6684A2&position=2&action=reorder

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Reordered successfully. ",
  "warningmessage": "",
  "success": true
}

List of checklist items

Return a list of checklist items

 

List of checklist items

Parameter Description Example More info
API The API area checklistheader.json
Action Not required
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
<input mandatory>checklistheader Checklist header ID &checklistheader=F9ED26457F3ECD4AB55A0B04DF223278
<input optional>Company Company number &company=
<input optional>UUID Checklist item uuid &uuid=
<Filters> Filter by a key field client=1/F667 Filters
Response Returned data A JSON string containing the data

Example request:
Request to return a list of checklist items

http://<SERVER>/jsonAPI/checklistitems.json?user=user&password=user&version=3.3&company=3&checklistheader=D79C5ECDD09C194EBC411CE10BE90FDC

http://192.168.0.239/jsonAPI/checklistitems.json?user=syn_mike&password=st0p&version=3.3&company=3&checklistheader=D79C5ECDD09C194EBC411CE10BE90FDC

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 2,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "checklistitemUuid": "81751011112B9242BFC2C72355C601E3",
      "checklistitemTimestampModified": 1553079480,
      "checklistitemRecordVersionNumber": 1,
      "checklistitemChecklistHeaderUUID": "D79C5ECDD09C194EBC411CE10BE90FDC",
      "checklistitemComplete": true,
      "checklistitemOrder": 1,
      "checklistitemDescription": "item 1"
    },
    {
      "checklistitemUuid": "D90B6F3ADE409B4F9FAF1E83FDB5262C",
      "checklistitemTimestampModified": 1553079333,
      "checklistitemRecordVersionNumber": 0,
      "checklistitemChecklistHeaderUUID": "D79C5ECDD09C194EBC411CE10BE90FDC",
      "checklistitemComplete": false,
      "checklistitemOrder": 2,
      "checklistitemDescription": "item 2"
    }
  ]
}

Re-order checklist headers

Reorder checklists

 

Re-order checklist headers

Parameter Description Example More info
API The API area checklistheader.json
Action Reorder &action=reorder
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
<input mandatory>uuid Checklist header uuid &uuid=1E78E968D52160428B123B48978F4F40
<input mandatory>position Checklist header position &position=2
Response Returned data A JSON string containing the data

Example request:
Request to reorder checklists

http://<SERVER>/jsonAPI/checklistheader.json?user=user&password=user&version=3.3&&uuid=1E78E968D52160428B123B48978F4F40&position=2&action=reorder

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Reordered successfully. ",
  "warningmessage": "",
  "success": true
}

Clients API

 

Client list

Returns one or more client (organizations) records

 

Clients

If you wish to access multiple client records you would normally use the clientslist model

For more details about using models see Using data models

For clients two models are available:

  • clientslist
  • clientdetails

If a list of records is required a ‘view’ parameter should be passed. If no ‘view’ parameter is passed all records for the synergist company are returned.

Parameter Description Example More info
API The API area clients.json
Action Not required
<General> Parameters described in overview user=user&password=user Overview
Company Company number company=1
Modelstructure Name of model required Modelstructure=clientslist Using data models
View Stored filter applied view=-1001 Using views
Sort Change the view's default sort order sort=CLIENT Sorting
<Filters> Filter by a key field Filters
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?company=1&version=3.3&user=user&password=user&company=1&style=modeldata&modelstructure=clientslist&view=-1001

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 502,
  "totalpages": 251,
  "responsemessage": "",
  "pagerows": 2,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "clientUuid": "A246FBB5E59C41A1AC29A00A8F82FC66",
      "clientTimeStampModified": 1518195468,
      "clientRecordVersionNumber": 105,
      "clientCustomField323": "",
      "clientCode": "1/GS",
      "clientName": "Great Sites",
      "clientCategoryName": "Client",
      "clientPhone": "",
      "clientCategory": 3,
      "clientHandlerUserID": 121,
      "clientWebURL": "",
      "clientEmail": "",
      "clientInactive": false,
      "clientType": "",
      "clientOpStatus": "",
      "clientMarketSector": "B2B",
      "clientOnHold": false,
      "clientHandlerFullName": "Alan Shearer (mike email)"
    },
    etc. etc.
    {

Client details

Returns a single client record

 

Clients

If you wish to access a single client record you would normally use the clientdetails model

For more details about using models see Using data models

For clients two models are available:

  • clientslist
  • clientdetails
Parameter Description Example More info
API The API area clients.json
Action Not required
<General> Parameters described in overview user=user&password=user Overview
Company Company number company=1
Modelstructure Name of model required Modelstructure=clientdetails Using data models
Client Specify client client=1/P0909
Response Returned data A JSON string containing the data

Example request:

http://<SERVER>/jsonapi/clients.json?company=1&version=3.3&user=user&password=user&company=1&style=modeldata&modelstructure=clientdetails&client=1/P0909

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "clientUuid": "493686EA86774194831FFE438B031917",
      "clientTimeStampModified": 1534507527,
      "clientRecordVersionNumber": 87,
      "clientCustomField196": "new item for list",
      "clientCustomField204": "111",
      "clientCustomField211": "2017-09-21",
      "clientCustomField260": "",
      "clientCustomField296": "1",
      "clientCustomField315": false,
      "clientCustomField323": "",
      "clientNotes": "",
      "clientCode": "1/P0909",
      "clientName": "",
      "clientStreet": "Hollins Park, Hollins Lane",
      "clientAddress1": "",
      "clientAddress2": "Warrington",
      "clientCounty": "http://www.synergist.co.uk",
      "clientPostcode": "WA2 8WA",
      "clientCountry": "",
      "clientCountryCode": "UK",
      "clientCountryName": "United Kingdom",
      "clientPhone": "",
      "clientFax": "",
      "clientHandlerUserID": 412,
      "clientHandlerFullName": "Matthew Test",
      "clientWebURL": "www.synergist.co.uk",
      "clientEmail": "",
      "clientISDN": "",
      "clientInternalClient": false,
      "clientInactive": false,
      "clientOPSourceClient": "Advertisment",
      "clientType": "",
      "clientEmployees": "",
      "clientOpStatus": "",
      "clientMarketSector": "Arts, Sport, Entertainment1",
      "clientDefaultSpec": "",
      "clientLeadRating": "",
      "clientOnHold": false,
      "clientTimeZoneCode": "UTCA",
      "clientTimezoneDescription": "",
      "clientCompanyNumber": 1
    }
  ]
}

Note: needs 12.2 for custom fields

Organizations

List of organizations

 

Organizations

The Organizations call retrieves a list of organizations within the specified view and company the user has access to.

Deprecated - see Client list

Parameter Description Examples More info
<General> Parameters described in overview user=user&password=user Overview
<input mandatory>company Company ID &company=1
<input optional>clientcode: Clientcode &clientcode=1/P0908
<input optional>search: Search Criteria &search=test
<input optional>rows: No. of Records &rows=10
<input optional>page: No. of Pages &page=1

Example request:
Request to list organizations

http://<SERVER>/jsonapi/organizations.json?user=user&password=user&version=3.3&company=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "clientUuid": "A246FBB5E59C41A1AC29A00A8F82FC66",
      "clientTimeStampModified": 1520523773,
      "clientRecordVersionNumber": 107,
      "clientCustomField196": "a",
      "clientCustomField204": "xxxyyyzzz",
      "clientCustomField211": "2018-03-07",
      "clientCustomField260": "a - 1",
      "clientCustomField296": "1ccccc",
      "clientCustomField315": false,
      "clientCustomField323": "Crunchy grass",
      "clientCode": "1/P0908",
      "clientName": "4imprint1",
      "clientCategoryName": "Client",
      "clientPhone": "",
      "clientCategory": 3,
      "clientHandlerUserID": 533,
      "clientWebURL": "",
      "clientEmail": "",
      "clientInactive": false,
      "clientType": "Food 1",
      "clientOpStatus": "Silver",
      "clientMarketSector": "Food and drink",
      "clientOnHold": false,
      "clientHandlerFullName": "Gina Labro"
    }
  ]
}

Note: Feature from API 2.2

Create

Create a client record

 

Create

Parameter Description Example More info
API The API area clients.json
Action The action to perform action=create
<General> Parameters described in overview user=user&password=user v3.3 Overview
input Client category (mandatory), client code (optional), then name/value pairs "data": [<see example>]
Response Returned data See below

Note

  1. Client category: Client=3, Prospect=2
  2. Leads are not currently supported
  3. clientCode is only required if your system is set up to use 'Own client/prospect account numbers'

Example request:

http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&action=create&input={
  "data": [
    {
      "clientCategory": 3,
      "clientCode": "1/BLOGG1",
      "clientname": "Bloggs Ltd",
      "clientCompanyNumber": 1
    }
  ]
}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "clientUuid": "AC80A6A24CB212439157C8DFD4F9AC5A",
      "clientCode": "1/P2027",
      "clientTimeStampModified": 1532593065,
      "clientRecordVersionNumber": 0
    }
  ]
}

Update

Update an existing client record

 

Update

Parameter Description Example More info
API The API area clients.json
Action The action to perform action=update
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
input Pass client code, then name/value pairs "data": [<see example>]
input Client code (mandatory), then name/value pairs "data": [<see example>]
Response Returned data See below

Example requests:

http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&action=update&input={
  "data": [
    {
      "clientCode": "1/P0909",
      "clientName": "New Company Inc"
    }
  ]
}

*Updating a custom field*
http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&action=update&input={
  "data": [
    {
      "clientCode": "1/P0909",
      "clientCustomField196": "a longer item to select"
    }
  ]
}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "clientCode": "1/P0909",
      "clientUuid": "493686EA86774194831FFE438B031917",
      "clientTimeStampModified": 1544093783,
      "clientRecordVersionNumber": 97
    }
  ]
}

Note:

To discover which fields are editable make a call to the "Client details" endpoint and specify '&style=modelstructure' see Meta-data

Delete

 

Delete

Parameter Description Example More info
API The API area clients.json
Action The action to perform action=delete
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
input JSON string input="data": ...
Response Returned data See below

Example request:

http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&action=delete&input={"data":[{"clientCode":"1/P2028"}]}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "clientCode": "1/P2028",
      "clientUuid": "6BDD26C48BF1D445B4EF8CEDCEFDD685"
    }
  ]
}

Active On

 

Active On

Parameter Description Example More info
API The API area clients.json
Action The action to perform action=active_ON
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
Client Client to set active client=1/AMT2A
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&action=active_ON&client=1/AMT2A&version=3.3

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Client active flag changed. ",
  "warningmessage": "",
  "success": true
}

Active Off

 

Active Off

Parameter Description Example More info
API The API area clients.json
Action The action to perform action=active_OFF
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
Client Client to set inactive client=1/AMT2A
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&action=active_OFF&client=1/AMT2A&version=3.3

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Client active flag changed. ",
  "warningmessage": "",
  "success": true
}

Promote to client

 

Active Off

Parameter Description Example More info
API The API area clients.json
Action The action to perform action=promote
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
Client Client to promote client=1/AMT2A
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&action=promote&client=1/AMT2A&version=3.3

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Client active flag changed. ",
  "warningmessage": "",
  "success": true
}

Revert to prospect

 

Revert to prospect

Parameter Description Example More info
API The API area clients.json
Action The action to perform action=revert
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
Client Client to revert client=1/AMT2A
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&action=revert&client=1/AMT2A&version=3.3

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Client active flag changed. ",
  "warningmessage": "",
  "success": true
}

Put on stop

 

Put on stop

Parameter Description Example More info
API The API area clients.json
Action The action to perform action=revert
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
Client Client to put on stop client=1/AMT2A
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&action=stop_ON&client=1/AMT2A&version=3.3

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Client on stop flag changed. ",
  "warningmessage": "",
  "success": true
}

Put off stop

 

Put off stop

Parameter Description Example More info
API The API area clients.json
Action The action to perform action=revert
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
Client Client to put off stop client=1/AMT2A
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&action=stop_OFF&client=1/AMT2A&version=3.3

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Client on stop flag changed. ",
  "warningmessage": "",
  "success": true
}

Countries lookup

 

Countries lookup

Parameter Description Example More info
API The API area clients.json
Action The action to perform action=countries
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
Company Company ID company=1
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&company=1&action=countries

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "countryCode": "",
      "countryName": "- Blank -",
      "variable_selected": true
    }
  ]
}

Handlers lookup

 

Handlers lookup

Parameter Description Example More info
API The API area clients.json
Action The action to perform action=handlers
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
Company Company ID company=1
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&company=1&action=handlers

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "userFullName": "- Blank -",
      "userUserId": 0,
      "variable_selected": false
    }
  ]
}

Sources lookup

 

Sources lookup

Parameter Description Example More info
API The API area clients.json
Action The action to perform action=sources
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
Company Company ID company=1
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&company=1&action=sources

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "lookupClientSource": "zzz",
      "variable_selected": false
    }
  ]
}

Client types lookup

 

Sources lookup

Parameter Description Example More info
API The API area clients.json
Action The action to perform action=clienttypes
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
Company Company ID company=1
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&company=1&action=clienttypes

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "lookupClientType": "Arts 1",
      "variable_selected": false
    }
  ]
}

Market sectors lookup

 

Market sectors lookup

Parameter Description Example More info
API The API area clients.json
Action The action to perform action=marketsectors
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
Company Company ID company=1
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&company=1&action=marketsectors

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "lookupMarketSector": "Arts, Sport, Entertainment1",
      "variable_selected": false
    }
  ]
}

Status grades lookup

 

Status grades lookup

Parameter Description Example More info
API The API area clients.json
Action The action to perform action=statusgrades
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
Company Company ID company=1
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&company=1&action=statusgrades

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 4,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "lookupOpStatusGrade": "Bronze",
      "variable_selected": false
    },
    {
      "lookupOpStatusGrade": "Silver",
      "variable_selected": false
    },
    {
      "lookupOpStatusGrade": "Gold",
      "variable_selected": false
    },
    {
      "lookupOpStatusGrade": "Platinum",
      "variable_selected": false
    }
  ]
}

Lead ratings lookup

 

Lead ratings lookup

Parameter Description Example More info
API The API area clients.json
Action The action to perform action=leadratings
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
Company Company ID company=1
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&company=1&action=leadratings

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "lookupLeadRating": "Rating 2",
      "variable_selected": false
    }
  ]
}

Client contacts API

 

Contacts list

List of client contacts

 

Client Contacts

The Contacts call retrieves a list of contacts within the specified view and company the user has access to.

Note: To access prospect or lead contacts you will need to create a special view and pass that as a view parameter.

Parameter Description Example More info
API The API area clientcontacts.json
Action Not required
<General> Parameters described in overview user=user&password=user Overview
Company Company number company=1
Modelstructure Name of model required Modelstructure=clientcontactslist Using data models
View Stored filter applied view=-1101 Using views
Sort Change the view's default sort order sort=NAME Sorting
<Filters> Filter by a key field client=1/2365 Filters
Response Returned data A JSON string containing the data

Example request:
Request to list client contacts

http://<SERVER>/jsonapi/clientcontacts.json?user=user&password=user&version=3.3&company=1&style=modeldata&modelstructure=clientcontactslist&view=-1101

or with a timestamp filter ...

This will return any contact records created/modified in the past 15 mins.

http://<SERVER>/jsonapi/clientcontacts.json?user=user&password=user&version=3.3&company=3&style=modeldata&modelstructure=clientcontactdetails&timestampoffsetfrom=-900

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 7,
  "totalpages": 4,
  "responsemessage": "",
  "pagerows": 2,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "clientcontactuuid": "05F73F03055D4F0D942A7E03D0BA09EE",
      "clientcontactTimeStampModified": 1385819878,
      "clientcontactRecordVersionNumber": 7,
      "clientcontactCustomField200": "",
      "clientcontactCustomField206": "",
      "clientcontactCustomField210": "0000-00-00",
      "clientcontactCustomField253": "",
      "clientcontactCustomField289": "",
      "clientcontactCustomField314": "",
      "clientcontactCustomField326": 0,
      "clientcontactClientCode": "1/2365",
      "clientcontactClientName": "Capital Safety",
      "clientcontactClientCategory": "Client",
      "clientcontactEMail": "kwilliams@synergist.co.uk",
      "clientcontactFullName": "{NO NAME IMPORTED}",
      "clientcontactInternalRef": 6535,
      "clientcontactJobTitle": "",
      "clientcontactPhone": ""
    },
    {
      "clientcontactuuid": "E4E9977BF7EAFC46AB3E9D6DBDEE2B0D",
      "clientcontactTimeStampModified": 1532619077,
      "clientcontactRecordVersionNumber": 0,
      "clientcontactCustomField200": "",
      "clientcontactCustomField206": "",
      "clientcontactCustomField210": "0000-00-00",
      "clientcontactCustomField253": "",
      "clientcontactCustomField289": "",
      "clientcontactCustomField314": "",
      "clientcontactCustomField326": 0,
      "clientcontactClientCode": "1/2365",
      "clientcontactClientName": "Capital Safety",
      "clientcontactClientCategory": "Client",
      "clientcontactEMail": "",
      "clientcontactFullName": "firstname",
      "clientcontactInternalRef": 8629,
      "clientcontactJobTitle": "",
      "clientcontactPhone": ""
    }
  ]
}

Note: Feature from API 2.2

Contacts details

Returns a single client contact record

 

Client Contacts

If you wish to access a single client contact record you would normally use the clientcontactdetails model

For more details about using models see Using data models

For clients two models are available:

  • clientcontactslist
  • clientcontactdetails
Parameter Description Example More info
API The API area clientcontacts.json
Action Not required
<General> Parameters described in overview user=user&password=user Overview
Company Company number company=1
Modelstructure Name of model required Modelstructure=clientcontactdetails Using data models
Client contact Specify client contact clientcontact=142
Response Returned data A JSON string containing the data

Example request:

http://<SERVER>/jsonapi/clientcontacts.json?user=user&password=user&version=3.3&company=1&style=modeldata&modelstructure=clientcontactdetails&clientcontact=142

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "clientcontactuuid": "B47402D2DAB94DCAA78E01DF8F07808E",
      "clientcontactTimeStampModified": 1536228215,
      "clientcontactRecordVersionNumber": 12,
      "clientcontactCustomField200": "label 1",
      "clientcontactCustomField206": "a",
      "clientcontactCustomField210": "2013-06-27",
      "clientcontactCustomField253": "",
      "clientcontactCustomField289": "",
      "clientcontactCustomField314": "",
      "clientcontactCustomField326": 0,
      "clientcontactInternalRef": 142,
      "clientcontactClientCode": "1/F001",
      "clientcontactTitle": "- Blank -",
      "clientcontactFirstName": "Babs ",
      "clientcontactMiddleInitials": "",
      "clientcontactName": "Smith",
      "clientcontactFullName": "Babs  Smith",
      "clientcontactBackwardsFullName": "Smith, Babs ",
      "clientcontactJobTitle": "Head of procurement",
      "clientcontactSalutation": "Mrs",
      "clientcontactCellPhone": "01791 663 337",
      "clientcontactDirectTelephone": "01625 777 222",
      "clientcontactOtherPhone": "01625 777 225",
      "clientcontactSecondaryPhone": "01625 777 223",
      "clientcontactClientPhone": "0161 467 1897",
      "clientcontactFax": "01625 777 224",
      "clientcontactEMail": "barb@here.com",
      "clientcontactAdd1": "here.com",
      "clientcontactAdd2": "30, ",
      "clientcontactAdd3": "Shridgley road,",
      "clientcontactAdd4": "Bolington",
      "clientcontactAdd5": "Cheshire",
      "clientcontactAdd6": "SK10 5RD",
      "clientcontactAdd7": "England",
      "clientcontactInactive": false,
      "clientcontactInterests": "test note",
      "clientcontactOptIn": false,
      "clientcontactOptInDate": "0000-00-00",
      "clientcontactOptInTime": "00:00:00",
      "clientcontactOptInUserid": 0,
      "clientcontactOptInBy": "",
      "clientcontactVerifiedBy": "",
      "clientcontactOptInTimezone": "",
      "clientcontactOptInDateUtc": "0000-00-00",
      "clientcontactOptInTimeUtc": "00:00:00",
      "clientcontactOptInSource": "",
      "clientcontactOptInNotes": "",
      "clientcontactOptInVerified": false,
      "clientcontactOptInVerifiedDate": "0000-00-00",
      "clientcontactOptInVerifiedDateUtc": "0000-00-00",
      "clientcontactOptInVerifiedTimezone": "",
      "clientcontactOptInVerifiedTime": "00:00:00",
      "clientcontactOptInVerifiedTimeUtc": "00:00:00",
      "clientcontactOptInVerifiedUserid": 0,
      "clientcontactOptOutCellPhone": false,
      "clientcontactOptOutEmail": false,
      "clientcontactOptOutMail": false,
      "clientcontactOptOutPhone": true,
      "clientcontactOptOutSms": false
    }
  ]
}

Note: Feature from API 2.2

Create

Create a client contact record

 

Create

Parameter Description Example More info
API The API area clientcontacts.json
Action The action to perform action=create
<General> Parameters described in overview user=user&password=user v3.3 Overview
input Client code (mandatory), then name/value pairs "data": [<see example>]
Response Returned data See below

Notes

clientcontactFirstName OR clientcontactName is mandatory. If you supply one, you do not need to supply the other.

Example request:

http://<SERVER>/jsonapi/clientcontacts.json?user=user&password=user&version=3.3&action=create&input={
  "data": [
    {
      "clientcontactClientCode": "1/2365",
      "clientcontactFirstName": "James"
    }
  ]
}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "clientcontactuuid": "4DBB03C727768C4791377A628866A114",
      "clientcontactInternalRef": 8628,
      "clientcontactTimeStampModified": 1532615972,
      "clientcontactRecordVersionNumber": 0
    }
  ]
}

Update

Update a client contact record

 

Update

Parameter Description Example More info
API The API area clientcontacts.json
Action The action to perform action=update
<General> Parameters described in overview user=user&password=user v3.3 Overview
input Client contact Internal Ref (mandatory), then name/value pairs "data": [<see example>]
Response Returned data See below

Response|Returned data|See below

Example request:

http://<SERVER>/jsonapi/clientcontacts.json?user=user&password=user&version=3.3&action=update&input={
  "data": [
    {
      "clientcontactInternalRef": 6535,
      "clientcontactFirstName": "Babs",
      "clientcontactName": "Smith"
    }
  ]
}

Updating a custom field...

http://<SERVER>/jsonapi/clientcontacts.json?user=user&password=user&version=3.3&action=update&input={
  "data": [
    {
      "clientcontactInternalRef": 6535,
      "clientcontactCustomField200": "text1a"
    }
  ]
}

Example response:

{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"responsemessage": "data processed successfully.",
"warningmessage": "",
"success": true,
"data": [
{
"clientcontactInternalRef": 6535,
"clientcontactuuid": "05F73F03055D4F0D942A7E03D0BA09EE",
"clientcontactTimeStampModified": 1544094783,
"clientcontactRecordVersionNumber": 11
}
]
}

Note:

To discover which fields are editable make a call to the "Contacts details" endpoint and specify '&style=modelstructure' see Meta-data

Delete

 

Delete

Parameter Description Example More info
API The API area clientcontacts.json
Action The action to perform action=delete
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
input JSON string input="data": ...
<mandatory> clientcontactInternalRef Client contact internal reference number "clientcontactInternalRef":8631
Response Returned data See below

Example request:

http://<SERVER>/jsonapi/clientcontacts.json?user=user&password=user&version=3.3&action=delete&input={"data":[{"clientcontactInternalRef":8635}]}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "clientcontactInternalRef": 8635,
      "clientcontactuuid": "18220E9DA4761141891ED2C5E55838CF"
    }
  ]
}

Make active

 

Make Active

Parameter Description Example More info
API The API area clientcontacts.json
Action The action to perform action=active_ON
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
Clientcontact Client contact to set active clientcontact=8589
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&action=active_on&clientcontact=8589

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Client active flag changed. ",
  "warningmessage": "",
  "success": true
}

Make inactive

 

Make Inactive

Parameter Description Example More info
API The API area clientcontacts.json
Action The action to perform action=active_OFF
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
Clientcontact Client contact to set inactive clientcontact=8589
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&action=active_off&clientcontact=8589

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Client contact active flag changed. ",
  "warningmessage": "",
  "success": true
}

GDPR opt In

 

Opt in

Parameter Description Example More info
API The API area clientcontacts.json
Action The action to perform action=opt_in
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
Clientcontact Client contact to set inactive clientcontact=8589
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&action=opt_in&clientcontact=8589

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Client contact(s) opt in changed. ",
  "warningmessage": "",
  "success": true
}

GDPR opt out

 

Opt out

Parameter Description Example More info
API The API area clientcontacts.json
Action The action to perform action=dont_opt_in
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
Clientcontact Client contact to set inactive clientcontact=8589
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&action=dont_opt_in&clientcontact=8589

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Client contact(s) opt in changed. ",
  "warningmessage": "",
  "success": true
}

GDPR verify opt-Ins

 

Verify opt ins

Parameter Description Example More info
API The API area clientcontacts.json
Action The action to perform action=verify
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
Clientcontact Client contact to set inactive clientcontact=8589
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&action=verify&clientcontact=8589

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Client contact(s) verified opt in changed. ",
  "warningmessage": "",
  "success": true
}

GDPR don't verify Opt-Ins

 

Don't verify opt ins

Parameter Description Example More info
API The API area clientcontacts.json
Action The action to perform action=dont_verify
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
Clientcontact Client contact to set inactive clientcontact=8589
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&action=dont_verify&clientcontact=8589

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Client contact(s) verified opt in changed. ",
  "warningmessage": "",
  "success": true
}

GDPG - update opt outs

 

Update

Parameter Description Example More info
API The API area clientcontacts.json
Action The action to perform action=update
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
input JSON string input="data": ...
<mandatory>clientcontactInternalRef Client contact internal reference
number "clientcontactInternalRef":8632
<optional>clientcontactOptOutPhone Client contact opt out field
number "clientcontactOptOutPhone":true

Response|Returned data|See below

Example request:

http://192.168.0.239/jsonapi/clientcontacts.json?user=user&password=user&version=3.3&action=update&input={"data":[{"clientcontactInternalRef":142, "clientcontactOptOutPhone":true}]}

Example response:

{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"responsemessage": "data processed successfully.",
"warningmessage": "",
"success": true,
"data": [
{
"clientcontactInternalRef": 142,
"clientcontactuuid": "B47402D2DAB94DCAA78E01DF8F07808E",
"clientcontactTimeStampModified": 1536227626,
"clientcontactRecordVersionNumber": 11
}
]
}

Lookup title

 

Lookup Title

Parameter Description Example More info
API The API area clientcontacts.json
Action The action to perform action=titles
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
company Client contact to set inactive company=1
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&action=titles&company=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 6,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "varTitle": "Mr"
    },
    {
      "varTitle": "Mrs"
    },
    {
      "varTitle": "Miss"
    },
    {
      "varTitle": "Ms"
    },
    {
      "varTitle": "Dr"
    },
    {
      "varTitle": "Prof"
    }
  ]
}

Country

 

Lookup countries

Parameter Description Example More info
API The API area clientcontacts.json
Action The action to perform action=countries
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
company Client contact to set inactive company=1
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&action=countries&company=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 13,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "countryCode": "",
      "countryName": "- Blank -",
      "variable_selected": true,
      "countryTimezoneCode": ""
    },
    {
      "countryCode": "AU",
      "countryName": "Australia",
      "variable_selected": false,
      "countryTimezoneCode": "UTC+10:00A"
    }
  ]
}

Time zone

 

Lookup countries

Parameter Description Example More info
API The API area clientcontacts.json
Action The action to perform action=countries
<General> Parameters described in overview user=user&password=user&version=3.3 v3.3 Overview
company Client contact to set inactive company=1
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/clients.json?user=user&password=user&version=3.3&action=countries&company=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 13,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "countryCode": "",
      "countryName": "- Blank -",
      "variable_selected": true,
      "countryTimezoneCode": ""
    },
    {
      "countryCode": "AU",
      "countryName": "Australia",
      "variable_selected": false,
      "countryTimezoneCode": "UTC+10:00A"
    }
  ]
}

Companies API

 

Company list

List of companies

 

Companies

List of companies

Parameter Description Examples More info
API The API area companies.json
<General> Parameters described in overview user=user&password=user Overview
<input optional>rows: No. of Records &rows=10
<input optional>page No. of Pages &page=1

Example request:
Request to list companies

http://<SERVER>/jsonapi/companies.json?user=user&password=user&version=3.3

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 30,
  "totalpages": 15,
  "responsemessage": "",
  "pagerows": 2,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "companyUuid": "94C589543730DA46A2AA1039D0A0B3E6",
      "companyModified": 1508488482,
      "companyRecordVersionNumber": 7,
      "companyDefault": false,
      "companyNumber": 255,
      "companyName": "AAA Test Company",
      "companyCountry": "UK",
      "companyTimeZoneCode": "UTCA"
    },
    {
      "companyUuid": "549696B601764BED8A80F229A5BC97BA",
      "companyModified": 1520603827,
      "companyRecordVersionNumber": 131,
      "companyDefault": false,
      "companyNumber": 9,
      "companyName": "ArchitectX",
      "companyCountry": "UK",
      "companyTimeZoneCode": "UTCA"
    }
  ]
}

Note: Feature from API 2.2

Company timesheet settings

Company timesheet settings

 

Company timesheet settings

List settings

Parameter Description Examples More info
API The API area companies.json
<General> Parameters described in overview user=user&password=user Overview
<input mandatory>style Style style=modeldata
<input mandatory>modelstructure Model structure modelstructure=timesheetsettings

Example request:

http://<SERVER>/jsonapi/companies.json?version=3.3&style=modeldata&modelstructure=timesheetsettings&company=1&user=user&password=user

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "companyUuid": "F1BECF29058A4FC28437728721F89372",
      "companyModified": 1539774244,
      "companyRecordVersionNumber": 5791,
      "companyHoursLimit": 24,
      "companyGuiTmHidecompletejob": true,
      "companyGuiTmHideinvestment": false,
      "companyGuiTmHidematerial": false,
      "companyGuiTmHideMytaskcomplete": false,
      "companyGuiTmWebShowbudget": false,
      "companyHidejobstages": true,
      "companyHidephasestages": false,
      "companyNumber": 1,
      "companyOvertime1Text": "Evening",
      "companyGuiTmHideovertime1": false,
      "companyOvertime2Text": "W/E",
      "companyGuiTmHideovertime2": false,
      "companyTmHideCompletestage": false,
      "companyTmHideMovestage": false,
      "companyTmWebActivityHide": true,
      "companyGuiTmHideWebWorkdone": false,
      "companyTsForceworkdone": false,
      "companyWorkflowIntegrated": true,
      "companyEstimateTaskdesc": true,
      "companyTsPostSubmitText": "Submit",
      "companyGuiTmWebHideWeekly": false,
      "companyTimesheetapproval": true,
      "companyBaseUnitIsDay": false
    }
  ]
}

Note: Feature from API 2.2

Estimates API

 

Estimates list

Estimates on job or phase

 

Estimates

The Estimates call retrieves a list of estimate lines for a specified job/opp or phase.

Parameter Description Examples More info
API The API area estimates.json
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
<input mandatory>company Company ID &company=1
<input mandatory>type Job or Phase &Job-Number=1/00008303 or &Job-And-Phase=1/00008303.001

Example request:
Request to list quotes on job or phase

http://<SERVER>/jsonapi/estimates.json?user=user&password=user&version=3.3&company=3&Job-Number=3/00001008.A22

Estimate Types

S=Staff (time)
M=Material
B=Bought in (purchases)

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 0,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
   
    {
      "estimateCostActual": 0,
      "estimateCostEstimated": 400,
      "estimateDescription": "-a Rail Engineer 1",
      "estimatePhase": "A22",
      "estimatePhaseDescription": "Artwork phase",
      "estimateQuoteDetail": "",
      "estimateType": "S",
      "estimateUnitsActual": 0,
      "estimateUnitsEstimated": 4
    },
    {
      "estimateCostActual": 0,
      "estimateCostEstimated": 45,
      "estimateDescription": "Subcontract Design Services",
      "estimatePhase": "A22",
      "estimatePhaseDescription": "Artwork phase",
      "estimateQuoteDetail": "",
      "estimateType": "B",
      "estimateUnitsActual": 0,
      "estimateUnitsEstimated": 0
    },
  ]
}

Note: Feature from API 2.2

Expense sheet

 

Using the expense sheet API

Company list

 

Companies List

List of expense sheet companies

Parameter Description Example More info
API The API area expensesheets.json
Action Company List &action=companylist
<General> Parameters described in overview user=user&password=user Overview
Response Returned data A JSON string containing the data

Example request:
Request to list companies

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=companylist

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 3,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "companyUuid": "66619B8544E74787A6C7FA2445289A4A",
      "companyModified": 1532083132,
      "companyRecordVersionNumber": 3572,
      "companyNumber": 1,
      "companyName": "Confidence Creative  Ltd"
    },
    {
      "companyUuid": "59C692B982E14724A871DFAD9B5D4720",
      "companyModified": 1532011544,
      "companyRecordVersionNumber": 125,
      "companyNumber": 2,
      "companyName": "Birmingham"
    },
    {
      "companyUuid": "B7D42AA8659D4CC5ADAF05912371E2B2",
      "companyModified": 1532608034,
      "companyRecordVersionNumber": 363,
      "companyNumber": 11,
      "companyName": "RS International 11"
    }
  ]
}

Supplier list

 

Supplier List

List of expense sheet suppliers

Parameter Description Example More info
API The API area expensesheets.json
Action Supplier list &action=supplierlist
<General> Parameters described in overview user=user&password=user Overview
Company The company context company=1
Response Returned data A JSON string containing the data

Example request:
Request to list suppliers

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&company=1&action=supplierlist

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 2,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "supplieruuid": "CAD8172E927448A8B381FFBC570B7A71",
      "supplierTimeStampModified": 1531309153,
      "supplierRecordVersionNumber": 99,
      "supplierMultiCurrency": true,
      "supplierName": "Mike Palmer Expenses",
      "supplierCode": "1/MJP"
    },
    {
      "supplieruuid": "284FD38FA23E4BFA9434CE9EE98F4203",
      "supplierTimeStampModified": 1531309153,
      "supplierRecordVersionNumber": 96,
      "supplierMultiCurrency": false,
      "supplierName": "User's Expenses",
      "supplierCode": "1/USER"
    }
  ]
}

Create

Create an expense sheet

 

Create

Parameter Description Examples
API The API area expensesheets.json
Action The action to perform action=create
<General> Parameters described in overview user=user&password=user&version=3.3
input JSON string input="data": ...
expensesheetSupplierCode Supplier code "expensesheetSupplierCode": "1/USER"
expensesheetCompany Company "expensesheetCompany":1
Response Returned data See below

Example request:

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=create&input={"data":[{"expensesheetSupplierCode": "1/USER","expensesheetCompany":1}]}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "expensesheetUuid": "BE97A99B42F8614A846BAF29AA4BDC12",
      "expensesheetInternalRef": 690,
      "expensesheetTimestampModified": 1533568088,
      "expensesheetRecordVersionNumber": 0
    }
  ]
}

Update

Update an existing expense sheet

 

Update

Parameter Description Examples
API The API area expensesheets.json
Action The action to perform action=update
<General> Parameters described in overview user=user&password=user&version=3.2
Company The company context company=1
input JSON string input="data": ...
Identifier Data identifying expense sheet to update "expensesheetInternalRef":687
Update data Data to update on expense sheet "expensesheetDescription":"My expense sheet 2"
Response Returned data See below

Example request:

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.2&company=1&action=update&input={"data":[{"expensesheetInternalRef":687,"expensesheetDescription":"My expense sheet  2"}]}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "expensesheetInternalRef": 687,
      "expensesheetUuid": "0356E3479C70BD47B8A26B06E04DD450",
      "expensesheetTimestampModified": 1533201346,
      "expensesheetRecordVersionNumber": 14
    }
  ]
}

Expense sheet status

 

Expense Sheet Status

Parameter Description Examples
API The API area expensesheets.json
Action Status &action=expensesheetstatuses
<General> Parameters described in overview user=user&password=user&version=3.3
Company The company context &company=1

Example request:
Request to list of expense sheet statuses

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetstatuses&company=1

Example response:

{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"totalrows": 6,
"totalpages": 1,
"responsemessage": "",
"pagerows": 0,
"pagenumber": 1,
"success": true,
"data": [
{
"expensesheetSheetStatus": "",
"expensesheetSheetStatusDesc": "- All -",
"variable_selected": false
},
{
"expensesheetSheetStatus": "W",
"expensesheetSheetStatusDesc": "Unsubmitted",
"variable_selected": false
},
{
"expensesheetSheetStatus": "S",
"expensesheetSheetStatusDesc": "Submitted",
"variable_selected": false
},
{
"expensesheetSheetStatus": "A",
"expensesheetSheetStatusDesc": "Processed",
"variable_selected": false
},
{
"expensesheetSheetStatus": "P",
"expensesheetSheetStatusDesc": "Posted",
"variable_selected": false
},
{
"expensesheetSheetStatus": "T",
"expensesheetSheetStatusDesc": "Returned",
"variable_selected": false
}
]
}

Expense sheet print templates

 

Expense Sheet Print Templates

Parameter Description Examples
API The API area expensesheets.json
Action Print templates &action=expensesheetinputprints
<General> Parameters described in overview user=user&password=user&version=3.3
Company The company context &company=1
<input mandatory>Expense ID: Expense Sheet ID &expensesheet=1234
OR
<input mandatory>UUID: Expense Sheet UUID &uuid=1234567489

Example request:
Request to list print files

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetinputprints&company=1&expensesheet=1790

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 2,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "menuClickAction": "EXPENSESHEETINPUTFILE REPORT -1790",
      "menuDefault": false,
      "menuDescription": "**Expense Sheet Template",
      "menuExpanded": false,
      "menuLevelName": "EXPENSESHEETINPUTFILE",
      "menuParameter": "",
      "menuParentName": "",
      "menuSort": "",
      "menuSortDirection": ""
    },
    {
      "menuClickAction": "EXPENSESHEETINPUTFILE REPORT -2227",
      "menuDefault": false,
      "menuDescription": "Expense Sheet Template",
      "menuExpanded": false,
      "menuLevelName": "EXPENSESHEETINPUTFILE",
      "menuParameter": "",
      "menuParentName": "",
      "menuSort": "",
      "menuSortDirection": ""
    }
  ]
}

Expense sheet print

 

Print Expense Sheet

Print Expense sheet to file or browser

Parameter Description Examples
API The API area expensesheets.json
Action Print expense sheet to file or base64 &action=expensesheetinputprint/expensesheetinputfile
<General> Parameters described in overview user=user&password=user&version=3.3
Code Template code -1790
Company The company context &company=1
<input mandatory>Expense ID: Expense Sheet ID &expensesheet=1234

Example requests:

Request to a print expense sheet to base64

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetinputprint -1790&company=1&expensesheet=1790

Request to print expense sheet to the browser

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetinputfile -1790&company=1&expensesheet=1790

Example response for expense sheet print:

{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"responsemessage": "PDF created successfully.",
"warningmessage": "",
"success": true,
"data": [
{
"expensesheetAttachmentBase64Blob": "JVBERi0xLjMKJeLjz9MKNSAwIG9iajw8L0ZpbHRlci9GbGF0ZURlY29kZS9MZW5ndGggNiAwIFI+PgpzdHJlYW0KeXIKPDwvSURbPENCOTExMzlFQzhBNzVGNjZFQTAyOEE3OThDMEQyMDM5PjxDQjkxMTM5RUM4QTc1RjY2RUEwMjhBNzk4QzBEMjAzOT5dL0luZm8gMiAwIFIvUm9vdCAxIDAgUi9TaXplIDc+PgpzdGFydHhyZWYKNDY3CiUlRU9GCg==",
"expensesheetAttachmentFilename": ".PDF"
}
]
}

Expense sheet copy

 

Expense Sheet Copy

Parameter Description Examples
API The API area expensesheets.json
Action Expense Sheet Copy &action=expensesheetcopy
<General> Parameters described in overview user=user&password=user&version=3.3
Company The company context &company=1
<input mandatory>Expense ID: Expense Sheet ID &expensesheet=1234
OR
<input mandatory>UUID: Expense Sheet UUID &uuid=1234567489

Example request:
Request to copy an expense sheet

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetcopy&company=1&expensesheet=1791

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Expense sheet 1791 copied to 1815.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "expensesheetInternalRef": 1815,
      "expensesheetUuid": "A501A22A052E104B8912EB9F73544169"
    }
  ]
}

Expense sheet submit

 

Expense Sheet Submit

Parameter Description Examples
API The API area expensesheets.json
Action Single Expense Sheet Submit &action=expensesheetsubmit
Action Multiple Expense Sheet Submit &action=expensesheetssubmit
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>Expense ID: Expense Sheet ID &expensesheet=1234
OR
<input mandatory>UUID: Expense Sheet UUID &uuid=1234567489

Example requests:
Request to submit an expense sheet

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetsubmit&expensesheet=1791

Request to submit multiple expense sheets

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetssubmit&expensesheet=[1821,1820]

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Expense sheet submitted.",
  "warningmessage": "",
  "success": true
}

Expense sheet approve

 

Expense Sheet Approval

Parameter Description Examples
API The API area expensesheets.json
Action Single Sheet Approval &action=expensesheetapprove
Action Multiple Sheet Approval &action=expensesheetsapprove
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>Expense ID: Expense Sheet ID &expensesheet=1234
OR
<input mandatory>UUID: Expense Sheet UUID &uuid=1234567489

Example requests:
Request to approve an expense sheet

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetapprove&uuid=12345678910

Request to approve multiple expense sheets

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetsapprove&expensesheet=[1821,1820]

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Expense sheet approved.",
  "warningmessage": "",
  "success": true
}

Expense sheet unapprove

 

Expense Sheet Unapprove

Parameter Description Examples
API The API area expensesheets.json
Action Single Expense Sheet Unapprove &action=expensesheetunapprove
Action Multiple Expense Sheet Unapprove &action=expensesheetunapprove
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>Expense ID: Expense Sheet ID &expensesheet=1234
OR
<input mandatory>UUID: Expense Sheet UUID &uuid=1234567489

Example requests:
Request to unapprove an expense sheet

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetunapprove&expensesheet=1234

Request to unapprove multiple expense sheets

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetsunapprove&expensesheet=[1821,1820]

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Expense sheet un-approved.",
  "warningmessage": "",
  "success": true
}

Expense sheet process

 

Expense Sheet Process

Parameter Description Examples
API The API area expensesheets.json
Action Expense Sheet Approval &action=expensesheetprocess
Action Multiple Expense Sheet Approval &action=expensesheetsprocess
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>Expense ID: Expense Sheet ID &expensesheet=1234
OR
<input mandatory>UUID: Expense Sheet UUID &uuid=1234567489

Example requests:
Request to process an expense sheet

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetprocess&expensesheet=1234

Request to process multiple expense sheets

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetsprocess&expensesheet=[1234,4567]

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Expense sheet processed.",
  "warningmessage": "",
  "success": true
}

Expense sheet post

 

Expense Sheet Post

Parameter Description Examples
API The API area expensesheets.json
Action Expense Sheet Posting &action=expensesheetpost
Action Multiple Expense Sheet Posting &action=expensesheetspost
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>Expense ID: Expense Sheet ID &expensesheet=1234
OR
<input mandatory>UUID: Expense Sheet UUID &uuid=1234567489

Example requests:
Request to post an expense sheet

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetpost&expensesheet=1234

Request to post multiple expense sheet

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetspost&expensesheet=[1821,1820]

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Expense sheet posted.",
  "warningmessage": "",
  "success": true
}

Expense sheet all

 

Expense Sheet All

Calling the expenses API with an action of expensesheetall retrieves a response of success/fail status for the request. Expensesheetall performs the following actions on the sheet (approve+process+post) providing that user has the correct permissions to do so.

Parameter Description Examples
API The API area expensesheets.json
Action Expense Sheet All &action=expensesheetall
Action Multiple Expense Sheet All &action=expensesheetsall
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>Expense ID: Expense Sheet ID &expensesheet=1234
OR
<input mandatory>UUID: Expense Sheet UUID &uuid=1234567489

Example requests:
Request to approve/process/post an expense sheet

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetall&expensesheet=1234

Request to approve/process/post multiple expense sheet

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetsall&expensesheet=[1821,1820]

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Expense sheet approved, processed and posted.",
  "warningmessage": "",
  "success": true
}

Expense sheet return

 

Expense Sheet Return

Calling the expenses API with an action of expensesheetreturn retrieves a response of success/fail status for the request. Expensesheetreturn allows a current user with approval rights to return a sheet if it has issues and cannot be approved. If the sheet is A approved, the sheet status gets set to S submitted. If the sheet is not A approved the sheet gets set to T Returned. Lines retain their original statuses.

Parameter Description Examples
API The API area expensesheets.json
Action Expense Sheet Return &action=expensesheetreturn
Action Multiple Expense Sheet Return &action=expensesheetsreturn
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>Expense ID: Expense Sheet ID &expensesheet=1234
OR
<input mandatory>UUID: Expense Sheet UUID &uuid=1234567489

Example requests:
Request to return an expense sheet

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetreturn&expensesheet=1234

Request to return multiple expense sheets

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetsreturn&expensesheet=[1821,1820]

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Expense sheet returned.",
  "warningmessage": "",
  "success": true
}

Expense sheet delete

 

Expense Sheet Delete

Delete an expense sheet

Parameter Description Examples
API The API area expensesheets.json
Action Expense Sheet Delete &action=expensesheetdelete
Action Multiple Expense Sheet Delete &action=expensesheetsdelete
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>Expense ID: Expense Sheet ID &expensesheet=1234
OR
<input mandatory>UUID: Expense Sheet UUID &uuid=1234567489

Example request:
Request to delete an expense sheet

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetdelete&expensesheet=1234

Request to delete multiple expense sheet

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetsdelete&expensesheet=[1821,1820]

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Expense sheet deleted.",
  "warningmessage": "",
  "success": true
}

Expense sheet defaults

 

Expense Sheet Defaults

Parameter Description Examples
API The API area expensesheets.json
Action Expense Sheet Defaults &action=expenselinedefaults
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>Expense ID: Expense Sheet ID &expensesheet=1234
OR
<input mandatory>UUID: Expense Sheet UUID &uuid=1234567489

Example request:
Request to display expense sheet defaults

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expenselinedefaults&expensesheet=1234

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Expense sheet 1234 line defaults.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "expenselineSupplyType": "",
      "expenselineRate": 0,
      "expenselineTaxCode": 0,
      "expenselineSheetInternal": 1786
    }
  ]
}

Expense sheet lines

 

Expense Sheet Lines

Parameter Description Examples
API The API area expensesheets.json
Action Expense Sheet Defaults &action=expensesheetlines
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>Expense ID: Expense Sheet ID &expensesheet=1234
OR
<input mandatory>UUID: Expense Sheet UUID &uuid=1234567489

Example request:
Request to retrieve expense sheet lines

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetlines&expensesheet=1234

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "expenselineApprove": false,
      "expenselineApproversNotes": "",
      "expenselineAttachmentDelete": false,
      "expenselineAttachmentUpload": false,
      "expenselineAttachmentView": false,
      "expenselineClient": "1/P0908",
      "expenselineClientName": "4imprint1",
      "expenselineCopy": true,
      "expenselineDate": "2017-11-14",
      "expenselineDelete": false,
      "expenselineDescription": "Hotel Chocolate",
      "expenselineEdit": false,
      "expenselineHeld": false,
      "expenselineInternal": 3404,
      "expenselineJobDescription": "3768 not two tier",
      "expenselineJobAndPhase": "1/00089025.001",
      "expenselineJobPhaseSimple": "89025.001",
      "expenselineJobPhaseStage": 472,
      "expenselineJobPhaseStageDesc": "stage description test",
      "expenselineJobSimple": "89025",
      "expenselineLineNumber": 1,
      "expenselinePhaseDescription": "3768",
      "expenselineQuantity": 1,
      "expenselineQuery": false,
      "expenselineReject": false,
      "expenselineReSubmit": false,
      "expenselineStatusCode": "A",
      "expenselineStatusDisplay": "Approved",
      "expenselineSubmit": false,
      "expenselineSubmitted": false,
      "expenselineSubmittersNotes": "",
      "expenselineSupplyType": "1/HOT",
      "expenselineSupplytypeDesc": "Hotel Expenses1",
      "expenselineSupplyTypeMileage": false,
      "expenselineTotal": 149.99,
      "expenselineRate": 149.99,
      "expenselineValuesEdit": false,
      "expenselineTaxCode": 1,
      "expenselineTaxAmount": 25,
      "expenselineStageCode": "",
      "expenselineStageDescription": ""
    }
  ]
}

Expense sheet list

 

Expense Sheet List

Parameter Description Examples
API The API area expensesheets.json
Action Expense Sheet List &action=expensesheetlist
<General> Parameters described in overview user=user&password=user&version=3.2
<input mandatory>Expense ID: Expense Sheet ID &expensesheet=1234
OR
<input mandatory>UUID: Expense Sheet UUID &uuid=1234567489

Example requests:
Request to list an expense sheet

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetlist&expensesheet=1234

Request to list multiple expense sheets

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.3&action=expensesheetlist&company=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "expensesheetApprove": false,
      "expensesheetApproved": 0,
      "expensesheetCopy": true,
      "expensesheetCreatedDateTime": "14/10/2014 1:46pm",
      "expensesheetDate": "2014-10-14",
      "expensesheetDateTime": "14/10/2014",
      "expensesheetDelete": true,
      "expensesheetDescription": "",
      "expensesheetGross": 249.09,
      "expensesheetHeld": 0,
      "expensesheetInternalRef": "1234",
      "expensesheetLines": 1,
      "expensesheetLinesApproved": 0,
      "expensesheetLinesHeld": 0,
      "expensesheetLinesQuery": 0,
      "expensesheetLinesReject": 0,
      "expensesheetLinesSubmitted": 1,
      "expensesheetPost": false,
      "expensesheetProcess": false,
      "expensesheetQueried": 0,
      "expensesheetRejected": 0,
      "expensesheetReturn": false,
      "expensesheetStatusCode": "unsubmitted",
      "expensesheetStatusDateTime": "00/00/0000",
      "expensesheetSubmit": false,
      "expensesheetSubmitted": 249.09,
      "expensesheetTheSupplierCode": "1/jg",
      "expensesheetSupplierName": "Josephine Grantx",
      "expensesheetUnApprove": false,
      "array_expensesheetvat": 32.49
    }
  ]
}

Expense lines

 

Using the expense lines API

Example request:

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.3
Action Company List &action=companylist
<input optional>rows: Number of records &rows=1
<input optional>page: Number of pages &page=1
http://<SERVER>/jsonapi/expenselines.json?user=admin&password=admin&version=3.3&company=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1785,
  "totalpages": 893,
  "responsemessage": "",
  "pagerows": 2,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "expenselineUuid": "478D08BA8E014F0F8BF3B76C3CE4C5B3",
      "expenselineTimestampModified": 1385820072,
      "expenselineRecordVersionNumber": 0,
      "expenselineStatus": "Approved",
      "expenselineInternal": 19,
      "expenselineDescription": "Mileage to and from Manchester",
      "expenselineSupplyType": "1/MIL",
      "expenselineSupplyTypeDescription": "Mileagex",
      "expenselineDate": "2002-06-18",
      "expenselineJobAndPhase": "1/00000464.000",
      "expenselineTotal": 9.6,
      "expenselineTaxAmount": 1.43,
      "expenselineStatusCode": "A",
      "expenselineJobAndPhaseNumberSimple": "464.000",
      "expenselineClientCode": "1/A001",
      "expenselineClient": "Proton Cars plc"
    },
    {
      "expenselineUuid": "D76BBC64CA394DAF969684464D2AA66E",
      "expenselineTimestampModified": 1385820072,
      "expenselineRecordVersionNumber": 0,
      "expenselineStatus": "Approved",
      "expenselineInternal": 20,
      "expenselineDescription": "Hotel Expenses night in Manchester",
      "expenselineSupplyType": "1/HOT",
      "expenselineSupplyTypeDescription": "Hotel Expenses1",
      "expenselineDate": "2002-06-18",
      "expenselineJobAndPhase": "1/00000464.000",
      "expenselineTotal": 75,
      "expenselineTaxAmount": 11.17,
      "expenselineStatusCode": "A",
      "expenselineJobAndPhaseNumberSimple": "464.000",
      "expenselineClientCode": "1/A001",
      "expenselineClient": "Proton Cars plc"
    }
  ]
}

Client list

 

Client List

Returns a selection of valid clients for expenses based on a small list model.

Parameter Description Example More info
API The API area expenselines.json
Action Client List &action=clientslist
<General> Parameters described in overview user=user&password=user Overview
Company Company number company=1
Response Returned data A JSON string containing the data

Example request:
Request to list clients

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.3&action=clientslist&company=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 170,
  "totalpages": 85,
  "responsemessage": "",
  "pagerows": 2,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "clientUuid": "D1C36202C5824E35B9AAE1F50DA90B0B",
      "clientTimeStampModified": 1519135641,
      "clientRecordVersionNumber": 121,
      "clientCode": "1/A001",
      "clientName": "Proton Cars plc"
    },
    {
      "clientUuid": "47CC0AD8205C41AE83AED401F57B4736",
      "clientTimeStampModified": 1519135641,
      "clientRecordVersionNumber": 195,
      "clientCode": "1/BLOGGS",
      "clientName": "Barclaycard Merchant 3"
    }
  ]
}

Jobs list

 

Jobs List

Returns a selection of valid jobs for expenses based on a small list model.

Parameter Description Example More info
API The API area expenselines.json
Action Client List &action=jobslist
<General> Parameters described in overview user=user&password=user Overview
Company Company number company=1
Response Returned data A JSON string containing the data

Example request:
Request to list jobs

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.3&action=jobslist&company=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1065,
  "totalpages": 533,
  "responsemessage": "",
  "pagerows": 2,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "jobUuid": "EC81487FEAA04F9589FA7D9F9143822A",
      "jobTimeStampModified": 1517498850,
      "jobRecommendedVersionNumber": 104,
      "jobDescription1stLine": "Here is the first line of the job description",
      "jobNumber": "1/00000802",
      "jobNumberSimple": "802"
    },
    {
      "jobUuid": "15362AE5B403452E8672B5EA71113A87",
      "jobTimeStampModified": 1489080036,
      "jobRecommendedVersionNumber": 62,
      "jobDescription1stLine": "Test Global Description at Company level",
      "jobNumber": "1/00000801",
      "jobNumberSimple": "801"
    }
  ]
}

Phase list

 

Phase List

Returns a selection of valid phases for expenses based on a small list model.

Parameter Description Example More info
API The API area expenselines.json
Action Client List &action=phaseslist
<General> Parameters described in overview user=user&password=user Overview
Company Company number company=1
Response Returned data A JSON string containing the data

Example request:
Request to list phases

http://<SERVER>/jsonAPI/expenselines.json?user=admin&password=admin&version=3.3&action=phaseslist&company=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 2667,
  "totalpages": 1334,
  "responsemessage": "",
  "pagerows": 2,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "phaseuuid": "DCFA24E298454AD3AB38E0D1BC651F65",
      "phaseTimeStampModified": 1513252086,
      "phaseRecordVersionNumber": 90,
      "phasePhaseDescription1stLine": "Print",
      "phaseJobDescription1stLine": "News-letter re-design",
      "phaseJobAndPhase": "1/00000522.005",
      "phasePhase": "005",
      "phaseDisplayOrder": "",
      "phaseJobNumberSimple": "522"
    },
    {
      "phaseuuid": "41A35CD8F19E42AC814C5AAE87A68938",
      "phaseTimeStampModified": 1489080066,
      "phaseRecordVersionNumber": 50,
      "phasePhaseDescription1stLine": "Production",
      "phaseJobDescription1stLine": "News-letter re-design",
      "phaseJobAndPhase": "1/00000522.008",
      "phasePhase": "008",
      "phaseDisplayOrder": "",
      "phaseJobNumberSimple": "522"
    }
  ]
}

Stages list

 

Stages list

Returns a selection of valid stages for expenses based on a small list model.
(action can also be called 'workflowslist')

Parameter Description Example More info
API The API area expenselines.json
Action Stage List &action=stageslist
<General> Parameters described in overview user=user&password=user Overview
Company Company number company=1
Response Returned data A JSON string containing the data

Example requests:

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.3&action=stageslist&company=1&jobphase=1/00SCP974.001

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 4,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "stageUuid": "D1C4A46A4ED9EF459BB15F1E8CF4B542",
      "stageTimeStampModified": 1524652924,
      "stageRecordVersionNumber": 1,
      "stageCustomField284": "",
      "stageCustomField293": false,
      "stageCustomField294": "",
      "stageCustomField295": "0000-00-00",
      "stageCode": "1/W0000000983",
      "stageDescription": "Concept Refinements",
      "stageSequence": 4,
      "stageJobNumber": "1/00SCP974",
      "stageJobAndPhase": "1/00SCP974.001"
    },
    {
      "stageUuid": "5FF45215CB72B141851770CCA9F95292",
      "stageTimeStampModified": 1524652924,
      "stageRecordVersionNumber": 1,
      "stageCustomField284": "",
      "stageCustomField293": false,
      "stageCustomField294": "",
      "stageCustomField295": "0000-00-00",
      "stageCode": "1/W0000000982",
      "stageDescription": "Concept production",
      "stageSequence": 3,
      "stageJobNumber": "1/00SCP974",
      "stageJobAndPhase": "1/00SCP974.001"
    },
    {
      "stageUuid": "1896DE9C2C223146856DB9A02390D775",
      "stageTimeStampModified": 1524652923,
      "stageRecordVersionNumber": 1,
      "stageCustomField284": "",
      "stageCustomField293": false,
      "stageCustomField294": "",
      "stageCustomField295": "0000-00-00",
      "stageCode": "1/W0000000981",
      "stageDescription": "Concept Design",
      "stageSequence": 2,
      "stageJobNumber": "1/00SCP974",
      "stageJobAndPhase": "1/00SCP974.001"
    },
    {
      "stageUuid": "75C825E30BD6E0469881458505E369E4",
      "stageTimeStampModified": 1524653823,
      "stageRecordVersionNumber": 2,
      "stageCustomField284": "",
      "stageCustomField293": false,
      "stageCustomField294": "",
      "stageCustomField295": "0000-00-00",
      "stageCode": "1/W0000000980",
      "stageDescription": "Concept Approval",
      "stageSequence": 1,
      "stageJobNumber": "1/00SCP974",
      "stageJobAndPhase": "1/00SCP974.001"
    }
  ]
}

Create

 

Create

Parameter Description Examples
API The API area expenselines.json
Action The action to perform action=create
<General> Parameters described in overview user=user&password=user&version=3.3
input JSON string input="data": ...
expenselineSheetInternal Expense sheet internal ID to add expense line to "expenselineSheetInternal":691
expenselineTotal Total amount "expenselineTotal":382
expensesheetSupplierCode Supplier code "expensesheetSupplierCode": "1/USER"
expenselineJobAndPhase Job and phase number "expenselineJobAndPhase":"1/BG12.001"
expenselineSupplyType Supply type "expenselineSupplyType":"1/3D"
expenselineDescription Description "expenselineDescription":"this is a description"
expenselineDate Date "expenselineDate":"2018-08-08"
Response Returned data See below

Example request:

http://<SERVER>/jsonapi/expenselines.json?user=user&password=user&version=3.3&action=create&input={
  "data": [
    {
      "expenselineSheetInternal": 691,
      "expenselineTotal": 382,
      "expensesheetSupplierCode": "1/USER",
      "expenselineJobAndPhase": "1/BG12.001",
      "expenselineSupplyType": "1/3D",
      "expenselineDescription": "this is a description",
      "expenselineDate": "2018-08-08"
    }
  ]
}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "expenselineRate": 0,
      "expenselineCurrencyRate": 0,
      "expenselineCurrencyTotal": 382,
      "expenselineTaxCode": 20,
      "expenselineTaxAmount": 63.67,
      "expenselineDescription": "this is a description",
      "expenselineUuid": "13B88E4404B5984ABC8102B22E485265",
      "expenselineInternal": 2297,
      "expenselineTimestampModified": 1534241420,
      "expenselineRecordVersionNumber": 0
    }
  ]
}

Update

 

Update

Parameter Description Examples
API The API area expensesheets.json
Action The action to perform action=update
<General> Parameters described in overview user=user&password=user&version=3.3
Company The company context company=1
input JSON string input="data": ...
Identifier Data identifying expense sheet to update "expenselineInternal":2288
Update data Data to update on expense sheet "expenselineTotal":100
Response Returned data See below

Example request:

http://<SERVER>/jsonapi/expenselines.json?user=user&password=user&version=3.3&action=update&input={
  "data": [
    {
      "expenselineInternal": 2288,
      "expenselineTotal": 100
    }
  ]
}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true
}

Exchange rates/currency codes

 

Exchange rates/Currency Codes

Returns a selection of currency records

Parameter Description Examples
API The API area expenselines.json
Action Currency Codes &action=currencycodes
Action Exchange Rates &action=exchangerates
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>company: Company ID &company=1
<input optional>active: Active Status &active=on/Y/true/1/yes

Example requests:
Request to list exchange rates/currency codes

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.3&action=exchangerates&company=1
http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.3&action=currencycodes&company=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 5,
  "totalpages": 5,
  "responsemessage": "",
  "pagerows": 1,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "currencyUuid": "C69AD1001258446E8ED1F77C661B5B95",
      "currencyTimestampModified": 1519226996,
      "currencyRecordVersionNumber": 3,
      "currencyCurrencyName": "Dirhams",
      "currencyCode": "1/AED",
      "currencySymbol": "AED",
      "currencyExchangeRate": 4.74,
      "currencyPurchase": 4.74
    }
  ]
}

Supply types

 

Supply types

Returns list of valid supply types

Parameter Description Examples
API The API area expenselines.json
Action Supply Types &action=supplytypes
Action Supply Type Lists &action=supplytypeslist
<General> Parameters described in overview user=user&password=user&version=3.2
<input mandatory>company: Company ID &company=1
<input optional>supplier: Supplier &supplier=ABC
<input optional>jobphase: Job Phase &jobphase=1/0001000.001
<input optional>supplytype: Supplier Type &supplytype=pen

Example request:
Request to list supply types

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.2&action=supplytypes&company=1
http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.2&action=supplytypeslist&company=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 16,
  "totalpages": 8,
  "responsemessage": "",
  "pagerows": 2,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "supplytypesUuid": "D91524692ADCCB4B863D155FD9A5B1B3",
      "supplytypesTimestampModified": 1519836024,
      "supplytypesRecordversionnumber": 5,
      "supplytypesDescription": "Expense info 1",
      "supplytypesMileage": false,
      "supplytypesRate": 0,
      "supplytypesSupplyType": "1/666",
      "supplytypesVatcode": 1
    },
    {
      "supplytypesUuid": "B72F300B76724DD6A4E0F10DB1080E69",
      "supplytypesTimestampModified": 1392042573,
      "supplytypesRecordversionnumber": 3,
      "supplytypesDescription": "Expense info 2",
      "supplytypesMileage": false,
      "supplytypesRate": 0,
      "supplytypesSupplyType": "1/HOT",
      "supplytypesVatcode": 0
    }
  ]
}

Attachment view/print

 

Attachments View/print

View an attachment from an expense line

Parameter Description Examples
API The API area expenselines.json
Action Remove Attachments &action=attachmentview
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>company: Company ID &company=1
<input mandatory>expenseline: Expense Line ID &expenseline=1234
OR
<input mandatory>UUID: Expense Line UUID &uuid=1234

Example request:
Request to view attachment

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.3&company=1&action=attachmentview&expenseline=3404

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "attachmentUuid": "96718E76A5624745B535E0371C6B4B1F",
      "attachmentTimestampModified": 1523968717,
      "attachmentRecordVersionNumber": 0,
      "attachmentOriginalFilename": "office.txt",
      "attachmentBase64": "ZnJvbSBUOlxTdXBwbGllclxNaWNyb3NvZnRcT2ZmaWNlIDIwMTYgUHJvZmVzc2lvbmFsXCAgVGhlIGxpY=",
      "attachmentContentDisposition": "attachment; filename=\"doc.txt\"",
      "attachmentContentType": "application"
    }
  ]
}

Attachment remove

 

Attachments Remove

Remove an attachment from an expense line

Parameter Description Examples
API The API area expenselines.json
Action Remove Attachments &action=attachmentremove
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>company: Company ID &company=1
<input mandatory>expenseline: Expense Line ID &expenseline=1234
OR
<input mandatory>UUID: Expense Line UUID &uuid=1234

Example request:
Request to remove attachments

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.3&action=attachmentremove&company=1&expenseline=3404

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Expense line attachment deleted.",
  "warningmessage": "",
  "success": true
}

Attachment open

 

Attachments Open

Will attempt to download the attachment

Parameter Description Examples
API The API area expenselines.json
Action Open Attachments &action=attachmentfile
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>company: Company ID &company=1
<input mandatory>expenseline: Expense Line ID &expenseline=1234
OR
<input mandatory>UUID: Expense Line UUID &uuid=1234

Example request:
Request to open attachments

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.3&action=attachmentfile&company=1&expenseline=3404

Attachment upload

 

Attachments Upload

Upload an attachment

Parameter|Description|Examples

  • --|- --|- --
    API|The API area|expenselines.json
    Action|Update|&action=update
    <General>|Parameters described in overview|user=user&password=user&version=3.3
    <input>company: |Company ID|&company=1
    <input>input: |Base64|&input={"data":[{"variable_AttachmentBase64":"SEVSRSBJUyBTT01FIFRFWFQNCg==","variable_AttachmentFileName":"Receipt.jpg","expenselines_expenselineinternal":"3398"}
    |OR|
    <input mandatory>UUID: |Expense Line UUID|&uuid=1234

Example request:
Request to upload attachments

http://<SERVER>/jsonapi/expenselines.json?action=update&input={
  "data": [
    {
      "variable_AttachmentBase64": "SEVSRSBJUyBTT01FIFRFWFQNCg==",
      "variable_AttachmentFileName": "Receipt.jpg",
      "expenselines_expenselineinternal": "3398"
    }
  ]
}&version=3.3&password=user&user=user

Note: Before calling this endpoint you should first ascertain if the Synergist system being accessed is using Amazon S3 to attachment storage. This can be determined by using the System API. If S3 is being used it is not necessary to pass the Base64 string. In this case the response will include the data required to perform a PUT using Amazon's API

Example response:

AMAZON S3

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "attachmentS3UrlGet": "https://test.com/Receipt_5776.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ7FWVT3VTEABFH7Q%2F20180424%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20180424T092951Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=fb1a23040da16611f25f91308ec00fffc4aa79e3f1a77e07c1ea2aee286870e9",
      "attachmentS3UrlPut": "https://test.com/Receipt_5776.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ7FWVT3VTEABFH7Q%2F20180424%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20180424T092951Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=34fab0f843fc50a972590dfee78c4480847af6145ff10be029fdae31986ec878",
      "expenselineInternal": 3398,
      "expenselineUuid": "6FE77CC7A93FCF4ABF5D8F88A51FDAEB",
      "expenselineTimestampModified": 1504866434,
      "expenselineRecordVersionNumber": 6
    }
  ]
}

NON-S3

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "expenselineInternal": 3471,
      "expenselineUuid": "DEA70BB37E5A3E4097CECAEAFBE11C18",
      "expenselineTimestampModified": 1524654427,
      "expenselineRecordVersionNumber": 2
    }
  ]
}

Attachment view

 

Attachments View

View an attachment

Parameter Description Examples
API The API area expenselines.json
Action Attachment View &action=attachmentview
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>expenseline: Expense Line ID &expenseline=1234
OR
<input mandatory>UUID: Expense Line UUID &uuid=1234

Example request:
Request to view attachments

http://<SERVER>/jsonapi/expenselines.json?action=attachmentview&version=3.3&password=user&user=user&expenseline=3395

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "attachmentUuid": "1E568E7B18B9D745BE82F5A71DEB87DA",
      "attachmentTimestampModified": 1504864034,
      "attachmentRecordVersionNumber": 0,
      "attachmentOriginalFilename": "Receipt.jpg",
      "attachmentBase64": "/9j/4AAQSkZJRg873fdQOqV3YdUP3RIG2u+IA4umtv2Kqq+u0JJLy49lm+QncklJtPx6qshbV9dJP8NhEFclTVrt88vwrlFMTskG4+oIjA6rU8L3tpeaaDa1HCi0QGOn4PAnIHhO1Slp9vbvr1A0MAnwCvJ7bhko6TyyxxljnyjyGwr6Tp/F1jolV5/EVbpjG/EQTLhsV7jxlTt9E4FvLi3olz6Ns+oxoEuc4NJHkmV8ncT6yK3tr0q6saFa4o2N3Sq3D6bC4MYHgkkjsJ3XcmjbnrgJHDj2TAcSduiRPXEryncMgn+/ZAuI3iEDtHcoOOY/RQCmRKbI/MfslzCDMj6Icrvy/0VQNOCScGJ7IziNsqAkzPUding5kIgVevOPTZUsgHb7K214ye56qnbPN0k+F0RCQTyie8//2Q==",
      "attachmentContentDisposition": "attachment; filename=\"Receipt.jpg\"",
      "attachmentContentType": "application"
    }
  ]
}

Expense line copy

 

Copy expense line

Parameter Description Examples
API The API area expenselines.json
Action Open Attachments &action=expenselinecopy
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>company: Company ID &company=1
<input mandatory>expenseline: Expense Line ID &expenseline=1234
OR
<input mandatory>UUID: Expense Line UUID &uuid=1234

Example request:
Request to copy expense line

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.3&action=expenselinecopy&company=1&expenseline=3404

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Expense line 3468 created.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "expenselineSheetInternal": 1822,
      "expenselineInternal": 3468,
      "expenselineUuid": "832036984DD46B4DAA2F9A5C9B753A21"
    }
  ]
}

Expense line submit

 

Submit expense line

Parameter Description Examples
API The API area expenselines.json
Action Is Submittable &action=expenselinesubmittable
Action Submit &action=expenselinesubmit
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>company: Company ID &company=1
<input mandatory>expenseline: Expense Line ID &expenseline=1234
OR
<input mandatory>UUID: Expense Line UUID &uuid=1234

Example request:
Request to submit expense line

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.3&action=expenselinesubmittable&company=1&expenseline=3404

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Expense line set to submitted.",
  "warningmessage": "",
  "success": true
}

Expense line approve

 

Approve expense line

Parameter Description Examples
API The API area expenselines.json
Action Approve &action=expenselineapprove
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>company: Company ID &company=1
<input mandatory>expenseline: Expense Line ID &expenseline=1234
OR
<input mandatory>UUID: Expense Line UUID &uuid=1234

Example request:
Request to approve expense line

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.3&action=expenselineapprove&company=1&expenseline=3404

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Expense line approved.",
  "warningmessage": "",
  "success": true
}

Expense line hold

 

Hold expense line

Parameter Description Examples
API The API area expenselines.json
Action Hold &action=expenselinehold
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>company: Company ID &company=1
<input mandatory>expenseline: Expense Line ID &expenseline=1234
OR
<input mandatory>UUID: Expense Line UUID &uuid=1234

Example request:
Request to hold expense line

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.3&action=expenselinehold&company=1&expenseline=3404

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Expense line held.",
  "warningmessage": "",
  "success": true
}

Expense line query

 

Query expense line

Parameter Description Examples
API The API area expenselines.json
Action Query &action=expenselinequery
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>company: Company ID &company=1
<input mandatory>expenseline: Expense Line ID &expenseline=1234
OR
<input mandatory>UUID: Expense Line UUID &uuid=1234
<input optional>queryrejectreason: Reason for query &queryrejectreason=rejectedreason

Example request:
Request to query expense line

http://<SERVER>/jsonapi/expenselines.json?user=user&password=user&version=3.3&action=expenselinequery&company=1&expenseline=3462&queryrejectreason=rejectedreason

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Expense line queried.",
  "warningmessage": "",
  "success": true
}

Expense line resubmit

 

Resubmit expense line

NB: Expense Sheet must be processed and the Expense Line must be queried before it can be resubmitted

Parameter Description Examples
API The API area expenselines.json
Action Re-Submit &action=expenselineresubmit
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>company: Company ID &company=1
<input mandatory>expenseline: Expense Line ID &expenseline=1234
OR
<input mandatory>UUID: Expense Line UUID &uuid=1234
<input optional>resubmitreason: Reason for resubmit &resubmitreason=rejectedreason

Example request:
Request to resubmit expense line

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.3&action=expenselineresubmit&company=1&expenseline=3466&resubmitreason=resubmitreason

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Expense line re-submitted.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "expensesheetInternalRef": 1824,
      "expensesheetUuid": "A500CC58C6D2C741A3B02674BE2B3576"
    }
  ]
}

Expense line reject

 

Reject expense line

Parameter Description Examples
API The API area expenselines.json
Action Re-Submit &action=expenselinereject
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>company: Company ID &company=1
<input mandatory>expenseline: Expense Line ID &expenseline=1234
OR
<input mandatory>UUID: Expense Line UUID &uuid=1234
<input optional>queryrejectreason: Reject reason &queryrejectreason=rejectedreason

Example request:
Request to reject expense line

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.3&action=expenselinereject&company=1&expenseline=3404&queryrejectreason=rejectedreason

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Expense line rejected.",
  "warningmessage": "",
  "success": true
}

Expense sheet line

 

Expense Sheet Line

Parameter Description Examples
API The API area expenselines.json
Action List &action=expensesheetline
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>company: Company ID &company=1
<input mandatory>expenseline: Expense Line ID &expenseline=1234
OR
<input mandatory>UUID: Expense Line UUID &uuid=1234

Example request:
Request to list expense sheet line

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.3&action=expensesheetline&company=1&expenseline=3404

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "expenselineApprove": false,
      "expenselineApproversNotes": "",
      "expenselineAttachmentDelete": false,
      "expenselineAttachmentUpload": true,
      "expenselineAttachmentView": false,
      "expenselineClientName": "999 license",
      "expenselineCopy": true,
      "expenselineDate": "2017-05-26",
      "expenselineDelete": true,
      "expenselineDescription": "josephine grant",
      "expenselineEdit": true,
      "expenselineHeld": false,
      "expenselineInternal": 3313,
      "expenselineJobDescription": "Stage estimate test",
      "expenselineJobAndPhase": "1/00088685.001",
      "expenselineJobPhaseSimple": "88685.001",
      "expenselineJobPhaseStage": 0,
      "expenselineJobPhaseStageDesc": "",
      "expenselineJobSimple": "88685",
      "expenselineLineNumber": 1,
      "expenselinePhaseDescription": "Stage estimate test",
      "expenselineQuantity": 1,
      "expenselineQuery": false,
      "expenselineReject": false,
      "expenselineReSubmit": false,
      "expenselineStatusCode": "A",
      "expenselineStatusDisplay": "Approved",
      "expenselineSubmit": false,
      "expenselineSubmitted": false,
      "expenselineSubmittersNotes": "",
      "expenselineSupplyType": "1/JG",
      "expenselineSupplytypeDesc": "josephine grant",
      "expenselineSupplyTypeMileage": false,
      "expenselineTotal": 23,
      "expenselineRate": 23,
      "expenselineValuesEdit": true,
      "expenselineTaxCode": 1,
      "expenselineTaxAmount": 3.83,
      "expenselineStageCode": "",
      "expenselineStageDescription": ""
    }
  ]
}

Expense line delete

 

Delete Expense Line

Parameter Description Examples
API The API area expenselines.json
Action Delete &action=expenselinedelete
<General> Parameters described in overview user=user&password=user&version=3.3
<input mandatory>company: Company ID &company=1
<input mandatory>expenseline: Expense Line ID &expenseline=1234
OR
<input mandatory>UUID: Expense Line UUID &uuid=1234

Example requests:
Request to delete expense line

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.3&action=expenselinedelete&company=1&expenseline=3404

Request to delete multiple expense line

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.3&action=expenselinesdelete&company=1&expenseline=[3404,1234]
{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "",
  "warningmessage": "1 of 2 Expense line deleted.",
  "success": true
}

Job API

This API allows for the creating of a NEW job based on an existing job template. Some of the fields in the job template can be overridden by passing additional parameters.

 

Jobs list

Returns one or more job records

 

List jobs

If you wish to access multiple job records you would normally use the jobslist model

For more details about using models see Using data models

For jobs two models are available:

  • jobslist
  • jobdetails

If a list of records is required a ‘view’ parameter should be passed. If no ‘view’ parameter is passed all records for the synergist company are returned.

Parameter Description Example More info
API The API area jobs.json
Action Not required
<General> Parameters described in overview user=user&password=user Overview
Company Company number company=1
Modelstructure Name of model required Modelstructure=jobslist Using data models
View Stored filter applied view=-1303 Using views
Sort Change the view's default sort order sort=CLIENT Sorting
<Filters> Filter by a key field Filters
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonapi/jobs.json?company=1&version=3.3&user=user&password=user&company=1&style=modeldata&modelstructure=jobslist&view=-1303&rows=2&page=1

or with a timestamp filter ...

This will return any job records created/modified in the past 15 mins.

http://<SERVER>/jsonapi/jobs.json?company=1&version=3.3&user=user&password=user&company=1&style=modeldata&modelstructure=jobslist&timestampoffsetfrom=-900

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 405,
  "totalpages": 203,
  "responsemessage": "",
  "pagerows": 2,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "jobUuid": "504EB2C781EA457D8D54B65E26CF739F",
      "jobTimeStampModified": 1519131664,
      "jobRecommendedVersionNumber": 236,
      "jobDescription1stLine": "Web site",
      "jobCustomField185": "",
      "jobCustomField290": "0000-00-00",
      "jobThermProgress": "",
      "jobThermValue": 0,
      "jobThermWhitePoint": 110,
      "jobOrderNumber": "1",
      "jobContactFullName": "",
      "jobHandlerFullName": "",
      "jobClientCode": "1/MULTI",
      "jobClientName": "Multi Store",
      "jobCompleted": false,
      "jobDateIn": "2004-03-02",
      "jobDateDue": "2004-03-02",
      "jobNumber": "1/00SCP974",
      "jobNumberSimple": "SCP974",
      "jobStatus": 2,
      "jobStatusDescription": "Live",
      "jobJobtypeDescription": "",
      "jobPriorityDescription": "",
      "jobCurrencyCode": "1/DOL",
      "jobExchangeRate": 1.5
    },
    etc. etc.
    {

Job details

 

Job Details

Parameter Description Examples More info
API The API area jobs.json
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
Company The company context company=1
Job Job Number job=1/00000510
Style Output style style=modeldata
Structure Model Structure modelstructure=jobdetails Using data models
Response Returned data See below

Example request:

http://<SERVER>/jsonapi/jobs.json?user=user&password=user&company=1&&style=modeldata&modelstructure=jobdetails&job=1/00000510&version=3.3

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "jobUuid": "57F47F438D6A49489FD50D25BFC4509E",
      "jobTimeStampModified": 1520003029,
      "jobRecommendedVersionNumber": 133,
      "jobDescription1stLine": "Letterhead - re-design",
      "jobWonBy": "",
      "jobCustomField290": "0000-00-00",
      "jobCurrencySymbol": "KW",
      "jobCurrency": "Kuwaiti dinar",
      "jobExchangeRate": 0.45,
      "jobClientCode": "1/WARD",
      "jobClientName": "Ward  Homes",
      "jobComments": "",
      "jobCurQuotedPrice": 0,
      "jobDateIn": "2001-09-11",
      "jobDateDue": "2001-10-11",
      "jobCompletedDate": "0000-00-00",
      "jobDescription": "Letterhead - re-design",
      "jobNumber": "1/00000510",
      "jobStatus": 1,
      "jobStatusDescription": "Quote",
      "jobLeadClosedDate": "2016-11-17",
      "jobOrderNumber": "",
      "jobQuotedPrice": 0,
      "jobReferenceJob": "",
      "jobTaxCode": 3,
      "jobOppCurrentStatus": "",
      "jobOppLeadRating": "",
      "jobOppSource": "",
      "jobOppWeighting": 75,
      "jobStageNotes": "",
      "jobHandlerUserID": 0,
      "jobHandlerFullName": "",
      "jobHandlerTeam": "",
      "jobTeamDescription": "",
      "jobCampaignNo": 0,
      "jobCampaignDescription": "",
      "jobContactInternalRef": 26,
      "jobContactFullName": "Russell Tomes a",
      "jobCurrencyCode": "1/KWD",
      "jobJobtypeCode": "1/WEB",
      "jobJobtypeDescription": "Website Design",
      "jobProjectCode": 68,
      "jobProjectDescription": "Manchester Site",
      "jobStagePriority": 10,
      "jobPriorityDescription": "",
      "jobWorkflowCode": "",
      "jobCurrentStageDescription": ""
    }
  ]
}

Costs and charges

List cost transactions against a job

 

Job costs & charges

Parameter Description Examples More info
API The API area jobs.json
Action List cost transactions against a job action=costscharges
<General> Parameters described in overview user=user&password=user Overview
Job Job number job=1/00000519
Response Returned data See below

Example request:
Request costs and charges data

http://<SERVER>/jsonapi/jobs.json?job=1/00000519&user=user&password=user&version=3.3&action=costscharges

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 31,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "costCharge": 90,
      "costChargeRate": 90,
      "costChargeRateOT1": 90,
      "costChargeRateOT2": 90,
      "costChargeCode": "1/CT",
      "costCostRate": 0,
      "costCostRateOT1": 0,
      "costCostRateOT2": 0,
      "costCostTotal": 0,
      "costCurrencyBuy": "",
      "costCurrencyBuyDescription": "",
      "costCurrencyBuyRate": 1,
      "costCurrencyCharge": 90,
      "costCurrencyChargeRate": 90,
      "costCurrencyChargeRateNormal": 90,
      "costCurrencyChargeRateOT1": 90,
      "costCurrencyChargeRateOT2": 90,
      "costCurrencyRecommendedCharge": 90,
      "costCurrencyRecommendedChargeOT1": 90,
      "costCurrencyRecommendedChargeOT2": 90,
      "costCurrencySell": "",
      "costCurrencySellDescription": "",
      "costCurrencySellRate": 1,
      "costDate": "2014-01-07",
      "costDescription": "Consultancy",
      "costWorkDone": "",
      "costResourceName": "Arthur Spring",
      "costPhase": "002",
      "costQuantity": 1,
      "costQuantityOT1": 0,
      "costQuantityOT2": 0,
      "costRecommendedCharge": 90,
      "costRecommendedChargeOT1": 90,
      "costRecommendedChargeOT2": 90,
      "costTaskDescription": "",
      "costChargeCodeType": "T",
      "costStage": ""
    }
  ]
}

Create

Create job from template

 

Job create

Create a new job.

Parameter Description Examples More info
API The API area jobs.json
Action Create a new record in the jobs table action=create
<General> Parameters described in overview user=user&password=user Overview
Company Company number company=8
Input JSON string input="data": ...
<input mandatory>varJobTemplate Specify the template to use "varJobTemplate": "8/00800001"
<input mandatory>jobClientCode Client code - see clients API "jobClientCode": "8/1244"
<input optional>jobDateIn Date in "jobDateIn": "2017/04/01"
<input optional>jobDateDue Date due "jobDateDue": "2017/04/30"
<input optional>jobNumber Job number "jobNumber": "8/00JON6"
<input optional>jobDescription Job description "jobDescription": "My new job description"
<input optional>jobComments Job comments "jobComments": "My new job comments"
<input optional>jobJobtypeCode Job type code - see job types API "jobJobtypeCode": "8/10"
<input optional>jobHandleruserid Handler ID - see users API "jobHandleruserid": "3"
<input optional>jobHandlerTeam Job team - see teams API "jobHandlerTeam": ""8/DQS"
<input optional>jobStatus 1=Quote 2=Live 3=In house 4=On hold 5=Special "jobStatus": "2"
<input optional>jobPrefixOnly Pass this param if you need to add a prefix to an automatic job number "jobPrefixOnly": "JN"
<input optional>jobReferenceJob Reference Job field - if not passed the reference job
will be set to the job number of the template job used.
"jobReferenceJob": "ABC1000"
<input optional>jobContactInternalRef Client contact ID Job client contact "jobContactInternalRef": 8600
<input optional>jobProjectCode Project code "jobProjectCode": 388
<input optional>jobCampaignNo Campaign code "jobCampaignNo": 268

Job prefixes:

If no job number is being passed in the API call and the system is set to use automatic job numbers, any automatic job prefixes will be added to the generated job number. If you wish to pass a manual prefix you can (see above) but this will only be accepted if the company settings allow for manual prefixes.

due date:

In a system where dates are driven by phase/stages (see date controls in company settings), the due date should not be passed - all due dates are then calculated by the durations set in the phases/stage in the template being used. If a due date is passed this overrides the due dates set in the template and all phases and stages are given the same due date (the date passed)

If a due date is passed that is earlier than the start date no error is returned but the due date in the request is ignored

Example request:
Request to create a job

http://<SERVER>/jsonAPI/jobs.json?user=user&password=user&action=create&company=8&version=3.3&input={
  "data": [
    {
      "varJobTemplate": "8/00800001",
      "jobHandleruserid": "3",
      "jobClientCode": "8/1244",
      "jobJobtypeCode": "8/10",
      "jobNumber": "8/00MJP20",
      "jobDescription": "My new job description",
      "jobDateIn": "2017/12/06",
      "jobDateDue": "2017/12/07",
      "jobHandlerTeam": "8/DQS",
      "jobStatus": "2",
      "jobContactInternalRef": 8600,
      "jobProjectCode": 388,
      "jobCampaignNo": 268
    }
  ]
}

Example response:

{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"responsemessage": "data processed successfully.",
"warningmessage": "",
"success": true,
"data": [
{
"jobNumber": "8/00MJP20",
"jobUuid": "E5569957F40EF943A3C32BCAAD542633",
"jobTimeStampModified": 1523625197,
"jobRecommendedVersionNumber": 7
}
]
}

Update

Update a job record

 

Job update

updates one or more of the key fields of a job
requires synergist v12.2 and above

Parameter Description Example More info
API The API area jobs.json
Action The action to perform action=update
<General> Parameters described in overview user=user&password=user v3.3 Overview
input Job number (mandatory), then name/value pairs "data": [<see example>]
Response Returned data See below

See below for all the possible fields that can be updated by this endpoint

Example request:
Request to replace the job description, job comments, job type & handler

http://<SERVER>/jsonAPI/jobs.json?user=user&password=user&version=3.3&action=update&input={
  "data": [
    {
      "jobNumber": "1/00008772",
      "jobDescription": "Software update 2",
      "jobComments": "Lots of progress has been made. - Ahead of schedule",
      "jobJobtypeCode": "1/PCD",
      "jobHandlerUserID": "286",
      "jobCustomField218": "My New Text"
    }
  ]
}

Example response:



{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "jobNumber": "1/00008772",
      "jobUuid": "19C1C231B8DE43B5BD2BC80F8A23E699",
      "jobTimeStampModified": 1519379557,
      "jobRecommendedVersionNumber": 109
    }
  ]
}

Note:

To discover which fields are editable make a call to the "Job details" endpoint and specify '&style=modelstructure' see Meta-data

example of fields that can be updated using this endpoint:

Note: this is subject to the business rules set up on the system. For instance you can not alter the due date of a job if the system is set up to be phase dates driven.

  jobExchangeRate
  jobClientCode
  jobComments
  jobCurQuotedPrice
  jobDateIn
  jobDateDue
  jobDescription
  jobStatus
  jobOrderNumber
  jobQuotedPrice
  jobReferenceJob
  jobTaxCode
  jobOppCurrentStatus
  jobOppLeadRating
  jobOppSource
  jobOppWeighting
  jobStageNotes
  jobHandlerUserID
  jobHandlerTeam
  jobCampaignNo
  jobContactInternalRef
  jobCurrencyCode
  jobJobtypeCode
  jobProjectCode
  jobStagePriority
  jobWorkflowCode

Promote

 

Job promote

promotes a job

To promote a job it follows the same rules as updating a job. However, to promote a job it is important that the value of input follows this structure:

Parameter Description Examples More info
API The API area jobs.json
Action Promote an opportunity to a live job action=update
<General> Parameters described in overview user=user&password=user Overview
Input JSON string input="data": ...
<input>jobNumber Job number "jobNumber": ""1/00008772"
<input>jobStatus 1=Quote 2=Live 3=In house 4=On hold 5=Special "jobStatus": "2"
<input optional>jobSalesStatusReason Change the sales status 3-6

To get the valid jobSalesStatusReason codes see: Sales status
Note: This code is made up of two parts <salesreasonSalesStatus>-<salesreasonReasonId>

Example request:
Request to promote an opportunity to a live job

http: //<SERVER>/jsonAPI/jobs.json?user=user&password=user&version=3.3&action=update&input={
  "data": [
    {
      "jobNumber": "1/00008772",
      "jobStatus": "2",
      "jobSalesStatusReason": "3-6"
    }
  ]
}

To list valid Sales status/reasons see Job sales status

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "jobLeadPromotedDate": "2018-02-22",
      "jobLeadPromotedTime": "11:17:57",
      "jobLeadPromotedTimeZone": "UTCA",
      "jobLeadPromotedDateUTC": "2018-02-22",
      "jobLeadPromotedTimeUTC": "11:17:57",
      "jobLeadPromotedUserID": 54,
      "jobSalesStatusReason": "3-6",
      "jobPrefixOnly": "",
      "jobNumberOnly": 8772,
      "jobNumber": "1/00008772",
      "jobUuid": "19C1C231B8DE43B5BD2BC80F8A23E699",
      "jobTimeStampModified": 1519298277,
      "jobRecommendedVersionNumber": 108
    }
  ]
}

Job sales status

Sales statuses lookup list

 

The 'Sales status' is a field on the job opportunity record. It is used to indicate the current state of the sales opportunity.

Parameter Description Examples More info
API The API area jobs.json
<General> Parameters described in overview user=user&password=user Overview
Action Sales statuses action=salesstatuses
Company Company number company=1
Response Returned data A JSON string containing the data

Note: There are main sales statuses

  1. Open
  2. Lost
  3. Promoted

Each of these codes has associated with is a set of 'Sales reason' descriptions.

Therefore a combined code that must be used when promoting a job or changing its status -
the salesreasonSalesStatus plus the salesreasonReasonId
e.g. 3-6

Example request:

http://<SERVER>/jsonapi/jobs.json?user=user&password=user&action=salesstatuses&version=3.3&company=8

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 19,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "salesreasonStatusReason": "1-2",
      "salesreasonStatusReasonDesc": "Open - Contacted",
      "salesreasonStatusReasonId": 2,
      "salesreasonStatusStatus": 1
    },
    {
      "salesreasonStatusReason": "2-101",
      "salesreasonStatusReasonDesc": "Lost - Price too high",
      "salesreasonStatusReasonId": 101,
      "salesreasonStatusStatus": 2
    },
    {
      "salesreasonStatusReason": "3-6",
      "salesreasonStatusReasonDesc": "Promoted - In Progress",
      "salesreasonStatusReasonId": 6,
      "salesreasonStatusStatus": 3
    },
  ]
}

Job client list

Clients lookup list

 

Example request:

Prior to creating a job - list clients to select a client for the job

Parameter Description Example More info
API The API area jobs.json
Action Clients action=clients
<General> Parameters described in overview user=user&password=user v3.3 Overview
Company Company number company=1
Client type Filter list by client type clienttype=b2b2
Response Returned data A JSON string containing the data

Example request:

http://<SERVER>/jsonapi/jobs.json?company=1&user=user&password=user&action=clients&page=1&rows=10&version=3.3&clienttype=b2b2

Note: it is also possible to filter the returned data by passing a view see Using views

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 10,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "clientUuid": "FC9D9C69E9998949B471FCC5264CEC8F",
      "clientTimeStampModified": 1522329200,
      "clientRecordVersionNumber": 105,
      "clientCustomField196": "",
      "clientCustomField204": "",
      "clientCustomField211": "0000-00-00",
      "clientCustomField260": "",
      "clientCustomField296": "",
      "clientCustomField315": false,
      "clientCustomField323": "",
      "clientCode": "1/AMT0",
      "clientName": "Amos Ltd",
      "clientCategoryName": "Client",
      "clientPhone": "",
      "clientCategory": 3,
      "clientHandlerUserID": 499,
      "clientWebURL": "",
      "clientEmail": "",
      "clientInactive": false,
      "clientType": "B2B2",
      "clientOpStatus": "Gold",
      "clientMarketSector": "Media",
      "clientOnHold": false,
      "clientHandlerFullName": "Adele Clarke"
    }
  ]
}

Job client contact

Job client contacts lookup list

 

Job client contact list

List contacts for a specific client

Parameter Description Example More info
API The API area jobs.json
Action Contacts action=contacts
<General> Parameters described in overview user=user&password=user v3.3 Overview
Company Company number company=1
Client Client code client=8/1244
Response Returned data A JSON string containing the data

Example request:

http://<SERVER>/jsonapi/jobs.json?company=8&version=3.3&client=8/1244&user=user&password=user&action=contacts
```

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 2,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "clientcontactInternalRef": 8600,
      "clientcontactFullName": "James Janson",
      "variable_selected": false
    }
  ]
}

Job project

Job projects lookup list

 

Job project list

Select a project to allocate to a job

Parameter Description Example More info
API The API area jobs.json
Action Projects action=projects
<General> Parameters described in overview user=user&password=user v3.3 Overview
Client (optional) Client code client=8/1244
Company Company number company=1
Response Returned data A JSON string containing the data

Example request:

http://<SERVER>/jsonapi/jobs.json?company=8&version=3.3&client=8/1244&user=user&password=user&action=projects

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 28,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "projectNo": 381,
      "projectName": "PSC project",
      "variable_selected": false
    },
    {
      "projectNo": 344,
      "projectName": "Winter projec t",
      "variable_selected": false
    }
  ]
}

Job campaign (sub project)

Job campaigns lookup list

 

Job campaign list

Select a campaign (sub project) to allocate to a job

Parameter Description Example More info
API The API area jobs.json
Action Campaigns action=campaigns
<General> Parameters described in overview user=user&password=user v3.3 Overview
Client (optional) Client code client=8/1244
Company Company number company=1
Response Returned data A JSON string containing the data

*Example request:*

http://<SERVER>/jsonapi/jobs.json?company=8&version=3.3&client=8/1244&user=user&password=user&action=campaigns

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 2,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "campaignNo": 268,
      "campaignName": "Special campaign",
      "variable_selected": false
    }
  ]
}

Jobtype list

Job types lookup list

 

Jobtype list

Select a job type to allocate to a job

Parameter Description Examples More info
Action Get a list of job types for a job action=jobtypes
<General> Parameters described in overview user=user&password=user Overview
Company Company number company=1
Job (optional) Job number job=1/00008772

Example request:

Note: by passing job number the list will be filtered to include either internal or external job types depending on type of client / job status

http://<SERVER>/jsonapi/jobs.json?company=1&version=3.3&job=1/00008772&user=user&password=user&action=jobtypes

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 26,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "JobtypeCode": "",
      "JobtypeDescription": "- Blank -",
      "variable_selected": false
    },
    {
      "JobtypeCode": "1/CB",
      "JobtypeDescription": "Brochure",
      "variable_selected": false
    },
    etc. etc .

Job handler list

Handlers lookup list

 

Jobtype list

Select a handler to allocate to a job

Parameter Description Examples More info
API The API area jobs.json
Action Get a list of handlers for a job action=handlers
<General> Parameters described in overview user=user&password=user Overview
Company Company number company=1
Team (optional) Team code team=1/ACC

Example request:

http://<SERVER>/jsonapi/jobs.json?company=1&version=3.3&user=user&password=user&action=handlers&team=1/ACC

Example response:

{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"totalrows": 183,
"totalpages": 1,
"responsemessage": "",
"pagerows": 0,
"pagenumber": 1,
"success": true,
"data": [
{
"userFullName": "- Blank -",
"userUserId": 0,
"variable_selected": false
},
{
"userFullName": "Adele Clarke",
"userUserId": 499,
"variable_selected": false
},
{
"userFullName": "Adele Graham",
"userUserId": 242,
"variable_selected": false
},

Job team list

Teams lookup list

 

Teams list

Select a job type to allocate to a job

Parameter Description Examples More info
API The API area jobs.json
Action Get a list of teams for a job action=teams
<General> Parameters described in overview user=user&password=user Overview
Company Company number company=1
Job (optional) Job number job=1/00008772

Example request:

http://<SERVER>/jsonapi/jobs.json?company=1&version=3.3&job=1/00008772&user=user&password=user&action=teams

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 12,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "teamCode": "",
      "teamDescription": "- Blank -",
      "variable_selected": false
    },
    {
      "teamCode": "1/DQS",
      "teamDescription": "David's Team",
      "variable_selected": false
    },
    

Kanban API

 

Kanban board list

Get a list of kanban boards

 

Kanban board list

Parameter Description Example More info
API The API area kanbanboard.json
Action Not required
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
Company Company number company=0
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonAPI/kanbanboard.json?company=0&user=user&password=user&version=3.3

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 7,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "kbheaderUuid": "B737648B65FFAA4FB7AAA439E8E9CD50",
      "kbheaderTimestampModified": 1537547672,
      "kbheaderRecordVersionNumber": 1,
      "kbheaderBoardName": "2 column",
      "kbheaderDefault": false,
      "kbheaderInactive": false,
      "kbheaderEntityType": "ACTIVITY",
      "kbheaderObject": {
        "Companies": [
          0
        ]
      }
    },
    etc.etc.{

Kanban single board header

Get a single kanban board

 

Kanban single board

Parameter Description Example More info
API The API area kanbanboard.json
Action Not required
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
<input mandatory>UUID Kanban UUID &uuid=B737648B65FFAA4FB7AAA439E8E9CD50
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http:/<SERVER>/jsonAPI/kanbanboard.json?user=user&password=user&version=3.3&uuid=B737648B65FFAA4FB7AAA439E8E9CD50

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "kbheaderUuid": "B737648B65FFAA4FB7AAA439E8E9CD50",
      "kbheaderTimestampModified": 1537547672,
      "kbheaderRecordVersionNumber": 1,
      "kbheaderBoardName": "2 column",
      "kbheaderObject": {
        "Companies": [
          0
        ]
      },
      "kbheaderDefault": false,
      "kbheaderInactive": false,
      "kbheaderEntityType": "ACTIVITY",
      "kbheaderCreatedBy": "",
      "kbheaderModifiedBy": "",
      "kbheaderCreatedDate": "0000-00-00",
      "kbheaderCreatedTime": "00:00:00",
      "kbheaderCreatedTimezone": "",
      "kbheaderCreatedDateUTC": "0000-00-00",
      "kbheaderCreatedTimeUTC": "00:00:00",
      "kbheaderModifiedDate": "0000-00-00",
      "kbheaderModifiedTime": "00:00:00",
      "kbheaderModifiedTimezone": "",
      "kbheaderModifiedDateUTC": "0000-00-00",
      "kbheaderModifiedTimeUTC": "00:00:00"
    }
  ]
}

Kanban board columns

To get an ordered list of columns for a board (hardwired max 500 columns):

 

Kanban board columns

Parameter Description Example More info
API The API area kanbanboard.json
Action Columns &action=columns
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
<input mandatory>UUID Kanban Board UUID &uuid=B737648B65FFAA4FB7AAA439E8E9CD50
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonAPI/kanbanboard.json?user=user&password=user&version=3.3&uuid=B737648B65FFAA4FB7AAA439E8E9CD50&action=columns

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 2,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "kbcolumnUuid": "B818099F87BC0448977D01A94814ECB8",
      "kbcolumnTimestampModified": 1537547691,
      "kbcolumnRecordVersionNumber": 0,
      "kbcolumnAllowAddNew": false,
      "kbcolumnOrder": 0,
      "kbcolumnStatusCode": "TODO",
      "kbcolumnStatusAction": "U",
      "kbcolumnStatusDescription": "To do"
    },
    {
      "kbcolumnUuid": "3B7B3B5626A847408455BAD30AC003AA",
      "kbcolumnTimestampModified": 1537547701,
      "kbcolumnRecordVersionNumber": 0,
      "kbcolumnAllowAddNew": false,
      "kbcolumnOrder": 1,
      "kbcolumnStatusCode": "COMP",
      "kbcolumnStatusAction": "C",
      "kbcolumnStatusDescription": "Complete"
    }
  ]
}

Kanban board entities

To get an ordered list of entities for a board (hardwired max 500 entities):

 

Kanban board entities

Parameter Description Example More info
API The API area kanbanboard.json
Action Entities &action=entities
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
Company Company number company=1
View Stored filter applied view=-1700 Using views
<input mandatory>UUID Kanban Board UUID &uuid=26E08BFD3AF56A4FB9C5C843281A490D
<input optional>Date Range Kanban Date Range &daterange=34
<input optional>Kanban Status Kanban Status &kanbanstatus=TODO
<input optional>Search Kanban Search &search="note details"
Response Returned data A JSON string containing the data

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonAPI/kanbanboard.json?user=user&password=user&version=3.3&company=3&action=entities&uuid=26E08BFD3AF56A4FB9C5C843281A490D&search=&view=45083&daterange=34&kanbanstatus=TODO&search="notes details"

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 11,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "kbentityAttachments": "",
      "kbentityAvatar": "/custom/User_5.jpg",
      "kbentityChecklistsItemsTotal": 0,
      "kbentityChecklistsItemsComplete": 0,
      "kbentityClientCode": "3/BASS",
      "kbentityClientName": "Company - this is it's name",
      "kbentityColumnOrder": 1,
      "kbentityCommentsTotal": 0,
      "kbentityDateUtc": "2018-10-04",
      "kbentityDescription": "",
      "kbentityDetails": "",
      "kbentityHeading": "8016",
      "kbentityHoursRequested": 0,
      "kbentityJob": "3/00001017",
      "kbentityJobDescription1st": " 0.00",
      "kbentityJobPhase": "",
      "kbentityJobPhaseSimple": "",
      "kbentityJobSimple": "1017",
      "kbentityOrder": 65536,
      "kbentityPhaseDescription1st": "",
      "kbentityPriorityDescription": "Med",
      "kbentityStartDate": "0000-00-00",
      "kbentityStartTime": "00:00:00",
      "kbentityStatus": "OPEN",
      "kbentityStatusCode": "TODO",
      "kbentityTimeUtc": "07:00:00",
      "kbentityType": "ACTIVITY",
      "kbentityTypeDescription": "Requisition",
      "kbentityUserName": "Mike Pender",
      "kbentityUserIsWatching": false,
      "kbentityUuid": "B8E72E12F4B51648A2B2FA14C43749D1"
    },
    

To move an entity

 
Parameter Description Example More info
API The API area kanbanboard.json
Action Entity move &action=Entitymove
<General> Parameters described in overview user=user&password=user&version=3.3 Overview
Company Company number 3
<input mandatory>UUID Kanban Board UUID &uuid=B737648B65FFAA4FB7AAA439E8E9CD50
<input mandatory>Entity UUID from Kanban Entity UUID &EntityUUIDFrom=572D982957B15748A1C58C94E661AB6B
<input mandatory>Kanban Status Kanban Status &KanbanStatus=COMP
<input optional>Entity UUID to Kanban Entity UUID &EntityUUIDTo=
Response Returned data A JSON string containing the data

Note: Entityuuidto=, is the entity that you want to drop above of in the column list.
If you are not interested in where it goes in the column, you pass kanbanstatus= instead, and it will put it at the bottom of the column (of that kanbanstatus)

Example request:
Request for data (list of records using specified model)

http://<SERVER>/jsonAPI/kanbanboard.json?user=user&password=user&version=3.3&company=3&action=Entitymove&uuid=B737648B65FFAA4FB7AAA439E8E9CD50&EntityUUIDFrom=572D982957B15748A1C58C94E661AB6B&kanbanstatus=COMP&EntityUUIDTo=

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "changedentities": "[{\"kbentityUuid\":\"2A00D222A8109D45AB1AA44D5430D935\",\"kbentityColumnOrder\":65536},{\"kbentityUuid\":\"EAAE700AED6F52449EC6520AB632C2E6\",\"kbentityColumnOrder\":131072},{\"kbentityUuid\":\"1C7E3BAFCE51F343A9D73F6124EEC327\",\"kbentityColumnOrder\":196608},{\"kbentityUuid\":\"9A6F132CFED58542821E7C76CC724C64\",\"kbentityColumnOrder\":262144},{\"kbentityUuid\":\"96FA7EC261DE3A49A5A4491471671E92\",\"kbentityColumnOrder\":327680},{\"kbentityUuid\":\"38C951DC64C68B4BABB3BDB6306209D9\",\"kbentityColumnOrder\":393216},{\"kbentityUuid\":\"094F40718231F64D87B150500F9C8B84\",\"kbentityColumnOrder\":458752},{\"kbentityUuid\":\"2B293CD0D78A3B46847C54C0FBE0A914\",\"kbentityColumnOrder\":524288},{\"kbentityUuid\":\"572D982957B15748A1C58C94E661AB6B\",\"kbentityColumnOrder\":589824}]"
    }
  ]
}

Phase API

 

Phase list

 

List phases

Parameters follow General parameters

Parameter Description Examples More info
API The API area jobs.json
Action Not required
<General> Parameters described in overview user=user&password=user Overview
Modelstructure Name of model required Modelstructure=phaseslist Using data models
Company Company number company=1
Views Stored filter applied view=-1307 Using views
Sort Change the view's default sort order sort=CLIENT Sorting
<Filters> Filter by a key field Filters
Response Returned data A JSON string containing the data

Example request:

http://<SERVER>/jsonapi/phases.json?user=user&password=user&company=1&style=modeldata&modelstructure=phaseslist&view=-1307&page=1&rows=2&version=3.3

Using this request, the response will list 2 jobs (rows=2&page=1), use the View -1300 and a also uses Models.

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 2,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "phaseuuid": "A1D4A4DA86612140AA806146DC95E161",
      "phaseTimeStampModified": 1489080105,
      "phaseRecordVersionNumber": 11,
      "phasePhaseDescription1stLine": "Test Copy Actuals",
      "phaseCustomField186": "",
      "phaseCustomField203": "0000-00-00",
      "phaseCustomField213": "",
      "phaseCustomField219": 0,
      "phaseCustomField220": false,
      "phaseCustomField280": "0000-00-00",
      "phaseCustomField287": "",
      "phaseCustomField297": "",
      "phaseThermProgress": "2%",
      "phaseThermValue": 10,
      "phaseThermWhitePoint": 110,
      "phaseJobDescription1stLine": "Test Copy Actuals",
      "phaseJobNumber": "1/00075539",
      "phaseJobAndPhase": "1/00075539.001",
      "phasePhase": "001",
      "phaseHandlerFullName": "User",
      "phaseOwnerFullName": "",
      "phaseDatein": "2015-05-07",
      "phaseDateDue": "2015-10-23",
      "phaseOrderNumber": "",
      "phaseCompleted": false,
      "phaseClientCode": "1/TEST2",
      "phaseClientName": "AAK Foods",
      "phaseJobNumberSimple": "75539",
      "phaseJobPhaseNumberSimple": "75539.001",
      "phaseContactFullName": "",
      "phaseStatusDescription": "Live",
      "phasePriorityDescription": ""
    }
  ]
}

Phase details

 

Phase Details

Parameter Description Examples More info
<General> Parameters described in overview user=user&password=user Overview
Job Job number 1/00001173.001
Action Not required
Company Company number company=1
Response Returned data A JSON string containing the data

Example request:

http://<SERVER>/jsonapi/phases.json?user=user&password=user&company=1&job=1/00001173.001&version=3.3

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "phaseuuid": "97A1F88BF6514E8E879EB2CD28BDBCF5",
      "phaseTimeStampModified": 1499443766,
      "phaseRecordVersionNumber": 64,
      "phaseCustomField186": "",
      "phaseCustomField203": "0000-00-00",
      "phaseCustomField213": "",
      "phaseCustomField219": 0,
      "phaseCustomField220": false,
      "phaseCustomField280": "0000-00-00",
      "phaseCustomField287": "",
      "phaseCustomField297": "",
      "phaseSalesCodeDescription": "3 (15%)",
      "phaseJobNumber": "1/00001173",
      "phaseJobAndPhase": "1/00001173.001",
      "phaseJobDescription": "New Commission Job",
      "phaseClientName": "David Ess Ltd 3",
      "phaseDescription": "",
      "phaseOrderNumber": "",
      "phaseProjectCode": 0,
      "phaseProjectName": "",
      "phaseCampaignNo": 0,
      "phaseCampaignName": "",
      "phaseStatus": 1,
      "phaseStatusDescription": "Quote",
      "phaseWorkflowCode": "",
      "phaseStageDesc": "",
      "phasePhasetypeCode": "",
      "phasePhasetypeDescription": "",
      "phaseContactInternalRef": 0,
      "phaseContactFullName": "",
      "phaseHandlerId": 242,
      "phaseHandlerFullName": "Adele Graham",
      "phaseOwner": "",
      "phasePhaseOwner": "",
      "phaseTaxCode": 3,
      "phaseSalesTaxRate": 15,
      "phaseCurrency": "",
      "phaseCurrencyCode": "1/EUR",
      "phaseExchangeRate": 1.2,
      "phaseDatein": "0000-00-00",
      "phaseTimeIn": "00:00:00",
      "phaseDateDue": "0000-00-00",
      "phaseTimeDue": "00:00:00",