{"id":2677,"date":"2021-04-07T10:30:29","date_gmt":"2021-04-07T09:30:29","guid":{"rendered":"https:\/\/www.bluewavegroup.eu\/?p=2677"},"modified":"2023-01-17T13:20:13","modified_gmt":"2023-01-17T13:20:13","slug":"inbound-rest-api-salesforce","status":"publish","type":"post","link":"https:\/\/bluewavecx.com\/ie\/blog\/inbound-rest-api-salesforce\/","title":{"rendered":"Building an Inbound Rest API for Salesforce"},"content":{"rendered":"<div class=\"wpb-content-wrapper\" id=\"wpb-content-root\"><p>[vc_row][vc_column][vc_column_text]<\/p>\n<h4>A Step-by-Step Guide to Salesforce REST API Integration for Apex Developers<\/h4>\n<p>Author: <a href=\"https:\/\/www.linkedin.com\/in\/ismail-basser-96354a140\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Ismail Basser, Salesforce Consultant<\/a> at Bluewave Technology<\/p>\n<hr class=\"wp-block-separator is-style-wide\" \/>\n<h3>Introduction<\/h3>\n<p>Recently, I developed a solution with the Salesforce Rest API and found the experience a bit cumbersome simply because existing documentation was somewhat limited and scattered for my needs. The below retrospective sets out to provide readers with a comprehensive overview on REST API development that I myself would have found useful. I&#8217;m going to try to bridge some documentation gaps while walking through the setup of an example inbound REST API integration between a Salesforce org and an external system as depicted in this diagram.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3685\" src=\"https:\/\/bluewavecx.com\/wp-content\/uploads\/2021\/04\/2021-04-01_12h44_31.png\" alt=\"\" width=\"1143\" height=\"289\" srcset=\"https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-01_12h44_31.png 1143w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-01_12h44_31-1024x259.png 1024w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-01_12h44_31-768x194.png 768w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-01_12h44_31-380x96.png 380w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-01_12h44_31-390x99.png 390w\" sizes=\"auto, (max-width: 1143px) 100vw, 1143px\" \/><\/p>\n<h3>But first. Why would you do this?<\/h3>\n<p>Complex business processes sometimes rely on data between Salesforce and an external system. To enforce custom business logic, we might deploy a custom apex class to help us handle data operations between these systems. To begin, we need to authorise an external system to connect to Salesforce (in 2 Steps). After the connection is established, the external system can successfully make API calls to Salesforce and receive responses.<\/p>\n<h3>Step #1 Authorisation using a Salesforce Connected App<\/h3>\n<p><a href=\"https:\/\/help.salesforce.com\/articleView?id=sf.connected_app_overview.htm&amp;type=5\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Connected app<\/a>s allow external systems to securely connect with Salesforce. An HTTP POST call is made to Salesforce and an access token is passed back. This access token is then used as the bearer token when making API calls to Salesforce. Let\u2019s go ahead and create a new connected app in Salesforce. To do this, we&#8217;ll navigate to \u201cApp Manager\u201d then select \u201cNew Connected App\u201d. <strong>LEX Click Path: Setup<\/strong> &gt; <strong>Apps &gt; App Manager &gt; New Connected App<\/strong>.<\/p>\n<figure class=\"wp-block-image size-large\"><figcaption><em><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3686\" src=\"https:\/\/bluewavecx.com\/wp-content\/uploads\/2021\/04\/2021-04-01_12h52_31.png\" alt=\"\" width=\"1600\" height=\"735\" srcset=\"https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-01_12h52_31.png 1600w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-01_12h52_31-1024x470.png 1024w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-01_12h52_31-768x353.png 768w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-01_12h52_31-1536x706.png 1536w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-01_12h52_31-380x175.png 380w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-01_12h52_31-390x179.png 390w\" sizes=\"auto, (max-width: 1600px) 100vw, 1600px\" \/>Interested to learn more about how connected apps integrate external applications with Salesforce? Continue on <a href=\"https:\/\/trailhead.salesforce.com\/en\/content\/learn\/modules\/connected-app-basics\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Trailhead<\/a>.<\/em><\/figcaption><\/figure>\n<p>We will input high-level app configuration details like the connected app name and associated email. The app name might identify the external system which will rely on this connection and the associated email might be an IT support email account.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3687\" src=\"https:\/\/bluewavecx.com\/wp-content\/uploads\/2021\/04\/2021-04-01_13h06_44.png\" alt=\"\" width=\"1224\" height=\"561\" srcset=\"https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-01_13h06_44.png 1224w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-01_13h06_44-1024x469.png 1024w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-01_13h06_44-768x352.png 768w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-01_13h06_44-380x174.png 380w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-01_13h06_44-390x179.png 390w\" sizes=\"auto, (max-width: 1224px) 100vw, 1224px\" \/>Next is the API (Enable OAuth Settings) section within the connected app details. In most cases, the Callback URL will be \u201clogin.salesforce.com\u201d or if you&#8217;re using a Salesforce sandbox \u201ctest.salesforce.com.\u201d Below you&#8217;ll see I specified \u201ctrailheadapp:\/\/auth\/success\u201d as per the instructions to complete a Trailhead Module.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3688\" src=\"https:\/\/bluewavecx.com\/wp-content\/uploads\/2021\/04\/2021-04-02_14h08_09.png\" alt=\"\" width=\"1555\" height=\"597\" srcset=\"https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-02_14h08_09.png 1555w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-02_14h08_09-1024x393.png 1024w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-02_14h08_09-768x295.png 768w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-02_14h08_09-1536x590.png 1536w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-02_14h08_09-380x146.png 380w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/2021-04-02_14h08_09-390x150.png 390w\" sizes=\"auto, (max-width: 1555px) 100vw, 1555px\" \/><\/p>\n<p>1.) Ensure you mark all of the following as true. A.) Enable OAuth Settings B.) Require Secret for Web Service Flow and C.) Require Secret for Refresh Token Flow.<\/p>\n<p>2.) Ensure that the \u201cSelected OAuth Scopes\u201d includes: A.) Access and manage your data (api) B.) Perform requests on your behalf at any time (refresh_token, offline_access) and C.) Provide access to your data via the Web (web).<\/p>\n<p>3.) Ensure this new connected app is assigned to the user that will login to make the API calls (most likely an Integration User). You can accomplish this by either updating that user&#8217;s profile or by creating and assigning a permission set.<\/p>\n<h3>Step #2 The HTTP POST Call into Salesforce for Authentication<\/h3>\n<p>For this demonstration, I will substitute <a href=\"https:\/\/developer.salesforce.com\/blogs\/2020\/03\/explore-the-salesforce-apis-with-a-postman-collection.html\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Postman<\/a> as a mock external system to make the POST callout to Salesforce. The URL below is required. A request body is not needed. If using Postman, you will notice how the parameters start to auto-populate. (If in a sandbox, then the URL will be test.salesforce.com\u2026\u2026)<\/p>\n<p><em>The HTTP POST Callout<\/em> URL<\/p>\n<figure>\n<table>\n<tbody>\n<tr>\n<td class=\"has-text-align-center\" data-align=\"center\"><em>https:\/\/login.salesforce.com\/services\/oauth2\/token?grant_type=password&amp;client_id=[<\/em><span class=\"has-inline-color has-vivid-red-color\">CONSUMER_KEY<\/span><em>] &amp;client_secret=[<\/em><span class=\"has-inline-color has-vivid-red-color\">CLIENT_SECRET<\/span><em>]&amp;username[<\/em><span class=\"has-inline-color has-vivid-red-color\">SALESFORCE_USERNAME<\/span><em>]&amp;password=[<\/em><span class=\"has-inline-color has-vivid-red-color\">SALESFORCE_PASSWORD+SECURITY_TOKEN<\/span><em>]<\/em><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p><em>The URL Parameters<\/em><\/p>\n<figure class=\"wp-block-table\">\n<table>\n<tbody>\n<tr>\n<td><strong>Parameter<\/strong><\/td>\n<td><strong>Value<\/strong><\/td>\n<\/tr>\n<tr>\n<td>grant_type<\/td>\n<td>password<\/td>\n<\/tr>\n<tr>\n<td>client_id<\/td>\n<td>This is the consumer key from the related Salesforce connected app<\/td>\n<\/tr>\n<tr>\n<td>client_secret<\/td>\n<td>The client secret from the related Salesforce connected app<\/td>\n<\/tr>\n<tr>\n<td>username<\/td>\n<td>The Salesforce username of your Integration User<\/td>\n<\/tr>\n<tr>\n<td>password<\/td>\n<td>The Salesforce Integration User&#8217;s password and security token concatenated (without spaces)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p><em>Example in Postman<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3710\" src=\"https:\/\/bluewavecx.com\/wp-content\/uploads\/2021\/04\/Postman.png\" alt=\"\" width=\"1495\" height=\"796\" srcset=\"https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/Postman.png 1495w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/Postman-1024x545.png 1024w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/Postman-768x409.png 768w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/Postman-380x202.png 380w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/Postman-390x208.png 390w\" sizes=\"auto, (max-width: 1495px) 100vw, 1495px\" \/><\/p>\n<p>You will then receive an \u201caccess_token\u201d that you can use to make an API call into the Salesforce org.<\/p>\n<h3>REST API Calls<\/h3>\n<p>For any HTTP calls made to Salesforce, you will need to add the following two parameters to the header of the request. This is for the request from the external system into Salesforce.<\/p>\n<figure>\n<table>\n<tbody>\n<tr>\n<td><strong>Parameter<\/strong><\/td>\n<td><strong>Value<\/strong><\/td>\n<\/tr>\n<tr>\n<td>Authorization<\/td>\n<td>Bearer [access_token]<\/td>\n<\/tr>\n<tr>\n<td>Content-Type<\/td>\n<td>Application\/json<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>Here&#8217;s an <a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.apexcode.meta\/apexcode\/apex_rest_code_sample_basic.htm\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Apex REST Code Sample<\/a> to demonstrate how to implement a simple REST API in Apex with three HTTP request methods to delete, retrieve, and update a record. For my own Apex class, I&#8217;ve implemented the following URL Mapping.<\/p>\n<pre><code>@RestResource(urlMapping='\/Account\/*')<\/code><\/pre>\n<h3>Get Call<\/h3>\n<p>An HTTP GET call is used to retrieve data from Salesforce, in this example we will retrieve some information about an account record based on the Id we provide. As I have created an Apex class with a URL mapping to handle the inbound GET API call, we will need to use a custom URL. For this reason, we will use the URL displayed below.<\/p>\n<pre><code>https:\/\/UM6.salesforce.com\/services\/apexrest\/Account\/0014K00000Aus8dQAB<\/code><\/pre>\n<p>Note that \u201cUM6\u201d is the Salesforce instance and \u201c0014K00000Aus8dQAB\u201d is the Salesforce account record id. A request body is not needed for a GET.<\/p>\n<figure><\/figure>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3711\" src=\"https:\/\/bluewavecx.com\/wp-content\/uploads\/2021\/04\/Postman2.png\" alt=\"\" width=\"1523\" height=\"739\" srcset=\"https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/Postman2.png 1523w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/Postman2-1024x497.png 1024w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/Postman2-768x373.png 768w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/Postman2-380x184.png 380w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/Postman2-390x189.png 390w\" sizes=\"auto, (max-width: 1523px) 100vw, 1523px\" \/><\/p>\n<p>The response of this GET API call returns the account record&#8217;s name (accName) and Id (accid). This is because the following wrapper class is used for the response (this is an inner class).<\/p>\n<pre><code>global class AccountWrapper {\r\n    public String accid{get; set;}\r\n    public String accName{get; set;}\r\n}<\/code><\/pre>\n<p>And the Apex method that handles the GET call looks like so&#8230;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3713\" src=\"https:\/\/bluewavecx.com\/wp-content\/uploads\/2021\/04\/doGet-Method.png\" alt=\"\" width=\"1054\" height=\"763\" srcset=\"https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/doGet-Method.png 1054w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/doGet-Method-796x576.png 796w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/doGet-Method-768x556.png 768w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/doGet-Method-359x260.png 359w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/doGet-Method-325x235.png 325w\" sizes=\"auto, (max-width: 1054px) 100vw, 1054px\" \/><\/p>\n<p>This Apex method extracts the account record id from the request and runs a SOQL query to determine if there are any account records with that Id. If an account record is found then the wrapper is constructed to be sent as the response body otherwise the response body will output a message \u201cNo account found with id [Id from request]\u201d.<\/p>\n<h3>Post Call<\/h3>\n<p>An HTTP POST call can be used to send account information into Salesforce to create a new account record and then Salesforce might return some information. In this example, we will send the account name and description to be used for the new account and then Salesforce will send back the resulting new account record Id and name. As I have created an Apex class with a URL mapping to handle the inbound POST API call, we will need to use a custom URL. For this reason, we will use the URL displayed below:<\/p>\n<pre><code>https:\/\/UM6.salesforce.com\/services\/apexrest\/Account\/\r\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3712\" src=\"https:\/\/bluewavecx.com\/wp-content\/uploads\/2021\/04\/Postman3.png\" alt=\"\" width=\"1529\" height=\"714\" srcset=\"https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/Postman3.png 1529w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/Postman3-1024x478.png 1024w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/Postman3-768x359.png 768w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/Postman3-380x177.png 380w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/Postman3-390x182.png 390w\" sizes=\"auto, (max-width: 1529px) 100vw, 1529px\" \/>\r\n<\/code><\/pre>\n<p>The incoming request for this POST API call takes in the account name and description as you can see in the body of the postman call. This is because I used the following wrapper class for the request.<\/p>\n<pre><code>global class NewAccountRequest{\r\n    public String name{get; set;}\r\n    public String description{get; set;}\r\n}<\/code><\/pre>\n<p>The response of this POST API call returns the account name and the account id. This is because we are using the same account wrapper class again as we did for the response in the Get call example above. The Apex method that handles the POST call is:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3714\" src=\"https:\/\/bluewavecx.com\/wp-content\/uploads\/2021\/04\/doPost-Method.png\" alt=\"\" width=\"1046\" height=\"775\" srcset=\"https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/doPost-Method.png 1046w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/doPost-Method-777x576.png 777w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/doPost-Method-768x569.png 768w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/doPost-Method-351x260.png 351w, https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2021\/04\/doPost-Method-317x235.png 317w\" sizes=\"auto, (max-width: 1046px) 100vw, 1046px\" \/><\/p>\n<p>This doPost() method extracts the account name and description from the incoming request and builds a new account record from it. Subsequently, a new account record is inserted into Salesforce and the record Id of the new record along with the name is used to build up the wrapper class for the response body. If there are any errors while trying to insert the new account record then the response body will return the database error message.<\/p>\n<h3>Summary<\/h3>\n<p>Above are simple examples of GET and POST API calls which are the most common REST API calls. A POST call can be complex to handle as it takes in a request, will run some logic based on the request body and then will return a response. The other REST API methods (PUT\/PATCH\/DELETE) will be handled in a similar manner.<\/p>\n<p>For the DELETE method, you must add the record Id to the end of the request endpoint (like the GET method) and then the record will be deleted in Apex. The response to a DELETE call has no body and will simply be a status code.<\/p>\n<p>For the PUT method, this is an upsert call so a record can either be updated or created. The request URL will be the same as the POST method. The record Id will be included in the body of the request. The PUT method in Apex will check if there is an existing record with that id, if there is then the record will be updated with information from the request body. If no record is found in Salesforce then a new record will be created with the information from the request body.<\/p>\n<p>For the PATCH method, this is an update call. The request URL will be similar to the GET method where the record Id is attached to the end of the URL. A request body will also be included with information that the Salesforce record should be updated with. The Apex method will extract the record Id from the URL and will run a SOQL to see if a record is found in the system. If a record is found then the record will be updated with the information from the request body, otherwise nothing will happen in Salesforce.<\/p>\n<p>Continue to <a href=\"https:\/\/bluewavecx.com\/ie\/blog\/writing-unit-tests-for-restful-apex-methods\/\" target=\"_blank\" rel=\"noreferrer noopener\">learn about Writing Unit Tests for RESTful Apex Methods<\/a>.<\/p>\n<h3>Further Resources<\/h3>\n<ul>\n<li>Salesforce Developers Blog &#8220;<a href=\"https:\/\/developer.salesforce.com\/blogs\/2021\/01\/explore-the-salesforce-apis-with-the-upgraded-postman-collection.html\" target=\"_blank\" rel=\"noreferrer noopener\">Explore the Salesforce APIs with the Upgraded Postman Collection<\/a>&#8220;<\/li>\n<li>Salesforce Github Repository <a href=\"https:\/\/github.com\/forcedotcom\/postman-salesforce-apis\" target=\"_blank\" rel=\"noreferrer noopener\">forcedotcom\/postman-salesforce-apis<\/a><\/li>\n<li>Learn to use REST Explorer in Workbench and leverage the standard <a href=\"https:\/\/trailhead.salesforce.com\/content\/learn\/modules\/api_basics\/api_basics_rest\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">REST API<\/a><\/li>\n<\/ul>\n<p>[\/vc_column_text][\/vc_column][\/vc_row][vc_row full_width=&#8221;stretch_row_content_no_spaces&#8221; row_gradient=&#8221;background: linear-gradient(112.25deg, rgb(0, 64, 110) -30.65%, rgb(0, 191, 218) 48.27%, rgb(0, 191, 218) 84.92%) repeat scroll 0% 0%, rgb(196, 196, 196) none repeat scroll 0% 0%;&#8221;][vc_column]\n<div class=\"wpcf7 no-js\" id=\"wpcf7-f4301-o1\" lang=\"en-US\" dir=\"ltr\" data-wpcf7-id=\"4301\">\n<div class=\"screen-reader-response\"><p role=\"status\" aria-live=\"polite\" aria-atomic=\"true\"><\/p> <ul><\/ul><\/div>\n<form action=\"\/ie\/wp-json\/wp\/v2\/posts\/2677#wpcf7-f4301-o1\" method=\"post\" class=\"wpcf7-form init\" aria-label=\"Contact form\" novalidate=\"novalidate\" data-status=\"init\">\n<fieldset class=\"hidden-fields-container\"><input type=\"hidden\" name=\"_wpcf7\" value=\"4301\" \/><input type=\"hidden\" name=\"_wpcf7_version\" value=\"6.2.2\" \/><input type=\"hidden\" name=\"_wpcf7_locale\" value=\"en_US\" \/><input type=\"hidden\" name=\"_wpcf7_unit_tag\" value=\"wpcf7-f4301-o1\" \/><input type=\"hidden\" name=\"_wpcf7_container_post\" value=\"0\" \/><input type=\"hidden\" name=\"_wpcf7_posted_data_hash\" value=\"\" \/>\n<\/fieldset>\n<div class=\"ctnContactSec\">\n\t<div class=\"container\">\n\t\t<div class=\"formWrap\">\n\t\t\t<div class=\"headingHead\">\n\t\t\t\t<h2 class=\"textUppercase fontAlter\">Contact Us\n\t\t\t\t<\/h2>\n\t\t\t\t<p>Any questions, or comments get in touch below.\n\t\t\t\t<\/p>\n\t\t\t<\/div>\n\t\t\t<div class=\"contactForm\">\n\t\t\t\t<p><span class=\"wpcf7-form-control-wrap\" data-name=\"text-971\"><input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-text wpcf7-validates-as-required formControl\" id=\"LastName\" aria-required=\"true\" aria-invalid=\"false\" placeholder=\"Full Name\" value=\"\" type=\"text\" name=\"text-971\" \/><\/span><span class=\"wpcf7-form-control-wrap\" data-name=\"email-24\"><input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-email wpcf7-validates-as-required wpcf7-text wpcf7-validates-as-email formControl\" aria-required=\"true\" aria-invalid=\"false\" placeholder=\"Email\" value=\"\" type=\"email\" name=\"email-24\" \/><\/span><span class=\"wpcf7-form-control-wrap\" data-name=\"text-43\"><input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-text wpcf7-validates-as-required formControl\" aria-required=\"true\" aria-invalid=\"false\" placeholder=\"Job Title\" value=\"\" type=\"text\" name=\"text-43\" \/><\/span><span class=\"wpcf7-form-control-wrap\" data-name=\"text-151\"><input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-text wpcf7-validates-as-required formControl\" aria-required=\"true\" aria-invalid=\"false\" placeholder=\"Company\" value=\"\" type=\"text\" name=\"text-151\" \/><\/span><span class=\"wpcf7-form-control-wrap\" data-name=\"textarea-405\"><textarea cols=\"40\" rows=\"10\" maxlength=\"2000\" class=\"wpcf7-form-control wpcf7-textarea wpcf7-validates-as-required formControl\" id=\"Message\" aria-required=\"true\" aria-invalid=\"false\" placeholder=\"Message\" name=\"textarea-405\"><\/textarea><\/span><input class=\"wpcf7-form-control wpcf7-submit has-spinner btn btnDefaultWidth btnBgWhite\" id=\"submit\" type=\"submit\" value=\"Submit\" \/>\n\t\t\t\t<\/p>\n\t\t\t<\/div>\n\t\t<\/div>\n\t<\/div>\n<\/div><div class=\"wpcf7-response-output\" aria-hidden=\"true\"><\/div>\n<\/form>\n<\/div>\n[\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>[vc_row][vc_column][vc_column_text] A Step-by-Step Guide to Salesforce REST API Integration for Apex Developers Author: Ismail Basser, Salesforce Consultant at Bluewave Technology Introduction Recently, I developed a solution with the Salesforce Rest API and found the experience a bit cumbersome simply because existing documentation was somewhat limited and scattered for my needs. The below retrospective sets out [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4212,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-2677","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-articles"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Building an Inbound Rest API for Salesforce | Bluewave IE<\/title>\n<meta name=\"description\" content=\"Everything you ever wanted to know about Inbound REST API development and a custom apex class handler in Salesforce.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/bluewavecx.com\/ie\/blog\/inbound-rest-api-salesforce\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Building an Inbound Rest API for Salesforce | Bluewave IE\" \/>\n<meta property=\"og:description\" content=\"Everything you ever wanted to know about Inbound REST API development and a custom apex class handler in Salesforce.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bluewavecx.com\/ie\/blog\/inbound-rest-api-salesforce\/\" \/>\n<meta property=\"og:site_name\" content=\"Bluewave IE\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-07T09:30:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-17T13:20:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2022\/09\/5.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"1013\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/blog\\\/inbound-rest-api-salesforce\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/blog\\\/inbound-rest-api-salesforce\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/#\\\/schema\\\/person\\\/3016812de924321d92720c9194e60684\"},\"headline\":\"Building an Inbound Rest API for Salesforce\",\"datePublished\":\"2021-04-07T09:30:29+00:00\",\"dateModified\":\"2023-01-17T13:20:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/blog\\\/inbound-rest-api-salesforce\\\/\"},\"wordCount\":1601,\"image\":{\"@id\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/blog\\\/inbound-rest-api-salesforce\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/09\\\/5.jpg\",\"articleSection\":[\"Articles\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/blog\\\/inbound-rest-api-salesforce\\\/\",\"url\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/blog\\\/inbound-rest-api-salesforce\\\/\",\"name\":\"Building an Inbound Rest API for Salesforce | Bluewave IE\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/blog\\\/inbound-rest-api-salesforce\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/blog\\\/inbound-rest-api-salesforce\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/09\\\/5.jpg\",\"datePublished\":\"2021-04-07T09:30:29+00:00\",\"dateModified\":\"2023-01-17T13:20:13+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/#\\\/schema\\\/person\\\/3016812de924321d92720c9194e60684\"},\"description\":\"Everything you ever wanted to know about Inbound REST API development and a custom apex class handler in Salesforce.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/blog\\\/inbound-rest-api-salesforce\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/blog\\\/inbound-rest-api-salesforce\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/blog\\\/inbound-rest-api-salesforce\\\/#primaryimage\",\"url\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/09\\\/5.jpg\",\"contentUrl\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/09\\\/5.jpg\",\"width\":1800,\"height\":1013},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/blog\\\/inbound-rest-api-salesforce\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Building an Inbound Rest API for Salesforce\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/#website\",\"url\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/\",\"name\":\"Bluewave IE\",\"description\":\"Just another bluewavegroup site\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/bluewavecx.com\\\/ie\\\/#\\\/schema\\\/person\\\/3016812de924321d92720c9194e60684\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7186641f2ccd92cf6444aea05ab53d302332efd95634f833be3085ce466e00b6?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7186641f2ccd92cf6444aea05ab53d302332efd95634f833be3085ce466e00b6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7186641f2ccd92cf6444aea05ab53d302332efd95634f833be3085ce466e00b6?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"http:\\\/\\\/bluewavegroup.flywheelstaging.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Building an Inbound Rest API for Salesforce | Bluewave IE","description":"Everything you ever wanted to know about Inbound REST API development and a custom apex class handler in Salesforce.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/bluewavecx.com\/ie\/blog\/inbound-rest-api-salesforce\/","og_locale":"en_US","og_type":"article","og_title":"Building an Inbound Rest API for Salesforce | Bluewave IE","og_description":"Everything you ever wanted to know about Inbound REST API development and a custom apex class handler in Salesforce.","og_url":"https:\/\/bluewavecx.com\/ie\/blog\/inbound-rest-api-salesforce\/","og_site_name":"Bluewave IE","article_published_time":"2021-04-07T09:30:29+00:00","article_modified_time":"2023-01-17T13:20:13+00:00","og_image":[{"width":1800,"height":1013,"url":"https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2022\/09\/5.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/bluewavecx.com\/ie\/blog\/inbound-rest-api-salesforce\/#article","isPartOf":{"@id":"https:\/\/bluewavecx.com\/ie\/blog\/inbound-rest-api-salesforce\/"},"author":{"name":"admin","@id":"https:\/\/bluewavecx.com\/ie\/#\/schema\/person\/3016812de924321d92720c9194e60684"},"headline":"Building an Inbound Rest API for Salesforce","datePublished":"2021-04-07T09:30:29+00:00","dateModified":"2023-01-17T13:20:13+00:00","mainEntityOfPage":{"@id":"https:\/\/bluewavecx.com\/ie\/blog\/inbound-rest-api-salesforce\/"},"wordCount":1601,"image":{"@id":"https:\/\/bluewavecx.com\/ie\/blog\/inbound-rest-api-salesforce\/#primaryimage"},"thumbnailUrl":"https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2022\/09\/5.jpg","articleSection":["Articles"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/bluewavecx.com\/ie\/blog\/inbound-rest-api-salesforce\/","url":"https:\/\/bluewavecx.com\/ie\/blog\/inbound-rest-api-salesforce\/","name":"Building an Inbound Rest API for Salesforce | Bluewave IE","isPartOf":{"@id":"https:\/\/bluewavecx.com\/ie\/#website"},"primaryImageOfPage":{"@id":"https:\/\/bluewavecx.com\/ie\/blog\/inbound-rest-api-salesforce\/#primaryimage"},"image":{"@id":"https:\/\/bluewavecx.com\/ie\/blog\/inbound-rest-api-salesforce\/#primaryimage"},"thumbnailUrl":"https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2022\/09\/5.jpg","datePublished":"2021-04-07T09:30:29+00:00","dateModified":"2023-01-17T13:20:13+00:00","author":{"@id":"https:\/\/bluewavecx.com\/ie\/#\/schema\/person\/3016812de924321d92720c9194e60684"},"description":"Everything you ever wanted to know about Inbound REST API development and a custom apex class handler in Salesforce.","breadcrumb":{"@id":"https:\/\/bluewavecx.com\/ie\/blog\/inbound-rest-api-salesforce\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bluewavecx.com\/ie\/blog\/inbound-rest-api-salesforce\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bluewavecx.com\/ie\/blog\/inbound-rest-api-salesforce\/#primaryimage","url":"https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2022\/09\/5.jpg","contentUrl":"https:\/\/bluewavecx.com\/ie\/wp-content\/uploads\/sites\/2\/2022\/09\/5.jpg","width":1800,"height":1013},{"@type":"BreadcrumbList","@id":"https:\/\/bluewavecx.com\/ie\/blog\/inbound-rest-api-salesforce\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bluewavecx.com\/ie\/"},{"@type":"ListItem","position":2,"name":"Building an Inbound Rest API for Salesforce"}]},{"@type":"WebSite","@id":"https:\/\/bluewavecx.com\/ie\/#website","url":"https:\/\/bluewavecx.com\/ie\/","name":"Bluewave IE","description":"Just another bluewavegroup site","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bluewavecx.com\/ie\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/bluewavecx.com\/ie\/#\/schema\/person\/3016812de924321d92720c9194e60684","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/7186641f2ccd92cf6444aea05ab53d302332efd95634f833be3085ce466e00b6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/7186641f2ccd92cf6444aea05ab53d302332efd95634f833be3085ce466e00b6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7186641f2ccd92cf6444aea05ab53d302332efd95634f833be3085ce466e00b6?s=96&d=mm&r=g","caption":"admin"},"sameAs":["http:\/\/bluewavegroup.flywheelstaging.com"]}]}},"_links":{"self":[{"href":"https:\/\/bluewavecx.com\/ie\/wp-json\/wp\/v2\/posts\/2677","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bluewavecx.com\/ie\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bluewavecx.com\/ie\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bluewavecx.com\/ie\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bluewavecx.com\/ie\/wp-json\/wp\/v2\/comments?post=2677"}],"version-history":[{"count":2,"href":"https:\/\/bluewavecx.com\/ie\/wp-json\/wp\/v2\/posts\/2677\/revisions"}],"predecessor-version":[{"id":4913,"href":"https:\/\/bluewavecx.com\/ie\/wp-json\/wp\/v2\/posts\/2677\/revisions\/4913"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bluewavecx.com\/ie\/wp-json\/wp\/v2\/media\/4212"}],"wp:attachment":[{"href":"https:\/\/bluewavecx.com\/ie\/wp-json\/wp\/v2\/media?parent=2677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bluewavecx.com\/ie\/wp-json\/wp\/v2\/categories?post=2677"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bluewavecx.com\/ie\/wp-json\/wp\/v2\/tags?post=2677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}