EXACT Online Tips

Use the following tips and tricks to get more use out of the REST API.

OpenCombine POST with GET
In the REST API, the POST command is used to create a new entity.Once the POST command has successfully completed, the entity will contain all properties with the NULL value. Use the following header to get the entity with all the properties filled containing the current values:

Prefer: return=representation.

This way you won't need to use GET to get the filled in properties.

OpenEfficient table synchronization
If the client app stores the Exact Online accounts in a local database, it is required to update the data periodically with the Exact Online data.

Use the following filters on the created and modified properties to only update the modified and new data.

https://start.exactonline.nl/api/v1/4/crm/Accounts?$select=ID,Code,Name&$filter=Created ge datetime'2014-01-01' or Modified gedatetime'2014-01-01’

Modify $select to specify the properties that you need.
Modify &$filter=Created ge datetime'2014-01-01' or Modified ge datetime'2014-01-01’ to filter.
OpenFilter on Account Code
In Exact Online the Code property of the accounts service is a string field with a fixed length of 18 characters, which contains a number with leading spaces. If you do this you will automatically get the numerical digits in ascending order, sorted by code.

When a new account is created the value of the highest used code is incremented by 1.

To find an account with a specific code you can use the value including leading spaces:

GET REQUEST

https://start.exactonline.nl/api/v1/{division}/CRM/Accounts/?$top=1&$filter=Code eq ' 25'

When you don’t want to use the leading spaces you can also use the “trim” function, but this is less efficient.

GET REQUEST

https://start.exactonline.nl/api/v1/{division}/CRM/Accounts/?$top=1&$filter=trim(Code) eq '25'