The Data Contracts lets you define the response structure of the service, based on an existing Class / Business Object. The interface lists every Class that will be used in the left part of the screen and on the right part the contained attributes of the currently selected class:
The first available class will be added automatically once you define the returned data type in the service's Implementation Section.
Select a Class from the left side of the interface and its details will be displayed on the right part of your screen.
This section displays every attribute of the current Class with a primitive/simple data type (e.g. int, string, bool). Checking an attribute instructs the API to include it in the response and omit the unchecked ones.
Here are displayed the attributes of the current Class with complex data types (e.g. Order, Category). You can check these attributes that you want to include in the API's response, but you must also make sure that the selected attribute's data type has also been defined and configured. If a complex data type is not listed in the left part of the screen you can add it by clicking on the link icon of that type:
Similarly you can configure the rest Classes you add.
The Data Contract for each Class is unique. This means that in every attribute of the same type will apply the same Data Contract configuration, irrelevant of its place, number of appeances, depth etc. in the data structure.