Service Layer API Reference

This document is intended to provide all APIs exposed by Service Layer for users to reference during programming. The exposures covers all entities and actions. The API follows OData 3.0 protocol, which defines a uniform REST way to manipulate service data, thus making it technically feasible for users to leverage OData libraries (e.g. WCF) to consume data service provided by Service Layer.

Actions:

Actions are used to extend the set of operations that are able to be performed on services or entities. For example, the standard CRUD (create/read/update/delete) operations cannot be applied to cancel a sales order, but cancel action defined on orders service allows to easily implement it. In SAP Business One, actions are defined in the manner of business services.

Entities:

Entities represent the individual instances of objects (such as BusinessPartners and Orders). An entity type defines the category to which an entity belongs. Entity properties describe some aspects of the entity. A key must be supplied for one entity type to uniquely identify each instance of the entity type.
Basically, almost all entities support POST/GET/PATCH/DELETE operations, except for some special entities due to the special business logic. Besides, as Service Layer is based on OData protocol, OData query can be applied to both collection of entities and single entity via the HTTP method GET, but differs in the aspect of query options.