Table of Contents

Domain API

Introduction

The Domain API is the primary API for accessing and manipulating data in ERP.net. It is most useful for UI and service apps. For BI, you should use the Table API.

For an overview and introduction of the Domain API, read the thorough presentation at the home page of the developer docs.

Based on OData

The Domain API is based on the OData protocol. It allows object-oriented access to the data exposed by the ERP.net domain objects.

The OData API is structured along a number of entity types (called "repositories" in ERP.net), that represent the Domain Model of the ERP Instance. Each entity type contains data attributes, which can be filtered, sorted, etc. The model also provides information on how to navigate between the repositories.

For a quick introduction to OData, check the beginners tutorial at the OData site:

https://www.odata.org/getting-started/understand-odata-in-6-steps/

Step by step

To learn more about the ERP.net Domain API, read below:

  1. URL components - OData is heavy on the URL. Read this topic to understand the structure of the URL.
  2. Query options - read more about the supported OData query constructs like $filter, $top and similar.
  3. Query Builder - the visual query designer can help you easily build complex $select/$expand queries.
  4. Complex types - ERP.net defines several OData complex types, including quantity, amount and multi-language string.
  5. Transactions - ERP.net supports server-side front-end transactions.
  6. Working with documents - working with documents is a common scenario when using the API.
  7. Batch requests (OData site) - ERP.net fully supports batch requests, saving round-trips to the server.