Below is the general structure of the APIs.

Response types:

Code
ResponseDescription
200OKSuccessful call and response body should generally be a JSON document or JSON collection.
Can be null if no record is found.
400Bad RequestLikely a problem with your data or missing values.
401UnauthorisedLikely your credentials didn't match your login.


GET

Get methods are available to get either a specific object or collection of an object. At times due to considerations of speed (such as with equipment types) a restricted view of the object collection is available.

Get /equipmenttypes

Get /equipmenttypes/999


PUT

Where available a PUT method will allow the creation of an object. It is generally easiest to call a get first to view the full field list about the values that can be supplied. Note that some of the values supplied are readonly. Such as clientid, modifiedby etc. 

The PUT command is rerunable. This means if an importuniqueid is supplied and there is already an existing record matching this importuniqueid it will be updated instead of created. This is impleted for clients, clientlocations, equipment, parts. 

PUT /clients

Request body example: 

[{

"name":"client1"

,"ContactFirstName":"site manager"

}]


PATCH

Where available the patch command allows you to update specific fields or objects. The structure of the command does not require the operation command and simply accepts a "path" (field) and "value" for each required field update. Multiple operations can be applied at once. 

The below example is how to update customer reference for a particular client.

PATCH /clients/{xxxx-xxxxxxx-xxxxxxxxx-xxxx}

Request body example: 

[{

"path":"ContactFirstName "

,"value":"new site manager"

}]


Delete

There is no delete method as all data is system retained, but simply using the patch command setting isActive to false achieves the same result.