Inbound API using Apex code
In this tutorial, we will look at creating an endpoint for Inbound Salesforce API using Apex code. We will stick to a nice and easy simple example. Our endpoint will rely on the account object. We will have 3 methods associated with @HttpGet, @HttpPost, @HttpDelete Get method will return 6 accounts Post method creates a new account with name. Delete method will delete the individual account based on ID supplied. @RestResource(urlMapping ='/AccountInfo/*') Global class AccountInfo { @httpget global static List<account> GetAccount() { list<account> a = [select name from account limit 6]; return a; } @httppost global static string PostNewAccount(string aName) { account a = new account(); a.name = aname; insert a; ret...