Plugins may extend the API simply by offering public model methods. Take for example a plugin called FooBar. The FooBar plugin may have the following model:

class FooBarSprocket extends FooBarModel {
 public function create(array $vars) {
 public function delete($sprocket_id) {
 private function calculateCost($sprocket_id) {

FooBarSprocket offers two public methods and one private method. Both FooBarSprocket::create() and FooBarSprocket::delete() are made available via the API at the following URLs, respectively:

We highly recommend using CamelCase when referencing models. This behavior is required for plugin models since version 4.0.

(Supported by all Blesta versions):[price]=1.99

(Supported by Blesta versions pre-4.0):[price]=1.99
Only public model methods are accessible via the API, protected and private methods are not.

Each plugin may create any number of models. To avoid name conflicts with other plugins and with core Blesta models, plugin models should be named by prepending the plugin name to the model as in the example above (FooBarSprocket).