The service API is used to invoke operations within Kodmyran Commerce and is the complement to the entity API which modified entities/objects. The two combined gives access to all functionality in Kodmyran Commerce.
The service API can used to build custom services that implements various functionality that is more sophisticated than simple object updates. It is commonly used to implement logic that requires a transactional consistent call involving multiple objects. A common examples would be e.g. a delivery of an order. Such a call would allocate a waybill, reduce warehouse inventory levels, update order status etc. and all these operations can only be performed as a single operation. It is also possible to plug in custom code that can be invoked this way, such code can access the native PHP framework API directly.
A single call to the Service API is fully transactional, a failure during processing will result in a database rollback of all data changed during that call.
Once the API key verification has been performed the call and role of the user is looked up in the service call map, if not present with the current role the call is denied.
The service API is available at the endpoint:
https://testaccount.shop4sale.se/admin/api/service
The services endpoint follows a similar design as the report interface, with a supplier level, a group level and then the final operation. Unlike the report interface this part is not currently browsable and you need to know the name of the service and get the JSON format expected from the provider/developer of the service.
https://testaccount.shop4sale.se/admin/api/service/supplier/group/operation