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.2

API v3.2 requires Synergist v12.2 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.2&user=user&password=user&style=modeldata&modelstructure=activitylist

XML call
http://<SERVER>/xmlapi/activities.xml?company=1&version=3.2&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.2

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.2

Called using a browser

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

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.2"
}
]
}

General parameters for all requests:

parameter description
user Synergist login ID
password Synergist password
page (optional) Data page to return, page numbering starts at 0
rows (optional) Number of records/rows to return. 0 = return all rows
version Version of the API – currently 3.2

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.2 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.2

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=viewlist If not specified records for the API area are returned, or its structure
<General> Parameters described in overview user=user&password=user&version=3.2 Username, password and API version v3.2 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
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
Input JSON array {"data":[{"activityDetails":"Meeting at BoundryMill","activityID":6958,"activityRecordVersionNumber":1}]}
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.2&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
}
]
}

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.2
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.2&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.2
<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.2

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.2
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.2&user=user&password=user&style=modeldata&modelstructure=activitylist&client=1/F667

The list of key fields that can be used as filters include:
Job=
Jobphase=
Client/Client code=
ClientContact=
Supplier=
Suppliercontact=
Workflow=
Search=
Uuid=
Timestampfrom=
Timestampto=
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.2&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": ""
    }
  ]
}

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
<General> Parameters described in overview user=user&password=user&version=3.2
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.2&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.2&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.\r27/04/17 10:51am - The following people were removed from this activity: Adele Graham and Alan Prover\r26/04/17 12:49pm - Alan Greenwoodx has been removed from this activity.\r26/04/17 10:22am - ",
      "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.2
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.2&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.2 Overview
Modelstructure Name of model required Modelstructure=activitylist Using models & views
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/activities.json?company=1&version=3.2&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.2 Overview
Modelstructure Name of model required Modelstructure=activitydetails Using models & views
Activityid ID of a specific activity record activityid=4833
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.2&user=user&password=user&style=modeldata&modelstructure=activitydetails&Activityid=Activityid=7005

Example response (activitydetails model):

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "activityuuid": "B655BD6D7C9BCF43A932C67F55871C53",
      "activityTimeStampModified": 1520443094,
      "activityRecordVersionNumber": 17,
      "activityAlertBeforePeriodDescription": "",
      "activityJobPhaseDescription1stLine": "Test dates enterable",
      "activityJobDescription1stLine": "Brochure re-design",
      "activityCompletedDescription": "",
      "activityCreated": "Created by SYN_Jon on 08/09/2016 at 2:39pm",
      "activityDetails1stLine": "Penatibus cras odio. Mauris magnis tincidunt. Nullam impor vehicula. Tempus sunt in ante platea ac. Accumsan integer porti ut. Amet vel amet. ",
      "activityHistorySummary": "07/03/18 5:17pm - Status changed to 'Normal'\r07/03/18 5:17pm - Transferred to Tamerlane for actioning\r07/03/18 5:16pm - Type changed to ' Meeting notes'\r11/02/18 8:35pm - Category changed to 'blue'\r11/02/18 8:35pm - Type changed to ' DQS Note Type 01x'\r",
      "activityMailshotResponse": "",
      "activityModified": "Last modified by Syn Mike Dev on 07/03/2018 at 5:17pm",
      "activityRegardingDescription": "Brochure re-design",
      "activityRegardingDescription2": "Test dates enterable",
      "activityRegardingWhat": "Phase: 1/JN088004.002",
      "activitySecondaryOwnersDescription": [
        
      ],
      "activitySecondaryOwnersUserID": [
        
      ],
      "activityCustomField300": "Fred Smith",
      "activityCustomField301": "Lookup 1",
      "activityCustomField302": "2018-03-21",
      "activityCustomField303": true,
      "activityCustomField306": 2,
      "activityCustomField307": 200,
      "activityPriorityDescription": "Med",
      "activityTimeDueDisplay": "8:00 AM",
      "activityCompanyName": "The Professional Services Company",
      "activityCompanyNumber": 1,
      "activityID": 7005,
      "activityJobNumber": "1/JN088004",
      "activityJobNumberSimple": "JN088004",
      "activityJobAndPhase": "1/JN088004.002",
      "activityJobAndPhaseSimple": "JN088004.002",
      "activityStageCode": "",
      "activityStageDescription": "",
      "activitySubject": "Meeting on site - agenda",
      "activityDetails": "Penatibus cras odio. Mauris magnis tincidunt. Nullam imperdiet lacinia. Odio a luctus egestas egac.  amet. ",
      "activityClientCode": "1/FORDM5",
      "activityClientName": "Ford motor company",
      "activityClientPhone": "0161 234 5678",
      "activityClientEmail": "email@gmail.com",
      "activityActivitytypeCode": "Notes",
      "activityActivitytype": "Meeting notes",
      "activityActivitytypeCompanyNumber": 1,
      "activityActivitytypeCategory": 5,
      "activityTeamCode": "",
      "activityTeamDescription": "",
      "activityOwnerID": 189,
      "activityOwnerName": "Tamerlane",
      "activityCompletedBy": "",
      "activityCreatedBy": "SYN_Jon",
      "activityLastModifiedBy": "Syn Mike Dev",
      "activityClientContactInternalRef": 0,
      "activityClientContactFullName": "",
      "activityStatus": "Normal",
      "activityPriorityID": 2,
      "activityCategory": "blue",
      "activityAlertSentBefore": false,
      "activityAlertBeforePeriod": 0,
      "activityImmediateAlert": true,
      "activityAlertCompleted": true,
      "activityCompleted": false,
      "activityAlertSentInstant": false,
      "activityMarketingCampaignID": 0,
      "activityMarketingCampaignPromotionCode": "",
      "activityDateDue": "2016-09-08",
      "activityTimeDue": "08:00:00",
      "activityDueTimezone": "UTCA",
      "activityCompletedByUserID": 0,
      "activityCompletedDate": "0000-00-00",
      "activityCompletedTime": "00:00:00",
      "activityCompletedTimeZone": "",
      "activityTimezoneCompleted": "",
      "activityTimezoneCreated": "GMT",
      "activityTimezoneLastModified": "GMT",
      "activityCreatedByUserID": 3,
      "activityCreationDate": "2016-09-08",
      "activityCreationTime": "14:39:22",
      "activityCreationTimeZone": "UTCA",
      "activityLastModifiedByUserID": 5,
      "activityLastModifiedDate": "2018-03-07",
      "activityLastModifiedTime": "17:17:47",
      "activityLastModifiedTimeZone": "UTCA"
    }
  ]
}

Note: Custom fields are not returned prior to Synergist 12.2

Create

 

Activity create

Create a new activity.

Parameter Description Examples
action create a new record in the activities table action=create
<General> Parameters described in overview user=user&password=user
Company The company context company=1
input JSON string input="data": ...
<input mandatory>activityActivitytypeCode Activity type "activityActivitytypeCode":"Notes"
<input mandatory>activityClientCode Client code "activityClientCode":"1/C4126"
<input optional>activitySubject Subject "activitySubject":"My Meeting notes"
<input optional>activityDetails Details "activityDetails":"Meeting at Boundry Milll"
<input optional>Job Job number "Job"="1/0000123"
<input optional>Jobphase Phase number "Jobphase"="1/0000123.001"
<input optional>activityCompanyNumber Company "activityCompanyNumber":1
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.2&action=create&input={
  "data": [
    {
      "activityActivitytypeCode": "Notes",
      "activitySubject": "My Meeting notes",
      "activityDetails": "Meeting at Boundry Milll",
      "activityClientCode": "1/C4126",
      "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

 

Activity update

Parameter Description Examples
action Defines the API action=update
<General> Parameters described in overview
Company Specify the company (data-set) company=1
input JSON array company={"data": ...
<input mandatory>activityID "activityID":6958
<input mandatory>activityRecordVersionNumber "activityRecordVersionNumber":1
<input optional> All other fields. Only modified fields need to be passed "activityDetails":"Meeting at Boundry Mill"
<input optional> Custom field "activityCustomField300":"My Text"

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 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.2&action=update&input={
  "data": [
    {
      "activityDetails": "Meeting at Boundry Mill",
       activityCustomField300":"My Text",
      "activityID": 6958,
      "activityRecordVersionNumber": 1
    }
  ]
}

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
    }
  ]
}

Delete

 

Activity delete

Parameter Description Examples
action Defines the API action=delete
<General> Parameters described in overview
input Identifies the record(s) you wish to delete {"data": ...
<input mandatory>activityID Activity ID "activityID":6958

Example request:

http://<SERVER>/jsonapi/activities.json?company=1&user=user&password=user&version=3.2&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
action Defines the API action=activityfollowup
<General> Parameters described in 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.2&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.1&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
Action Defines the API call action=activityfollowup
<General> Parameters described in 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.2&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.2&action=history&activityID=4833

or

http://<SERVER>/jsonapi/activityhistory.json?&user=user&password=user&version=3.2&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
<General> Parameters described in overview user=user&password=user
<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.2&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
Action Defines the API call action=activitytypes
<General> Parameters described in 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.2

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 Explanation
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.2
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
View ID for a pre-existing query (called a “view”) view=SELECTVIEW44486 Use the “viewlist” call to obtain these values (see below)
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.2&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
Action Defines the API call action=clientcontacts
<General> Parameters described in 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.2

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
Action Defines the API call action=owners
<General> Parameters described in 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.2

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
Action Defines the API call action=secondaryowners
<General> Parameters described in overview
Set Variable_selected 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.2

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.1&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
Action Defines the API call action=priorities
<General> Parameters described in overview
Company Specify the company (data-set) company=1
Set variable_selected Specify the company (data-set) Input=2

Example request:

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

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
Action Defines the API call action=status
<General> Parameters described in overview
Company Specify the company (data-set) company=1
Activity ID Acrivity ID activityID=4833
Set variable_selected Specify the company (data-set) Input=2

Example request:

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

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
Action Defines the API call action=teams
<General> Parameters described in overview
Company Specify the company (data-set) company=1

Example request:

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

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
Action Defines the API call action=times
<General> Parameters described in overview

Example request:

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

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
Action Defines the API call action=categories
<General> Parameters described in overview
Activity type Specify the activity type activitytype=MAIL
Company Specify the company (data-set) company=1

Example request:

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

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
Action action=activityfollowup
<General> Parameters described in 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.2&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.2&action=history&activityID=4833

or

http://<SERVER>/jsonapi/activityhistory.json?&user=user&password=user&version=3.2&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.2 Overview
Modelstructure Name of model required Modelstructure=attachmentsList Using models & views
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.2&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 v3.2 Overview
Modelstructure Name of model required Modelstructure=attachmentDetails Using models & views
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.2&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
Action Defines the API action=create
<General> Parameters described in overview user=user&password=user
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.2&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 Examples
Action action=update
<General> Parameters described in overview user=user&password=user
input JSON string input={"data": ...
<input mandatory> attachmentDescription "attachmentDescription":"my doc name.pdf"
<input mandatory> attachmentID "attachmentID":5464

Example request:

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

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
    }
  ]
}

Delete

Delete a document

 

Attachment delete

Parameter Description Examples
Action Defines the API action=delete
<General> Parameters described in 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.2&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
Action action=attachmentview
<General> Parameters described in 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/notesattachments.json?&user=user&password=user&version=3.2&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
Action Get a list of users action=users
<General> Parameters described in overview
company Company number company=8

Example request:
Request the list of users

http://<SERVER>/jsonapi/calendar.json?user=user&password=user&version=3.2&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
Action Get a list of estimates action=unallocated
<General> Parameters described in 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 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.2&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
Action Get a list of requisitions action=requisitions
<General> Parameters described in 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.2&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
Action Get calendar bookings action=calendardisplay
<General> Parameters described in 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.2&datefrom=2017-10-1&dateto=2017-11-12&version=3.2&company=1&action=calendardisplay

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 42,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "calAllDay": true,
      "calChargeCodeDescription": "Client Services",
      "calClientCode": "1/CSSP",
      "calClientName": "Skylark Productions",
      "calColourHex": "FFE0C0",
      "calDescription": "",
      "calDurationDescription": "1 day",
      "calFeedback": "TODO",      (Synergist 12.2 and above)
      "calHoursPerDay": 0,
      "calDiaryInternal": 137353,
      "calIsoDateTimeEnd": "2017-09-29T17:00:00",
      "calIsoDateTimeStart": "2017-09-29T09:00:00",
      "calJobDescription1stLine": "Two-tier job ",
      "calJobHandlerName": "",
      "calJobAndPhase": "1/CS51.001",
      "calJobPhaseNumberSimple": "CS51.001",
      "calJobNumberSimple": "CS51",
      "calNotes": "",
      "calRequisitionDetails": "",
      "calRequisitionId": 0,
      "calRequisitionSubject": "",
      "calNumberOfDays": 1,
      "calPhaseDescription1stLine": "Two-tier phase",
      "calRequestStatus": "",
      "calResourceId": "3",
      "calResourceName": "SYN_Jon",
      "calStatus": "",
      "calTaskDescription": "",
      "calTimeSummaryInternal": 1012181,
      "calWeakLink": 5243,
      "calStageCode": "1/W0000000432",
      "calStageDesc": "With Client"
    },
      etc etc
    }
  ]
}

Calendar refresh

Refresh an individual calendar booking

 

Calendar refresh

Refresh an individual calendar booking.

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

Example request:
Request to refresh calendar

http://<SERVER>/jsonapi/calendar.json?user=user&password=user&version=3.2&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
Action hide an item from the list of estimates action=timesummaryshow
<General> Parameters described in overview
timesummary

Example request:

http://<SERVER>/jsonapi/calendar.json?user=user&password=user&version=3.2&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
Action hide an item from the list of estimates action=timesummaryhide
<General> Parameters described in overview
timesummary

Example request:

http://<SERVER>/jsonapi/calendar.json?user=user&password=user&version=3.2&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
Action Create a new record in the calendar bookings action=create
<General> Parameters described in 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.2&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
Action Update a record in calendar bookings action=create
<General> Parameters described in 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.2&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
Action Delete a calendar bookings entry action=create
<General> Parameters described in 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.2&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"
    }
  ]
}

Clients API

 

Client list

Returns one or more client (organizations) records

 

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 v3.2 Overview
Company Company number company=1
Modelstructure Name of model required Modelstructure=clientslist Using models & views
View Stored filter applied view=-1001 Using views
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.2&user=user&password=user&company=1&style=modeldata&modelstructure=clientslist&view=-1001&rows=2&page=1

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.
    {

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
<General> Parameters described in overview user=user&password=user
<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.2&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

Delete

 

Client contacts API

 

Client 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.

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
<input mandatory>company Company ID &company=1
<input mandatory>style Style &style=modeldata
<input mandatory>modelstructure Model Structure &modelstructure=clientcontactdetails
<input optional>rows: No. of Records &rows=10
<input optional>page: No. of Pages &page=1

Example request:
Request to list client contacts

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

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 434,
  "totalpages": 434,
  "responsemessage": "",
  "pagerows": 1,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "clientcontactuuid": "05F73F03055D4F0D942A7E03D0BA09EE",
      "clientcontactTimeStampModified": 1385819878,
      "clientcontactRecordVersionNumber": 7,
      "clientcontactCustomField200": "",
      "clientcontactCustomField206": "",
      "clientcontactCustomField210": "0000-00-00",
      "clientcontactCustomField253": "",
      "clientcontactCustomField289": "",
      "clientcontactCustomField314": "",
      "clientcontactCustomField326": 0,
      "clientcontactInternalRef": 6535,
      "clientcontactClientCode": "1/2365",
      "clientcontactTitle": "",
      "clientcontactFirstName": "",
      "clientcontactMiddleInitials": "",
      "clientcontactName": "{NO NAME IMPORTED}",
      "clientcontactFullName": "{NO NAME IMPORTED}",
      "clientcontactBackwardsFullName": "{NO NAME IMPORTED}",
      "clientcontactJobTitle": "",
      "clientcontactSalutation": "",
      "clientcontactCellPhone": "",
      "clientcontactDirectTelephone": "",
      "clientcontactOtherPhone": "",
      "clientcontactSecondaryPhone": "",
      "clientcontactClientPhone": "",
      "clientcontactFax": "",
      "clientcontactEMail": "kwilliams@synergist.co.uk",
      "clientcontactAdd1": "",
      "clientcontactAdd2": "",
      "clientcontactAdd3": "",
      "clientcontactAdd4": "",
      "clientcontactAdd5": "",
      "clientcontactAdd6": "",
      "clientcontactAdd7": "",
      "clientcontactInactive": false,
      "clientcontactInterests": ""
    }
  ]
}

Note: Feature from API 2.2

Companies API

 

Company list

List of companies

 

Companies

List of companies

Parameter Description Examples
<General> Parameters described in overview user=user&password=user
<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.2

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

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
<General> Parameters described in overview user=user&password=user&version=3.2
<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.2&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 Examples
API The API area expensesheets.json
Action Company List &action=companylist
<General> Parameters described in overview user=user&password=user&version=3.2
<input optional>company: Company ID &company=1

Example request:
Request to list companies

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.2&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 Examples
API The API area expensesheets.json
Action Company List &action=supplierlist
<General> Parameters described in overview user=user&password=user&version=3.2
Company The company context company=1

Example request:
Request to list suppliers

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.2&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

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.2
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.2&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

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":"test email alerts 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":"test email alerts 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.2
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.2&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.2
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.2&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 timesheets 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.2
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.2&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.2&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.2
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.2&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.2
<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.2&action=expensesheetsubmit&expensesheet=1791

Request to submit multiple expense sheets

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.2&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.2
<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.2&action=expensesheetapprove&uuid=12345678910

Request to approve multiple expense sheets

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.2&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.2
<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.2&action=expensesheetunapprove&expensesheet=1234

Request to unapprove multiple expense sheets

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.2&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.2
<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.2&action=expensesheetprocess&expensesheet=1234

Request to process multiple expense sheets

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.2&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.2
<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.2&action=expensesheetpost&expensesheet=1234

Request to post multiple expense sheet

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.2&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.2
<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.2&action=expensesheetall&expensesheet=1234

Request to approve/process/post multiple expense sheet

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.2&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.2
<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.2&action=expensesheetreturn&expensesheet=1234

Request to return multiple expense sheets

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.2&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.2
<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.2&action=expensesheetdelete&expensesheet=1234

Request to delete multiple expense sheet

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.2&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.2
<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.2&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.2
<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.2&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.2&action=expensesheetlist&expensesheet=1234

Request to list multiple expense sheets

http://<SERVER>/jsonapi/expensesheets.json?user=user&password=user&version=3.2&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.2
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.2&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 Examples
API The API area expenselines.json
Action Client List &action=clientslist
<General> Parameters described in overview user=user&password=user&version=3.2
<input mandatory>company: Company ID &company=1
<input optional>rows: Number of records &rows=1
<input optional>page: Number of pages &page=1

Example request:
Request to list clients

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.2&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 Examples
API The API area expenselines.json
Action Jobs List &action=jobslist
<General> Parameters described in overview user=user&password=user&version=3.2
<input mandatory>company: Company ID &company=1
<input optional>rows: Number of records &rows=1
<input optional>page: Number of pages &page=1

Example request:
Request to list jobs

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.2&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 Examples
API The API area expenselines.json
Action Phase List &action=phaseslist
<General> Parameters described in overview user=user&password=user&version=3.2
<input mandatory>company: Company ID &company=1
<input optional>rows: Number of records &rows=1
<input optional>page: Number of pages &page=1

Example request:
Request to list phases

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.2&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"
    }
  ]
}

Workflow list

 

Workflow List

Returns a selection of valid stages/workflows for expenses based on a small list model.

Parameter Description Examples
API The API area expenselines.json
Action Workflow List &action=workflowslist
Action Stage List &action=stageslist
<General> Parameters described in overview user=user&password=user&version=3.2
<input mandatory>company: Company ID &company=1
<input optional>rows: Number of records &rows=1
<input optional>page: Number of pages &page=1
<input optional>jobphase: Job Phase Number &page=1

Example requests:
Request to list workflows

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

Request to list stages

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.2&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.2
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.2&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.2
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.2&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.2
<input mandatory>company: Company ID &company=1
<input optional>active: Active Status &active=on/Y/true/1/yes
<input optional>rows: Number of records &rows=1
<input optional>page: Number of pages &page=1

Example requests:
Request to list exchange rates/currency codes

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.2&action=exchangerates&company=1
http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.2&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
<input optional>rows: Number of records &rows=1
<input optional>page: Number of pages &page=1

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.2
<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.2&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.2
<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.2&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.2
<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.2&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.2
    <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.2&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.2
<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.2&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.2
<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.2&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.2
<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.2&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.2
<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.2&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.2
<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.2&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.2
<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.2&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.2
<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.2&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.2
<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.2&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.2
<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.2&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.2
<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.2&action=expenselinedelete&company=1&expenseline=3404

Request to delete multiple expense line

http://<SERVER>/jsonAPI/expenselines.json?user=user&password=user&version=3.2&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 models & views
View Stored filter applied view=-1303 Using views
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.2&user=user&password=user&company=1&style=modeldata&modelstructure=jobslist&view=-1303&rows=2&page=1

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
<General> Parameters described in overview user=user&password=user&version=3.2
Company The company context company=1
Job Job Number job=1/00000510
Style Output style style=modeldata
Structure Model Structure modelstructure=jobdetails
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.2

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
Action List cost transactions against a job action=costscharges
<General> Parameters described in overview user=user&password=user
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.2&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
Action Create a new record in the jobs table action=create
<General> Parameters described in overview user=user&password=user
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.2&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

 

Job update

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

Parameter Description Examples
Action Update field values in a job action=update
<General> Parameters described in overview user=user&password=user
Input JSON string input="data": ...
<input mandatory>jobNumber Job number "jobNumber": ""1/00008772"
<input optional>jobDescription Job description "jobDescription": "Software update"
<input optional>jobComments Job comments "Lots of progress has been made. - Ahead of schedule"
<input optional>jobJobtypeCode Job type code "1/PCD"
<input optional>jobHandlerUserID Job handler ID "286"

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.2&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
    }
  ]
}

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
Action Promote an opportunity to a live job action=update
<General> Parameters described in overview user=user&password=user
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.2&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.

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.2&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.2 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.2&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.2 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.2&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.2 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.2&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.2 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.2&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
Action Get a list of job types for a job action=jobtypes
<General> Parameters described in overview user=user&password=user
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.2&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
Action Get a list of handlers for a job action=handlers
<General> Parameters described in overview user=user&password=user
Company Company number company=1
Team (optional) Team code team=1/ACC

Example request:

http://<SERVER>/jsonapi/jobs.json?company=1&version=3.2&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
Action Get a list of teams for a job action=teams
<General> Parameters described in overview user=user&password=user
Company Company number company=1
Job (optional) Job number job=1/00008772

Example request:

http://<SERVER>/jsonapi/jobs.json?company=1&version=3.2&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
    },
    

Phase API

 

Phase list

 

List phases

Parameters follow General parameters

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.2

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

Example request:

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

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",
      "phaseStagePriority": 10,
      "phasePriorityDescription": "",
      "phaseDisplayOrder": ""
    }
  ]
}

Costs and charges

List cost transactions against a phase

 

Phase costs & charges

Parameter Description Examples
Action List cost transactions against a phase action=costscharges
<General> Parameters described in overview user=user&password=user
Job phase Job and phase number jobphase=1/00000519.001
Response Returned data See below

Example request:
Request costs and charges data

http://<SERVER>/jsonapi/phases.json?jobphase=1/00000519.001&user=user&password=user&version=3.2&action=costscharges

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 26,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "costCharge": 0,
      "costChargeRate": 0,
      "costChargeRateOT1": 0,
      "costChargeRateOT2": 0,
      "costChargeCode": "1/TRA",
      "costCostRate": 0,
      "costCostRateOT1": 0,
      "costCostRateOT2": 0,
      "costCostTotal": 0,
      "costCurrencyBuy": "",
      "costCurrencyBuyDescription": "",
      "costCurrencyBuyRate": 1,
      "costCurrencyCharge": 0,
      "costCurrencyChargeRate": 0,
      "costCurrencyChargeRateNormal": 0,
      "costCurrencyChargeRateOT1": 0,
      "costCurrencyChargeRateOT2": 0,
      "costCurrencyRecommendedCharge": 0,
      "costCurrencyRecommendedChargeOT1": 0,
      "costCurrencyRecommendedChargeOT2": 0,
      "costCurrencySell": "1/EUR",
      "costCurrencySellDescription": "Euro",
      "costCurrencySellRate": 1.21,
      "costDate": "2016-10-19",
      "costDescription": "Employee Training",
      "costWorkDone": "",
      "costResourceName": "Michael Irving",
      "costQuantity": 15,
      "costQuantityOT1": 0,
      "costQuantityOT2": 0,
      "costRecommendedCharge": 0,
      "costRecommendedChargeOT1": 0,
      "costRecommendedChargeOT2": 0,
      "costTaskDescription": "",
      "costChargeCodeType": "T",
      "costStage": ""
    }
  ]
}

Purchasing API

 

Purchase order list

Returns one or more purchase orders

 

List of purchases orders

If you wish to access multiple purchase records you would normally use the purchaseorderlist model

For purchase orders two models are available:

  • purchaseorderlist
  • purchaseorderdetails

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
<General> Parameters described in overview user=user&password=user&version=3.2
Company The company context company=1
Job/phase (optional) filter by job/phase jobphase =1/00001076.002
Views (optional) Views &views=-2004
Response Returned data See below

Example requests:
Request for data (list of records using specified job/phase)

http://<SERVER>/jsonapi/purchases.json?modelstructure=purchaseorderdetails&user=user&password=user&company=1&version=3.2&jobphase=1/00001076.002

Request for data (list of records using specified model)](http://google.com)

http://<SERVER>/jsonapi/purchases.json?style=modeldata&modelstructure=purchaseorderlist&user=user&password=user&company=1&version=3.2&rows=2&page=1&view=-2004

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 3407,
  "totalpages": 1704,
  "responsemessage": "",
  "pagerows": 2,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "poUuid": "AE38CED93A63472AA014D159DB8F41C3",
      "poTimeStampModified": 1520341389,
      "poRecordVersionNumber": 32,
      "poCostDisplay": "£200.00",
      "poInternal": 10000167,
      "poPONumber": "{EST}",
      "poDescription": "Subcontract Web Design",
      "poJobandPhase": "1/00000543.001",
      "poTheirRef": "Ref123123",
      "poOrderedByUserId": 242,
      "poOrderedByFullName": "Adele Graham",
      "poSupplytype": "1/PRI",
      "poSupplyTypeDescription": "Printers",
      "poSupplierName": "The Printing Shop",
      "poViewDate": "2002-05-30",
      "poEstimatedDate": "2002-05-30",
      "poInvoiceDate": "0000-00-00",
      "poDateCreated": "0000-00-00",
      "poDateSent": "0000-00-00",
      "poViewTime": "00:00:00",
      "poViewTimeZone": "",
      "poEstCost": 200,
      "poCost": 0,
      "poPurchaseOrderType": "P",
      "poSupplierCode": "1/PS1"
    },
    {
      "poUuid": "BA5C900B756E4363BEE26BF0239D34A2",
      "poTimeStampModified": 1385821179,
      "poRecordVersionNumber": 25,
      "poCostDisplay": "£244.00",
      "poInternal": 10000162,
      "poPONumber": "{EST}",
      "poDescription": "Printing Purchase",
      "poJobandPhase": "1/00000592.001",
      "poTheirRef": "",
      "poOrderedByUserId": 0,
      "poOrderedByFullName": "",
      "poSupplytype": "1/PRI",
      "poSupplyTypeDescription": "Printers",
      "poSupplierName": "Brilliant",
      "poViewDate": "2002-05-28",
      "poEstimatedDate": "2002-05-28",
      "poInvoiceDate": "2002-08-28",
      "poDateCreated": "0000-00-00",
      "poDateSent": "0000-00-00",
      "poViewTime": "00:00:00",
      "poViewTimeZone": "",
      "poEstCost": 244,
      "poCost": 0,
      "poPurchaseOrderType": "P",
      "poSupplierCode": "1/BRILLIAN"
    }
  ]
}

Purchase details

Retrieve details of a purchase order

 

Purchase order details

This API will enable consumers to create and manipulate NON-LINE purchase orders and purchase estimates. Lines will be supported in a separate spec

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
Company The company context company=1
Purchase Purchase order number purchase=10006576
Response Returned data See below

Example request:
Request to create an purchase order

http://<SERVER>/jsonapi/purchases.json?style=modeldata&modelstructure=purchaseorderdetails&user=user&password=user&company=1&version=3.2&purchase=10006576

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "poUuid": "4243DA0B55EE484D8F2188EDE3857D3F",
      "poTimeStampModified": 1528804929,
      "poRecordVersionNumber": 5,
      "poSalesCodeDescription": "1 (20%)",
      "poClientCode": "1/JAMES",
      "poClientName": "James Projects",
      "poJobNumber": "1/00123",
      "poJobDescription": "ITG PR, marketing and comms",
      "poJobandPhase": "1/00123.004",
      "poPhaseDescription": "Purchasing",
      "poInternal": 10006576,
      "poTransferredFrom": "",
      "poDescription": "My purchase order ",
      "poTheirRef": "",
      "poPickedForQuote": true,
      "poPicked": true,
      "poInvest": false,
      "poDateOrdered": "2018-06-12",
      "poEstimatedDate": "2018-06-12",
      "poCost": 33,
      "poEstCost": 25,
      "poMarkup": 100,
      "poEstMarkUp": 100,
      "poCharge": 66,
      "poEstRecChgOut": 50,
      "poCurrencyEstCharge": 50,
      "poOriginalCost": 25,
      "poInvestment": 0,
      "poCancelDate": "0000-00-00",
      "poOrderText": "",
      "poInvoiceRcd": false,
      "poInvoiceRef": "",
      "poFinalPITheirRef": "",
      "poInvDocDate": "0000-00-00",
      "poInvoiceDate": "0000-00-00",
      "poSalesInvNo": "",
      "poTotalInvoiced": 0,
      "poNotes": "",
      "poTransferHistory": "",
      "poCurrencyRate": 1,
      "poCurrencyCost": 33,
      "poCurrencyEstCost": 25,
      "poCurrencyOrigCost": 25,
      "poCurrencyCharge": 66,
      "poCurrencyInvoiced": 0,
      "poTaxCode": 1,
      "poSalesTaxRate": 20,
      "poSupplierContactInternalRef": 0,
      "poContactName": "",
      "poOrderedByUserId": 628,
      "poOrderedByFullName": "James Smith",
      "poSupplytype": "1/PMX",
      "poSupplyTypeDescription": "Print",
      "poCurrencyCode": "",
      "poCurrency": "",
      "poPurchaseOrderType": "P",
      "poSupplierCode": "1/PR100",
      "poSupplierName": "Printing 100"
    }
  ]
}

Create

Create a purchase order

 

Create

Create a purchase estimate

Parameter Description Examples
action Create a new record in the purchase orders table action=create
<General> Parameters described in overview user=user&password=user&version=3.2
Company The company context company=1
input JSON string input="data": ...
<input mandatory>poJobandPhase Phase number "poJobandPhase":"1/00000516.003"
<input mandatory>poSupplytype Supply type "poSupplytype":"1/ENG"
<input mandatory>poSupplierCode Supplier code "poSupplierCode":"1/AAMATT2"
<input mandatory>poDescription Description "poDescription":"Description"
<input optional>poOrderText PO text tab description "poOrderText":"Order text"
<input optional>poEstCost: Estimated cost ""poEstCost": 25
<input optional>poEstMarkUp Estimated Markup% "poEstMarkUp":100
<input optional>poEstRecChgOut Estimated charge "poEstRecChgOut":50
<input optional>poCurrencyCode Currency code "poCurrencyCode":"1\EUR"
<input optional>poCurrencyRate Currency - rate "poCurrencyRate":1.15
<input optional>poCurrencyEstCost Currency - estimated cost "poCurrencyEstCost":50
<input optional>poCurrencyEstCharge Currency - estimated charge "poCurrencyEstCharge":50
Response Returned data See below

Example request:
Request to create a purchase estimate

Base currency Purchase Estimate passing recommended charge

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=create&input={
  "data": [
    {
      "poEstCost": 25,
      "poEstRecChgOut": 50,
      "poJobandPhase": "1/00001076.001",
      "poSupplytype": "1/ENG",
      "poSupplierCode": "1/AAMATT2",
      "poDescription": "My purchase order "
    }
  ]
}

Base currency Purchase Estimate passing markup

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=create&input={
  "data": [
    {
      "poEstCost": 25,
      "poEstMarkUp": 10,
      "poJobandPhase": "1/00001076.001",
      "poSupplytype": "1/ENG",
      "poSupplierCode": "1/AAMATT2",
      "poDescription": "My purchase order 2"
    }
  ]
}

Currency Purchase estimate

Note: The currency estimated cost is related to the currency code past. However, the Estimated currency charge-out relates to the currency of the JOB.

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=create&input={
  "data": [
    {
      "poCurrencyEstCost": 25,
      "poCurrencyEstCharge": 50,
      "poJobandPhase": "1/00001076.002",
      "poSupplytype": "1/ENG",
      "poSupplierCode": "1/AAMATT2",
      "poDescription": "My purchase order ",
      "poCurrencyCode": "1/EUR"
    }
  ]
}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "poCurrencyCode": "1/EUR",
      "poCurrencyRate": 1.21,
      "poCost": 0,
      "poCurrencyCost": 0,
      "poMarkup": 142.01,
      "poCharge": 0,
      "poCurrencyCharge": 0,
      "poInvest": false,
      "poInvestment": 0,
      "poInvestmentMarkup": 0,
      "poEstCost": 20.66,
      "poCurrencyEstCost": 25,
      "poEstMarkUp": 142.01,
      "poEstRecChgOut": 50,
      "poCurrencyEstCharge": 50,
      "poOriginalCost": 0,
      "poCurrencyOrigCost": 0,
      "poInternal": 10008335,
      "poUuid": "D6198877AB807C468CD3E80A9D81C19B",
      "poTimeStampModified": 1522759412,
      "poRecordVersionNumber": 2,
      "poPONumber": "{EST}",
      "poDateOrdered": "0000-00-00",
      "poEstimatedDate": "2018-04-03",
      "poSupplierCode": "1/AAMATT2",
      "poSupplierContactInternalRef": 0,
      "poSupplytype": "1/ENG",
      "poInvoiceMemo": "",
      "poDescription": "My purchase order ",
      "poTheirRef": "",
      "poOrderedByUserId": 3,
      "poOrderText": "",
      "poPicked": false,
      "poPickedForQuote": false,
      "poOption": ""
    }
  ]
}

Update

Update a purchase

 

Purchase update

Note:

The API supports the passing of all the variations of the cost, markup & chargeout fields. However, we would suggest you only attempt to update one of these fields at at time.

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
Company Specify the company (data-set) company=1
action Update a PO action=update
input JSON array company={"data":
<input mandatory>poInternal Internal Purchase ID "poInternal":10008229
<input optional> All other fields. Only modified fields need to be passed "poEstCost":33

Example requests:

http: //<SERVER>/jsonapi/purchases.json?company=1&user=user&password=user&version=3.2&action=update&input={
  "data": [
    {
      "poInternal": "10008229",
      "poEstCost": 33
    }
  ]
}
http: //<SERVER>/jsonapi/purchases.json?company=1&user=user&password=user&version=3.2&action=update&input={
  "data": [
    {
      "poInternal": "10008375",
      "poCurrencyEstCharge": "2"
    }
  ]
}
http://<SERVER>/jsonapi/purchases.json?company=1&user=user&password=user&version=3.2&action=update&input={
  "data": [
    {
      "poInternal": "10008375",
      "poCurrencyCost": "1.14"
    }
  ]
}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "poCurrencyCode": "",
      "poCurrencyRate": 1,
      "poCost": 150,
      "poCurrencyCost": 0,
      "poMarkup": 30,
      "poChargeout": 195,
      "poCurrencyCharge": 195,
      "poInvest": false,
      "poInvestment": 0,
      "poInvestmentMarkup": 0,
      "poEstCost": 33,
      "poCurrencyEstCost": 33,
      "poEstMarkUp": 30,
      "poEstRecChgOut": 42.9,
      "poCurrencyEstCharge": 42.9,
      "poOriginalCost": 0,
      "poCurrencyOrigCost": 0,
      "poInternal": 10008180,
      "poUuid": "EC2BCC0570400345AC130E1140DFB69E",
      "poTimeStampModified": 1521020315,
      "poRecordVersionNumber": 17,
      "poPONumber": "012082"
    }
  ]
}

example of fields that can be updated using this endpoint:

In order to see all the possible fields see the return values in Purchase details

Note: this is subject to the business rules set up on the system.

poCurrencyCode
poCurrencyRate
poCost
poCurrencyCost
poMarkup
poCharge
poCurrencyCharge
poInvest
poInvestment
poInvestmentMarkup
poEstCost
poCurrencyEstCharge
poEstMarkUp
poEstRecChgOut
poOriginalCost
poCurrencyOrigCost

Delete

Delete a purchase

 

Purchase delete

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action Delete a purchase action=delete
input Identifies the record(s) you wish to delete {"data":
<input mandatory>poInternal Internal Purchase ID "poInternal":10008229

Example request:

http: //<SERVER>/jsonapi/purchases.json?company=1&user=user&password=user&version=3.1&action=delete&input={
  "data": [
    {
      "poInternal": 10008242
    }
  ]
}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "poInternal": 10008242,
      "poUuid": "E22CEDFAB57E3E4EBCE9CCB1D5DA4FAA"
    }
  ]
}

Approve

Approve a purchase order

 

Purchase order approval

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action Approve a PO &action=approve
<Parameter> Identifies the record(s) you wish to approve
purchase Internal Purchase ID &purchase=10008229

Example request:

http://<SERVER>/jsonapi/purchases.json?company=1&user=user&password=user&version=3.2&action=approve&purchase=10008233

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Purchase order approved. ",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "poPOApproved": true,
      "poPOApprovedDate": "2018-03-14",
      "poPOApprovedTime": "10:37",
      "poPOApprovedUserId": 54,
      "poPOApprovedDateUtc": "2018-03-14",
      "poPOApprovedTimeUtc": "10:37",
      "poPOApprovedTimeZone": "UTCA",
      "poInternal": 10008255,
      "poUuid": "38AB3496BAC5FB44A2C88F4A879098CB",
      "poTimeStampModified": 1521023848,
      "poRecordVersionNumber": 14,
      "poPONumber": "012090"
    }
  ]
}

UnApprove

Unapprove a purchase order

 

Purchase order unapproval

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action Unapprove a PO &action=unapprove
<Parameter> Identifies the record(s) you wish to unapprove
purchase Internal Purchase ID &purchase=10008229

Example request:

http://<SERVER>/jsonapi/purchases.json?company=1&user=user&password=user&version=3.2&action=unapprove&purchase=10008233

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Purchase order unapproved. ",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "poPOApproved": false,
      "poPOApprovedDate": "0000-00-00",
      "poPOApprovedTime": "00:00",
      "poPOApprovedUserId": 0,
      "poPOApprovedDateUtc": "0000-00-00",
      "poPOApprovedTimeUtc": "00:00",
      "poPOApprovedTimeZone": "",
      "poInternal": 10008255,
      "poUuid": "38AB3496BAC5FB44A2C88F4A879098CB",
      "poTimeStampModified": 1521024460,
      "poRecordVersionNumber": 15,
      "poPONumber": "012090"
    }
  ]
}

Promote (make real)

Promote an estimate to a purchase order

 

Purchase order promote

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action Promote to PO &action=promote
<Parameter> Identifies the record(s) you wish to promote
purchase Internal Purchase ID &purchase=10008229

Example request:

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=promote&purchase=10008233

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Purchase order promoted to a real purchase order. ",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "poCurrencyCode": "",
      "poCurrencyRate": 1,
      "poCost": 200,
      "poCurrencyCost": 200,
      "poMarkup": 30,
      "poChargeout": 260,
      "poCurrencyCharge": 390,
      "poInvest": false,
      "poInvestment": 0,
      "poInvestmentMarkup": 0,
      "poEstCost": 200,
      "poCurrencyEstCost": 200,
      "poEstMarkUp": 30,
      "poEstRecChgOut": 260,
      "poCurrencyEstCharge": 390,
      "poOriginalCost": 200,
      "poCurrencyOrigCost": 200,
      "poInternal": 10005708,
      "poUuid": "BEA6082B7BE911E2B9FC00155D003416",
      "poTimeStampModified": 1521025740,
      "poRecordVersionNumber": 6,
      "poPONumber": "012097"
    }
  ]
}

Cancel

Cancels a real purchase order - allocating a write off invoice against it

 

Purchase order cancellation

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action Cancel a purchase order &action=cancel
<Parameter> Identifies the record(s) you wish to cancel
purchase Internal Purchase ID &purchase=10008229

Example request:

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=cancel&purchase=10008233

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Purchase order cancelled and written off. ",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "poCancelDate": "2018-03-14",
      "poCancelTime": "11:16",
      "poCancelTimeZone": "UTCA",
      "poCancelDateUtc": "2018-03-14",
      "poCancelTimeUtc": "11:16",
      "poCancelUserId": 54,
      "poPicked": false,
      "poPickedForQuote": false,
      "poOption": "",
      "poInternal": 10005708,
      "poUuid": "BEA6082B7BE911E2B9FC00155D003416",
      "poTimeStampModified": 1521026168,
      "poRecordVersionNumber": 8,
      "poPONumber": "012097"
    }
  ]
}

Pick

Picks the estimate for quotes/estimate total

 

Pick estimate/quote

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action Quote picked off &action=quotedpicked_off
action Quote picked on &action=quotedpicked_on
action Estimate picked off &action=estimatepicked_off
action Estimate picked on &action=estimatepicked_on
<Parameter> Identifies the record(s) you wish to pick
purchase Internal Purchase ID &purchase=10008229

Example requests:

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=quotedpicked_off&purchase=10007388
http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=quotepicked_on&purchase=10007388
http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=estimatepicked_off&purchase=10007388
http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=estimatepicked_on&purchase=10007388

Example response:

{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"responsemessage": "Purchase order estimate picked changed. ",
"warningmessage": "",
"success": true,
"data": [
{
"poInternal": 10008307,
"poUuid": "222BC6D55195844381EAC1A6CB93461E",
"poTimeStampModified": 1522085009,
"poRecordVersionNumber": 3,
"poPONumber": "{EST}",
"poPicked": true
}
]
}

Option

Sets the purchase as an option type

 

Set/Unset as an option type

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action Turn Option on &action=option_on
action Turn Option off &action=option_off
<Parameter> Identifies the record(s) you wish to set
purchase Internal Purchase ID &purchase=10008229

Example request:

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=option_on&purchase=10007388
http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=option_off&purchase=10007388

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Purchase order option changed. ",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "purchaseorder_internal": 10007388,
      "purchaseorder_uuid": "7A54C829DD0D174CA43A43B948386413",
      "purchaseorder_timestampmodified": 1521028279,
      "purchaseorder_recordversionnumber": 21,
      "purchaseorder_ponumber": "{EST}",
      "purchaseorder_option": "option"
    }
  ]
}

Investment

Mark a purchase as an investment/non chargeable

 

Mark a purchase as an investment

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action Turn investment on &action=investment_on
action Turn investment off &action=investment_off
<Parameter> Identifies the record(s) you wish to set
purchase Internal Purchase ID &purchase=10008229

Example requests:

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=investment_on&purchase=10007388
http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=investment_off&purchase=10007388

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Purchase order investment changed. ",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "purchaseorder_currencycode": "",
      "purchaseorder_currencyrate": 1,
      "purchaseorder_cost": 100,
      "purchaseorder_currencycost": 0,
      "purchaseorder_markup": -100,
      "purchaseorder_chargeout": 0,
      "purchaseorder_curchargeout": 0,
      "purchaseorder_invest": true,
      "purchaseorder_investment": 102.5,
      "purchaseorder_investmentmarkup": 2.5,
      "purchaseorder_estcost": 100,
      "purchaseorder_currencyestcost": 0,
      "purchaseorder_estmarkup": 2.5,
      "purchaseorder_estrecchgout": 102.5,
      "purchaseorder_estcurchargeout": 102.5,
      "purchaseorder_originalcost": 100,
      "purchaseorder_currencyorigcost": 100,
      "purchaseorder_internal": 10008268,
      "purchaseorder_uuid": "8F632C2ECEEC5948A3EF2C53F8FC555B",
      "purchaseorder_timestampmodified": 1521029739,
      "purchaseorder_recordversionnumber": 8,
      "purchaseorder_ponumber": "012094"
    }
  ]
}

Change currency

Change the currency/rate

 

Change the currency code and rate

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action Change currency &action=changecurrency
<Parameters> Identifies the record(s) you wish to set
purchase Internal Purchase ID &purchase=10008229
currency Company/Currency Code &currency=1/EUR
currencyrate Currency Rate &currency=1.18

Example request:

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=changecurrency&currency=1/EUR&currencyrate=1.18&purchase=10007388

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Purchase order currency changed. ",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "poCurrencyCode": "1/EUR",
      "poCurrencyRate": 1.18,
      "poCost": 0,
      "poCurrencyCost": 0,
      "poMarkup": 1,
      "poChargeout": 0,
      "poCurrencyCharge": 0,
      "poInvest": false,
      "poInvestment": 0,
      "poInvestmentMarkup": 0,
      "poEstCost": 42.37,
      "poCurrencyEstCost": 50,
      "poEstMarkUp": 100,
      "poEstRecChgOut": 84.74,
      "poCurrencyEstCharge": 102.54,
      "poOriginalCost": 0,
      "poCurrencyOrigCost": 0,
      "poInternal": 10008253,
      "poUuid": "FAEF5B6021CEA24CAE5CB99F9CA579A6",
      "poTimeStampModified": 1521035050,
      "poRecordVersionNumber": 6,
      "poPONumber": "{EST}"
    }
  ]
}

Change supplier

Change the supplier

 

Change the supplier

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action Change supplier &action=changesupplier
<Parameters> Identifies the record(s) you wish to set
purchase Internal Purchase ID &purchase=10008229
supplier Supplier Code &supplier=1/aaaa

Example request:

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=changesupplier&supplier=1/aaaa
&purchase=10007388

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "Purchase order supplier changed. ",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "poSupplierCode": "1/aaaa",
      "poSupplierContactInternalRef": 0,
      "poInternal": 10007388,
      "poUuid": "7A54C829DD0D174CA43A43B948386413",
      "poTimeStampModified": 1521037172,
      "poRecordVersionNumber": 25,
      "poPONumber": "{EST}"
    }
  ]
}

Supplier list

List of suppliers - for use when creating a PO or re-assigning a different supplier

 

List suppliers

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action Supplier lists &action=supplierslist or &action=expenseslist
<Parameters> Identifies the company record(s) you wish to list
company Company ID &company=1
rows (optional) No. of records &rows=3
page (optional) No. of pages &page=1

Example request:

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=supplierslist&company=1&rows=2&page=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 144,
  "totalpages": 48,
  "responsemessage": "",
  "pagerows": 3,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "supplieruuid": "F3AD44183AFC1949941E25E23BEC2C73",
      "supplierTimeStampModified": 1506350938,
      "supplierRecordVersionNumber": 1,
      "supplierCustomField317": "",
      "supplierCustomField321": "",
      "supplierName": "",
      "supplierCode": "1/23329028",
      "supplierPhone": "",
      "supplierExpense": false,
      "supplierInactive": false,
      "supplierOnHold": false,
      "supplierMainEmail": "",
      "supplierSupplytypeDescription": "",
      "supplierMarkup": 1,
      "supplierWebURL": "",
      "supplierProspect": false
    },
    {
      "supplieruuid": "E9B3A17AB538094A9B6AC531E072C16D",
      "supplierTimeStampModified": 1472053839,
      "supplierRecordVersionNumber": 1,
      "supplierCustomField317": "",
      "supplierCustomField321": "",
      "supplierName": "Fred smith",
      "supplierCode": "1/454",
      "supplierPhone": "",
      "supplierExpense": false,
      "supplierInactive": false,
      "supplierOnHold": false,
      "supplierMainEmail": "",
      "supplierSupplytypeDescription": "Couriers",
      "supplierMarkup": 0,
      "supplierWebURL": "",
      "supplierProspect": false
    }
]
}    

Supply types

List of supply types

 

List of supply types

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action List supplier types &action=supplytypes
<Parameters> Identifies the company record(s) you wish to list
company Company ID &company=1
supplier (optional) Supplier code &supplier=1/aaaa

Example request:

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=supplytypes&company=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 99,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "supplytypesSupplyType": "5/PRI",
      "supplytypesDescription": "Printers",
      "variable_selected": false
    },
    {
      "supplytypesSupplyType": "8/sub",
      "supplytypesDescription": "Sub Contractors",
      "variable_selected": false
    }
  ]
}

Expenses list

List of expenses

 

List expenses

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action Expenses list &action=expenseslist
<Parameters> Identifies the company record(s) you wish to list
company Company ID &company=1
rows (optional) No. of records &rows=3
page (optional) No. of pages &page=1

Example request:

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&company=1&action=expenseslist&page=1&rows=2

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 142,
  "totalpages": 71,
  "responsemessage": "",
  "pagerows": 2,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "supplieruuid": "1C740E283C8D2A41B4A1CA7E4964171B",
      "supplierTimeStampModified": 1484611797,
      "supplierRecordVersionNumber": 1,
      "supplierCustomField317": "",
      "supplierCustomField321": "",
      "supplierName": "Spock",
      "supplierCode": "1/",
      "supplierPhone": "",
      "supplierExpense": true,
      "supplierInactive": false,
      "supplierOnHold": false,
      "supplierMainEmail": "",
      "supplierSupplytypeDescription": "Space expenses",
      "supplierMarkup": 1,
      "supplierWebURL": "",
      "supplierProspect": false
    },
    {
      "supplieruuid": "E38CC3D1F50D5B47985316AB007D692B",
      "supplierTimeStampModified": 1484059790,
      "supplierRecordVersionNumber": 1,
      "supplierCustomField317": "",
      "supplierCustomField321": "",
      "supplierName": "Helen White",
      "supplierCode": "1/12",
      "supplierPhone": "",
      "supplierExpense": true,
      "supplierInactive": false,
      "supplierOnHold": false,
      "supplierMainEmail": "",
      "supplierSupplytypeDescription": "Hotel Expenses1",
      "supplierMarkup": 1,
      "supplierWebURL": "",
      "supplierProspect": false
    }
  ]
}

Orderers list

List of orderers

 

List orderers

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action List of orderers &action=orderers
<Parameters> Identifies the company record(s) you wish to list
company Company ID &company=1

Example request:

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=orderers&company=1

Example response:

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

Currencies

List of currencies

 

List currencies

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action List of currencies &action=currencies
<Parameters> Identifies the company record(s) you wish to list
company Company ID &company=1

Example request:

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=currencies&company=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 5,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "currencyCode": "",
      "currencyCurrencyName": "- Base currency -",
      "variable_selected": false
    },
    {
      "currencyCode": "1/AED",
      "currencyCurrencyName": "Dirhams",
      "variable_selected": false
    },
    {
      "currencyCode": "1/EUR",
      "currencyCurrencyName": "Euro",
      "variable_selected": false
    },
    {
      "currencyCode": "1/KWD",
      "currencyCurrencyName": "Kuwaiti dinar",
      "variable_selected": false
    },
    {
      "currencyCode": "1/USD",
      "currencyCurrencyName": "US Dollars",
      "variable_selected": false
    }
  ]
}

Job list with currency

List of jobs with currency code and rate

 

List jobs with currency code and rate included

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action List of jobs &action=jobslist
<Parameters> Identifies the company record(s) you wish to list
company Company ID &company=1
rows (optional) No. of records &rows=3
page (optional) No. of pages &page=1

Example request:

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=jobslist&company=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1395,
  "totalpages": 1395,
  "responsemessage": "",
  "pagerows": 1,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "jobUuid": "622AF2431CE74F5A931D9629D4F6CFE1",
      "jobTimeStampModified": 1515754101,
      "jobRecommendedVersionNumber": 1569,
      "jobDescription1stLine": "Wizzy Wizzy  line 1",
      "jobCustomField185": "",
      "jobCustomField202": "Item 2",
      "jobCustomField208": "2013-09-30",
      "jobCustomField216": 2,
      "jobCustomField217": false,
      "jobCustomField218": "3",
      "jobCustomField231": 4,
      "jobCustomField232": 1,
      "jobCustomField236": "",
      "jobCustomField238": "Item 2",
      "jobCustomField257": "",
      "jobCustomField258": "",
      "jobCustomField290": "0000-00-00",
      "jobThermProgress": "39%",
      "jobThermValue": 30,
      "jobThermWhitePoint": 110,
      "jobOrderNumber": "2222",
      "jobContactFullName": "nice contact just ad smith",
      "jobHandlerFullName": "Mike Pender",
      "jobClientCode": "1/BLOGGS",
      "jobClientName": "Barclaycard Merchant 3",
      "jobCompleted": false,
      "jobDateIn": "2006-01-03",
      "jobDateDue": "2015-03-31",
      "jobNumber": "1/00000051",
      "jobNumberSimple": "51",
      "jobStatus": 2,
      "jobStatusDescription": "Live",
      "jobJobtypeDescription": "Date test",
      "jobPriorityDescription": "Special",
      "jobCurrencyCode": "",
      "jobExchangeRate": 1
    }
  ]
}

Purchase order descriptions

List of jobs with currency code and rate

 

List of purchase order descriptions

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action PO descriptions &action=podescriptions
<Parameters> Identifies the company record(s) you wish to list
company Company ID &company=1

Example request:

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=podescriptions&company=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 7,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "podescriptionsDescription": "aaad",
      "variable_selected": false,
      "podescriptionsPoText": "PO1"
    },
    {
      "podescriptionsDescription": "asaa",
      "variable_selected": false,
      "podescriptionsPoText": "PO2"
    },
    {
      "podescriptionsDescription": "B&W Printing",
      "variable_selected": false,
      "podescriptionsPoText": "PO3"
    },
    {
      "podescriptionsDescription": "Colour Printing",
      "variable_selected": false,
      "podescriptionsPoText": "PO4"
    }
  ]
}

Print purchase order

Print purchase order

 

Print a purchase order

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action Print PO background &action=purchaseinputprints -2096
action Print PO Open/Save &action=purchaseinputfiles -2096
<Parameters> Identifies the company record(s) you wish to list
purchase Purchase ID &purchase=10007388

Example requests:

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=purchaseinputprints -2096&purchase=10008242
http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=purchaseinputfiles  -2096&purchase=10008242

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "PDF created successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "variable_attachmentbase64blob": "JVBERi0xLjMKJeLjz9MKNSAw…WYKMTQ0NTcyNwolJUVPRgo=",
      "variable_attachmentfilename": ".PDF"
    }
    ]
} 

List print templates/files

List of print templates/files

 

List of print templates/files

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action Purchase prints &action=purchaseinputprints
action Purchase files &action=purchaseinputfiles
<Parameters> Identifies the company record(s) you wish to list
purchase Purchase ID &purchase=10007388

Example requests:

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=purchaseinputprints&purchase=10007388
http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=purchaseinputfiles&purchase=10007388

Example request:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 3,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "menuClickAction": "PURCHASEINPUTFILE PURCHASEINPUTFILEREPORT -1938",
      "menuDefault": false,
      "menuDescription": "**PO Text Template 1",
      "menuExpanded": false,
      "menuLevelName": "PURCHASEINPUTFILE",
      "menuParameter": "",
      "menuParentName": "",
      "menuSort": "",
      "menuSortDirection": ""
    },
    {
      "menuClickAction": "PURCHASEINPUTFILE PURCHASEINPUTFILEREPORT -2096",
      "menuDefault": false,
      "menuDescription": "**PO Text Template 1 HM",
      "menuExpanded": false,
      "menuLevelName": "PURCHASEINPUTFILE",
      "menuParameter": "",
      "menuParentName": "",
      "menuSort": "",
      "menuSortDirection": ""
    },
    {
      "menuClickAction": "PURCHASEINPUTFILE PURCHASEINPUTFILEREPORT -1951",
      "menuDefault": false,
      "menuDescription": "Fifth Ring Dubai PO Text Email Template",
      "menuExpanded": false,
      "menuLevelName": "PURCHASEINPUTFILE",
      "menuParameter": "",
      "menuParentName": "",
      "menuSort": "",
      "menuSortDirection": ""
    }
  ]
}

Supplier contacts

List of supplier contacts

 

List of supplier contacts

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action Supplier contacts &action=contacts
<Parameters> Identifies the company record(s) you wish to list
company Company ID &company=1
supplier (optional) Supplier code &supplier=1/aaaa

Example request:

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=contacts&company=1&supplier=1/aaaa

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 5,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "suppliercontactInternalRef": 304,
      "suppliercontactForwardsfullName": "Jammy Dodger",
      "variable_selected": false
    },
    {
      "suppliercontactInternalRef": 266,
      "suppliercontactForwardsfullName": "Jimmy Smith",
      "variable_selected": false
    },
    {
      "suppliercontactInternalRef": 276,
      "suppliercontactForwardsfullName": "jon test ing2",
      "variable_selected": false
    },
    {
      "suppliercontactInternalRef": 332,
      "suppliercontactForwardsfullName": "s1 s1",
      "variable_selected": false
    }
  ]
}

Tax codes

List of tax codes

 

List of tax codes

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
action List of tax codes &action=taxcodes
<Parameters> Identifies the company record(s) you wish to list
company Company ID &company=1

Example request:

http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.2&action=taxcodes&company=1

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 11,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "taxCode": 111,
      "taxCodeDescription": "111 (AU 111%)",
      "variable_selected": false
    },
    {
      "taxCode": 0,
      "taxCodeDescription": "0 (UK 0%)",
      "variable_selected": true
    },
    {
      "taxCode": 10,
      "taxCodeDescription": "10 (US 10%)",
      "variable_selected": false
    },
    {
      "taxCode": 56,
      "taxCodeDescription": "56 (ZA 1%)",
      "variable_selected": false
    }
  ]
}

Quotes API

 

Quote lines list

Quotes on job or phase

 

Quotes

List of quote lines for a job or phase

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
<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/quotes.json?user=user&password=user&version=3.2&company=1&Job-Number=1/00008303

Example response:

{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"totalrows": 1,
"totalpages": 1,
"responsemessage": "",
"pagerows": 0,
"pagenumber": 1,
"success": true,
"data": [
{
"quoteUuid": "13FEE4B57B744843BEC935841CECCEEE",
"quoteTimestampModified": 1520348332,
"quoteRecordVersionNumber": 6,
"quoteBreakCode": "000001",
"quoteBreakLine": true,
"quoteDiscChargeRate": 0,
"quoteLineBold": false,
"quoteLineDescription": "Artwork",
"quoteLineDetail": "Includes work on icons",
"quoteLineItalic": false,
"quoteLineNumber": 1,
"quoteLineQty": 1,
"quoteLineUnderline": false,
"quoteLineValue": 110
}
  etc..
]
}

Note: Feature from API 2.2

Thermos API

List of thermometer index numbers

 

Thermos list

 

Thermos list

List of thermometer index numbers

Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
<input mandatory>company Company ID &company=1
<input mandatory>type Job or Phase &type=job or &type=phase

Example request:
Request to list thermos

http://<SERVER>/jsonapi/thermos.json?user=user&password=user&version=3.2&company=1&type=job

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 0,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "lookupJobPhaseThermGroup": "KeyThermos",
      "lookupJobPhaseThermName": "Key thermos",
      "lookupJobPhaseThermNumber": -1,
      "lookupJobPhaseThermWhitePoint": 0
    },
    {
      "lookupJobPhaseThermGroup": "KeyThermos",
      "lookupJobPhaseThermName": "Actual to estimated cost",
      "lookupJobPhaseThermNumber": 1,
      "lookupJobPhaseThermWhitePoint": 110
    }
  ]
}

Note: Feature from API 2.2

Timesheets (actuals) API

Time sheets that have been posted to a job

 

Using the timesheets (actuals) API

Timesheet list

List of time sheets posted to jobs

 

List of posted timesheets

If you wish to access multiple timesheet records you would normally use the timesheetslist model

For timesheets two models are available:

  • timesheetslist
  • timesheetdetails
Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
Company The company context company=1
<filter>Job Job number job=1/00000482
<filter>Jobphase Job phase number job=1/00000482.006
<filter>date timesheet date date="2018-03-22"
Style Output style style=modeldata
Structure Model Structure modelstructure=timesheetslist
Response Returned data See below

Multi-value filters
It's possible to include multiple values for companies & Resources

Example request:

Request for data (list of records using specified model)

http://<SERVER>/jsonapi/time.json?style=modeldata&modelstructure=timesheetslist&user=user&password=user&company=1&job=1/00000482&version=3.2

Example of querying for multiple companies

http://SERVER/jsonapi/time.json?style=modeldata&modelstructure=timesheetslist&user=user&password=user&company=[1,2,3]&version=3.2

Example of querying for multiple resources

http://<SERVER>/jsonapi/time.json?style=modeldata&modelstructure=timesheetslist&user=user&password=user&company=2&resource=["1/MP","1/KW"]&version=3.2

Example response:

{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"totalrows": 93,
"totalpages": 1,
"responsemessage": "",
"pagerows": 0,
"pagenumber": 1,
"success": true,
"data": [
{
"tsUuid": "4BAEBA807F9C4AF2A24C46D4ABA8C1DB",
"tsTimestampModified": 1387286471,
"tsRecordVersionNumber": 1,
"tsJobAndPhase": "1/00000482.001",
"tsPhaseDescription": "1Rebrand the POS materials\rRebrand the POS materials\rRebrand the POS materials",
"tsStageCode": "",
"tsStageDescription": "",
"tsTaskDesc": "",
"tsChargeCode": "1/PPTDES",
"tsChargeCodeDescription": "Powerpoint Designer",
"tsTimeDate": "2000-12-14",
"tsResourceCode": "1/ATJ",
"tsResource": "Anne Jones",
"tsSalesInvNo": "10058",
"tsHoursTotal": 8,
"tsHoursNormal": 8,
"tsHoursOtime1": 0,
"tsHoursOtime2": 0,
"tsWorkDone": "Designed the new logo"
},
{
"tsUuid": "4AE2E22AC26845E78CA7C9E45EA6A19A",
"tsTimestampModified": 1387286471,
"tsRecordVersionNumber": 1,
"tsJobAndPhase": "1/00000482.001",
"tsPhaseDescription": "1Rebrand the POS materials\rRebrand the POS materials\rRebrand the POS materials",
"tsStageCode": "",
"tsStageDescription": "",
"tsTaskDesc": "",
"tsChargeCode": "1/PPTDES",
"tsChargeCodeDescription": "Powerpoint Designer",
"tsTimeDate": "2000-12-13",
"tsResourceCode": "1/ATJ",
"tsResource": "Anne Jones",
"tsSalesInvNo": "10058",
"tsHoursTotal": 8,
"tsHoursNormal": 8,
"tsHoursOtime1": 0,
"tsHoursOtime2": 0,
"tsWorkDone": ""
},
  ...

Timesheet details

Retrieve details of a posted timesheet

 

Details of a posted timesheet

If you wish to access a single timesheet record you would normally use the timesheetdetails model

For timesheets two models are available:

  • timesheetslist
  • timesheetdetails
Parameter Description Examples
<General> Parameters described in overview user=user&password=user&version=3.2
Company The company context company=1
<filter>Job Job number job=1/00000482
<filter>Jobphase Job phase number job=1/00000482.006
<filter>date timesheet date date="2018-03-22"
Style Output style style=modeldata
Structure Model Structure modelstructure=timesheetdetails
Response Returned data See below

Example request:

Request for data (list of records using specified model)

http://<SERVER>/jsonapi/time.json?style=modeldata&modelstructure=timesheetdetails&user=user&password=user&company=1&job=1/00000482&version=3.2

Example response:

{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"totalrows": 93,
"totalpages": 1,
"responsemessage": "",
"pagerows": 0,
"pagenumber": 1,
"success": true,
"data": [
{
"tsUuid": "4BAEBA807F9C4AF2A24C46D4ABA8C1DB",
"tsTimestampModified": 1387286471,
"tsRecordVersionNumber": 1,
"tsJobAndPhase": "1/00000482.001",
"tsPhaseDescription": "1Rebrand the POS materials\rRebrand the POS materials\rRebrand the POS materials",
"tsStageCode": "",
"tsStageDescription": "",
"tsTaskDesc": "",
"tsChargeCode": "1/PPTDES",
"tsChargeCodeDescription": "Powerpoint Designer",
"tsTimeDate": "2000-12-14",
"tsResourceCode": "1/ATJ",
"tsResource": "Anne Jones",
"tsSalesInvNo": "10058",
"tsHoursTotal": 8,
"tsHoursNormal": 8,
"tsHoursOtime1": 0,
"tsHoursOtime2": 0,
"tsWorkDone": "Designed the new logo",
"tsChargeType": "",
"tsCostType": "",
"tsHoursCost": 160,
"tsApprovalNotes": "",
"tsTransferHistory": "",
"tsTickoffType": "",
"tsTransferredFrom": ""
},
  ...

Timesheets (pending) API

 

Using the pending time sheets API. Pending time sheets are those that have been entered by the user but not yet posted to a job.

Submitted pending timesheets list

Time sheets that have been submitted for approval by the user, but are not yet posted to a job

 

List pending timesheets

Retrieve a list of pending timesheets

Parameter Description Examples
API The API area tspending.json
Action Defines the API endpoint action=timesheetpendinglist
<General> Parameters described in overview user=user&password=user&version=3.2
<Mandatory>Resource Filter by resource resource=1/jon
Date Date filter date=2018-06-26

Filtering the list
Key field filters

Example request:
Request to list pending timesheets

Statuses
P – Posted … (if in process of being posted)
A - Approved
Q - Queried
R - rejected
H - held
W – web/pending/default status (not included in this API return data)

http://<SERVER>/jsonAPI/tspending.json?user=user&password=user&version=3.2&company=1&resource=1/jon&action=timesheetpendinglist

Example response:

{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"totalrows": 14,
"totalpages": 1,
"responsemessage": "",
"pagerows": 0,
"pagenumber": 1,
"success": true,
"data": [
{
"tspUuid": "543EE014124AFF45B8DC97A460B666B8",
"tspTimeStampModified": 1528456578,
"tspRecordVersionNumber": 0,
"tspApprovalStatus": "W",
"tspChargeCode": "1/HK",
"tspComplete": "",
"tspDiaryInternal": 0,
"tspEntryNo": 3608,
"tspHoursNormal": 1,
"tspHoursOtime1": 0,
"tspHoursOtime2": 0,
"tspJobAndPhase": "1/VJH.001",
"tspMaterialCode": "",
"tspMatQuantity": 0,
"tspTaskDescription": "",
"tspTimeDate": "2018-06-07",
"tspWorkDone": "",
"tspStageCode": "",
"tspApprovalStatusName": "Unsubmitted",
"tspChargeCodeDescription": "Creative Design",
"tspApproverNotes": "",
"tspCompleteStages": false,
"tspCopy": "Y",
"tspDelete": "Y",
"tspEdit": "N",
"tspMaterials": 0,
"tspMovestages": false,
"tspSubmit": "Y",
"tspSubmitterNotes": "",
"tspTimerElapsedNormal": 0,
"tspTimerElapsedOt1": 0,
"tspTimerElapsedOt2": 0,
"tspTimerStatusNormal": "",
"tspTimerStatusOt1": "",
"tspTimerStatusOt2": "",
"tspPhaseDescription": "Cancel and write off",
"tspJobPhaseNumberSimple": "VJH.001",
"tspClientCode": "1/BEACHGOL",
"tspJobClientName": "13th Beach Golf Resort (Base)",
"tspPhaseJobDescription1stline": "Cancel and write off",
"tspStageCurrentDescription": "",
"tspMatDescription": "",
"tspStageDescription": ""
},
{

Pending timesheets list

 

List pending timesheets

If you wish to access multiple tspending records you would normally use the tspendingslist model

For more details about using models see Using data models

For tspending two models are available:

  • tspendingslist
  • tspendingdetails

Retrieve a list of pending timesheets

Parameter Description Examples
API The API area tspending.json
Action Defines the API no action required
<General> Parameters described in overview user=user&password=user&version=3.2
Resource Filter by resource resource=1/jon
From date Date filter datefrom=2015-07-01
To date Date filter dateto=2015-07-01
Modelstructure Name of model required Modelstructure=tspendingslist Using data models

Multi-value filters
It's possible to include multiple values for companies & Resources (see examples below)

Filtering the list
Key field filters

Example request:
Request to list pending timesheets

Statuses
P – Posted … (if in process of being posted)
A - Approved
Q - Queried
R - rejected
H - held
W – web/pending/default status (not included in this API return data)

Example using a date and resource filter

http://<SERVER>/jsonAPI/tspending.json?user=user&password=user&version=3.2&company=1&resource=1/jon&datefrom=2015-07-01&dateto=2015-07-01&modelstructure=tspendingslist

Example using a multiple resource filter

http://<SERVER>/jsonAPI/tspending.json?user=user&password=user&version=3.2&company=1&resource=["1/JON","1/KAT","1/PR"]&modelstructure=tspendingslist

Example using a multiple company filter
http://<SERVER>/jsonAPI/tspending.json?user=user&password=user&version=3.2&company=[1,5,8]&modelstructure=tspendingslist

Example response:

{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"totalrows": 145,
"totalpages": 1,
"responsemessage": "",
"pagerows": 0,
"pagenumber": 1,
"success": true,
"data": [
{
"tspUuid": "71E8D950EC3F48DCBAC30C03D768B8BD",
"tspTimeStampModified": 1490360812,
"tspRecordVersionNumber": 11,
"tspEntryNo": 686,
"tspJobAndPhase": "1/00000772.001",
"tspStageCode": "",
"tspStageDescription": "",
"tspTaskDescription": "",
"tspChargeCode": "1/MAC",
"tspChargeCodeDescription": "MAC Work",
"tspResourceCode": "1/USER",
"tspResourceName": "User",
"tspMaterialCode": "1/A2CC",
"tspMatQuantity": 1,
"tspHoursNormal": 0,
"tspHoursOtime1": 0,
"tspHoursOtime2": 0,
"tspTimeDate": "2011-11-01"
},etc ...

Pending timesheets details

Returns a single tspending record

 

If you wish to access a single tspending record you would normally use the tspendingdetails model since it returns more fields than the 'list' model

For more details about using models see Using data models

For tspending two models are available:

  • tspendingslist
  • tspendingdetails

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

Retrieve a pending timesheet / or multiple records

Parameter Description Examples
API The API area tspending.json
Action Defines the API no action required
<General> Parameters described in overview user=user&password=user&version=3.2
Resource Filter by resource resource=1/jon
From date Date filter datefrom=2015-07-01
TSP entry no Record ID tspending=2008
To date Date filter dateto=2015-07-01
Modelstructure Name of model required Modelstructure=tspendingdetails Using data models

Filtering the list
Key field filters

Example request:
Request to list pending timesheets

Statuses
P – Posted … (if in process of being posted)
A - Approved
Q - Queried
R - rejected
H - held
W – web/pending/default status (not included in this API return data)

Example using a date and resource filter

http://<SERVER>/jsonAPI/tspending.json?user=user&password=user&version=3.2&company=1&resource=1/jon&datefrom=2015-07-01&dateto=2015-07-01&modelstructure=tspendingdetails

And to query for a single record

http://<SERVER>/jsonAPI/tspending.json?user=user&password=user&version=3.2&company=1&tspending=2008&modelstructure=tspendingdetails

Example response:

{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"totalrows": 1,
"totalpages": 1,
"responsemessage": "",
"pagerows": 0,
"pagenumber": 1,
"success": true,
"data": [
{
"tspUuid": "F857AEE722B14941BADE61689C8167F7",
"tspTimeStampModified": 1490360812,
"tspRecordVersionNumber": 4,
"tspEntryNo": 2008,
"tspJobAndPhase": "1/10252.001",
"tspStageCode": "",
"tspStageDescription": "",
"tspTaskDescription": "",
"tspChargeCode": "1/ALT",
"tspChargeCodeDescription": "Amends New",
"tspResourceCode": "1/JON",
"tspResourceName": "SYN_Jon",
"tspMaterialCode": "",
"tspMatQuantity": 0,
"tspHoursNormal": 1,
"tspHoursOtime1": 1,
"tspHoursOtime2": 1,
"tspApprovalStatus": "W",
"tspApprovalNotes": "",
"tspApprovalNotesReSubmit": "",
"tspWorkDone": "",
"tspTimeDate": "2015-09-28"
}
]
}

Create

 

Create

Parameter Description Examples
API The API area tspending.json
Action The action to perform action=create
<General> Parameters described in overview user=user&password=user&version=3.2
Company The company context company=1
input JSON string input="data": ...
<input mandatory>tspJobAndPhase Job and phase number "tspJobAndPhase":"1/00000001.001"
<input mandatory>tspTimeDate Time and date "tspTimeDate": "2018-07-18"
<input mandatory>tspResourceCode Resource code "tspResourceCode": "1/RC"
Response Returned data See below

Example request:

http://<SERVER>/jsonapi/tspending.json?user=user&password=user&version=3.2&company=1&action=create&input={"data":[{"tspJobAndPhase":"1/00000772.001","tspTimeDate": "2018-07-18","tspResourceCode": "1/USER"}]}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "tspUuid": "DEBE83A88C58144FA43FC2E3F9839C75",
      "tspTimeStampModified": 1532013707,
      "tspRecordVersionNumber": 0,
      "tspApprovalStatus": "W",
      "tspChargeCode": "1/MAC",
      "tspComplete": "",
      "tspDiaryInternal": 0,
      "tspEntryNo": 3636,
      "tspHoursNormal": 0,
      "tspHoursOtime1": 0,
      "tspHoursOtime2": 0,
      "tspJobAndPhase": "1/00000772.001",
      "tspMaterialCode": "",
      "tspMatQuantity": 0,
      "tspTaskDescription": "",
      "tspTimeDate": "2018-07-18",
      "tspWorkDone": "",
      "tspStageCode": "",
      "tspApprovalStatusName": "Unsubmitted",
      "tspChargeCodeDescription": "MAC Work",
      "tspApproverNotes": "",
      "tspCompleteStages": false,
      "tspCopy": "Y",
      "tspDelete": "Y",
      "tspEdit": "Y",
      "tspMaterials": 0,
      "tspMovestages": false,
      "tspSubmit": "N",
      "tspSubmitterNotes": "",
      "tspTimerElapsedNormal": 0,
      "tspTimerElapsedOt1": 0,
      "tspTimerElapsedOt2": 0,
      "tspTimerStatusNormal": "",
      "tspTimerStatusOt1": "",
      "tspTimerStatusOt2": "",
      "tspPhaseDescription": "phase description fds fsdfsd ffdsf sdfsdf sdfsdfsd fsdfsd fsdfsdf sdfs",
      "tspJobPhaseNumberSimple": "772.001",
      "tspClientCode": "1/00000571",
      "tspJobClientName": "57th & 1st Street Design",
      "tspPhaseJobDescription1stline": "Job descripton  dsfsdfsd fds",
      "tspStageCurrentDescription": "",
      "tspMatDescription": "",
      "tspStageDescription": ""
    }
  ]
}

Update

 

Update

Parameter Description Examples
API The API area tspending.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 to identify the timesheet to update "tspEntryNo":714
Data data to update "tspWorkDone":"work done"
Response Returned data See below

Example request:

http://<SERVER>/jsonapi/tspending.json?user=user&password=user&version=3.2&company=1&action=update&input={"data":[{"tspEntryNo":3636,"tspWorkDone":"test"}]}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "tspTimerStatusNormal": "",
      "tspTimerStatusOt1": "",
      "tspTimerStatusOt2": "",
      "tspEntryNo": 3636,
      "tspUuid": "DEBE83A88C58144FA43FC2E3F9839C75",
      "tspTimeStampModified": 0,
      "tspRecordVersionNumber": 0
    }
  ]
}

Delete

 

Delete

Parameter Description Examples
API The API area tspending.json
Action The action to perform action=delete
<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 to identify the timesheet to update "tspEntryNo":714
Response Returned data See below

Example request:

http://<SERVER>/jsonapi/tspending.json?user=user&password=user&version=3.2&company=1&action=delete&input={"data":[{"tspEntryNo":714}]}

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "data processed successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "tspUuid": "334EEB2AD102C940951D3E58F6DF4EF7",
      "tspEntryNo": 14013,
      "tspTimeStampModified": 1531908104,
      "tspending_recordversionnumber": 0
    }
  ]
}

Timesheet summary table

Timesheet summary table

 

Timesheet summary table

Parameter Description Examples
API The API area tspending.json
Action The action to perform action=timesheetsummary
<General> Parameters described in overview user=user&password=user&version=3.2
Company The company context company=1
Response Returned data See below

Example request:

http://<SERVER>/jsonapi/tspending.json?user=user&password=user&version=3.2&company=1&action=timesheetsummary

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 0,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [],
  "dates": [
    {
      "tspTssDay0Date": "2018-07-23",
      "tspTssDay1Date": "2018-07-24",
      "tspTssDay2Date": "2018-07-25",
      "tspTssDay3Date": "2018-07-26",
      "tspTssDay4Date": "2018-07-27",
      "tspTssDay5Date": "2018-07-28",
      "tspTssDay6Date": "2018-07-29"
    }
  ],
  "labels": [
    {
      "tspTssDay0Label": "Mon",
      "tspTssDay1Label": "Tue",
      "tspTssDay2Label": "Wed",
      "tspTssDay3Label": "Thu",
      "tspTssDay4Label": "Fri",
      "tspTssDay5Label": "Sat",
      "tspTssDay6Label": "Sun"
    }
  ],
  "ot1totals": [
    {
      "tspTssChargeableOt1Total": 0,
      "tspTssDay0Ot1Total": 0,
      "tspTssDay1Ot1Total": 0,
      "tspTssDay2Ot1Total": 0,
      "tspTssDay3Ot1Total": 0,
      "tspTssDay4Ot1Total": 0,
      "tspTssDay5Ot1Total": 0,
      "tspTssDay6Ot1Total": 0,
      "tspTssNonChargeableOt1Total": 0
    }
  ],
  "ot2totals": [
    {
      "tspTssChargeableOt2Total": 0,
      "tspTssDay0Ot2Total": 0,
      "tspTssDay1Ot2Total": 0,
      "tspTssDay2Ot2Total": 0,
      "tspTssDay3Ot2Total": 0,
      "tspTssDay4Ot2Total": 0,
      "tspTssDay5Ot2Total": 0,
      "tspTssDay6Ot2Total": 0,
      "tspTssNonChargeableOt2Total": 0
    }
  ],
  "resource": [
    {
      "tspTimeSheetHoursrequired": 0,
      "tspTssResourceChargeable": 0,
      "tspTssResourceNonChargeable": 0
    }
  ],
  "totals": [
    {
      "tspTssChargeableTotal": 0,
      "tspTssDay0Total": 0,
      "tspTssDay1Total": 0,
      "tspTssDay2Total": 0,
      "tspTssDay3Total": 0,
      "tspTssDay4Total": 0,
      "tspTssDay5Total": 0,
      "tspTssDay6Total": 0,
      "tspTssNonChargeableTotal": 0
    }
  ]
}

Company settings

Company settings related to timesheets

 

Company settings

Parameter Description Examples
API The API area tspending.json
Action The action to perform action=companysettings
<General> Parameters described in overview user=user&password=user&version=3.2
Company The company context company=1
Response Returned data See below

Example request:

http://<SERVER>/jsonapi/tspending.json?user=user&password=user&version=3.2&company=1&action=companysettings

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "companyUuid": "66619B8544E74787A6C7FA2445289A4A",
      "companyModified": 1532083132,
      "companyRecordVersionNumber": 3572,
      "companyNumber": 1,
      "companyTimesheetapproval": true
    }
  ]
}

Pending timesheet

 

Pending timesheet

Parameter Description Examples
API The API area tspending.json
Action The action to perform action=pendingtimesheet
<General> Parameters described in overview user=user&password=user&version=3.2
Company The company context company=1
tspending The pending timesheet number (tspEntryNo) tspending=686
Response Returned data See below

Example request:

http://<SERVER>/jsonapi/tspending.json?user=user&password=user&version=3.2&action=pendingtimesheet&tspending=686

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "tspUuid": "71E8D950EC3F48DCBAC30C03D768B8BD",
      "tspTimeStampModified": 1490360812,
      "tspRecordVersionNumber": 11,
      "tspApprovalNotesReSubmit": "",
      "tspApprovalNotes": "",
      "tspApprovalStatus": "W",
      "tspChargeCode": "1/MAC",
      "tspComplete": "",
      "tspEntryNo": 686,
      "tspHoursNormal": 0,
      "tspHoursOtime1": 0,
      "tspHoursOtime2": 0,
      "tspJobAndPhase": "1/00000772.001",
      "tspMaterialCode": "1/A2CC",
      "tspMatQuantity": 1,
      "tspResourceCode": "1/USER",
      "tspTaskDescription": "",
      "tspWorkDone": "",
      "tspChargeCodeDescription": "MAC Work",
      "tspMatDescription": "A2 Colour Proof",
      "tspResourceName": ""
    }
  ]
}

Pending copy

 

Pending copy

Parameter Description Examples
API The API area tspending.json
Action The action to perform action=pendingcopy
<General> Parameters described in overview user=user&password=user&version=3.2
Company The company context company=1
tspending The pending timesheet number (tspEntryNo) tspending=686
Response Returned data See below

Example request:

http://<SERVER>/jsonapi/tspending.json?user=user&password=user&version=3.2&action=pendingcopy&tspending=686

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "TS pending 686 record copied to 3640",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "tspEntryNo": 3640,
      "tspUuid": "F8281A58A3F9B942BB013FA483FD762C"
    }
  ]
}

Pending submit

 

Pending submit

Parameter Description Examples
API The API area tspending.json
Action The action to perform action=pendingsubmit
<General> Parameters described in overview user=user&password=user&version=3.2
Company The company context company=1
tspending The pending timesheet number (tspEntryNo) tspending=686
Response Returned data See below

Example request:

http://<SERVER>/jsonapi/tspending.json?user=user&password=user&version=3.2&action=pendingsubmit&tspending=686

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "TS pending record(s) submitted",
  "warningmessage": "",
  "success": true
}

Pending resubmit

 

Pending resubmit

Parameter Description Examples
API The API area tspending.json
Action The action to perform action=pendingresubmit
<General> Parameters described in overview user=user&password=user&version=3.2
Company The company context company=1
tspending The pending timesheet number (tspEntryNo) tspending=686
Response Returned data See below

Example request:

http://<SERVER>/jsonapi/tspending.json?user=user&password=user&version=3.2&action=pendingresubmit&tspending=686

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "TS pending record resubmitted",
  "warningmessage": "",
  "success": true
}

Timer

 

Timer

The action parameter is constructed as follows:

  • timer

add one of:

  • start
  • pause
  • resume
  • stop
  • cancel
  • discard
  • remove
  • elapsed

add one of:

  • normal
  • ot1
  • ot2

Examples:

  • timerstartnormal
  • timerpauseot1
  • timerelapsedot2
Parameter Description Examples
API The API area tspending.json
Action The action to perform action=timerstartnormal
<General> Parameters described in overview user=user&password=user&version=3.2
Company The company context company=1
input JSON string input="data": ...
<input mandatory>tspJobAndPhase Job and phase number "tspJobAndPhase":"1/00000001.001"
<input mandatory>tspTimeDate Time and date "tspTimeDate": "2018-07-18"
<input mandatory>tspResourceCode Resource code "tspResourceCode": "1/RC"
<input mandatory>tspResourceName Resource name "tspResourceName": "Resource Name"
Response Returned data See below

Example request:

http://<SERVER>/jsonapi/tspending.json?user=user&password=user&version=3.2&tspending=714&action=timerstartnormal

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "tspUuid": "81DBA7F4B5704925923BB4D43DC903F2",
      "tspEntryNo": 714,
      "tspending_timerstartdatenormal": "2018-07-19",
      "tspTimerStatusNormal": "RUNNING"
    }
  ]
}

User jobs list

List of jobs by user

 

User Jobs List

List of jobs by user

Parameter Description Examples
API The API area tspending.json
Action User Jobs List &action=userjobslist
<General> Parameters described in overview user=user&password=user&version=3.2
Company The company context &company=1
<input mandatory>resource: User Code &resource=1/jon

Example request:
Request to list jobs by user

http://<SERVER>/jsonapi/tspending.json?user=user&password=user&version=3.2&action=userjobslist&company=1&resource=1/jon

Example response: