---
title: Best Practises
slug: api/best-practises
description: Learn how to effectively use developer tools for entity order types in this document. Explore examples of ListViews and EditViews for viewing and editing records within entities. Discover the significance of saving a unique DataId when writing data to ENG
createdAt: 2022-07-06T14:30:31.000Z
---

# Developer-Tools&#x20;

## Example: Entity Order Types

Within the Order Types entity are the entries for "Maintenance", "Malfunction" and "Repair".&#x20;

### ListViews



For example, when you open the order types list, look in the network tab for a call to "FetchAllFilteredViaPost" (for the API there is the controller "Fetch"). Inside the sent payload as well as the response you can see how ENGINE4 or our API receives and sends data.&#x20;

### EditViews

In the ListViews you get records within the entities. Using an edit button (pencil icon) you can jump into the respective record and edit it. Also here queries are made in the background "FetchSingleObject" (for the API there is the controller "GET"). By looking at the payload, call parameters as well as responses you can get an idea of the data structure.&#x20;

# References / GUID

If you write data to ENGINE4 (e.g. via the "SaveAll" controller) you will receive (if the ReturnType = DataId is set) a unique DataId back. Together with the EntityID, the two fields form a unique assignment. It is mandatory that this DataId is saved in the source object (e.g. order in ERP or similar).&#x20;

Once a DataId is available in the source system, future queries, for example, can be designed unambiguously and faster with the help of the DataId than if metadata is searched for first and the DataId is used afterwards.&#x20;

# Currentness

Not all data changes regularly, therefore we recommend saving a DateTime field in the source system with the last synchronization between ENGINE4 and your source system. This allows you to automatically check whether an API call is necessary or whether the last change is older than the synchronization date. This saves resources and API calls.&#x20;

# Loops

Do not use loops to perform single API queries. If you want to fetch a list (Fetch) of records from an entity or perform multiple updates/inserts (SaveAll), you can perform them as a single statement. In doing so, you create the JSON in your interface and call the API call at the end. This has the goal to reduce the API calls and to save resources. **In case of excessive usage, the API limitations are quickly reached and further calls are blocked.&#x20;**

